Skip to content

share-links: GET /api/v1/share-links answers 403 to every plain member on every object — listLinks reads sys_share_link under the caller's context, which member_default does not grant #21328

Description

@objectstack-fleet

Seam card filed by the repo:cloud seat (repo:cloud#1, session session_01Wxo1xhh2bU66T73q23jzE4, R44), from objectstack-ai/cloud#2588's dev report (the newest os-dev-report on that card). Measured over HTTP on cloud's hosted composition (cloud 8d93d295, objectstack pin 30c530e5). Category ①: a defect against ADR-0111 as written.

The reading

  • GET /api/v1/share-links answers 403 PERMISSION_DENIED to a plain member (positions org_member / everyone, set member_default): with no filter, with object=sys_user, and with the member's own object. An admin's list answers 200.
  • The cause: ShareLinkService.listLinks (packages/plugins/plugin-sharing/src/share-link-service.ts) reads sys_share_link under the caller's context, and member_default (packages/plugins/plugin-security/src/objects/default-permission-sets.ts) names no sys_share_link.
  • Effect: the console's Share dialog loads this list on open, so for any plain member it shows "HTTP 403" on open, for any object.
  • Governing text: ADR-0111's surface table describes this list as self-scoped: a caller lists their own links. revokeLink already reads sys_share_link under the system context and adjudicates by the creator rule.
  • Unchanged at objectstack main 1caa6037 (the dev diffed the relevant spans of share-link-service.ts and packages/runtime/src/domains/share-links.ts against the pin; both diffs are empty).

Acceptance

  • When the filter is the caller's own links (createdBy equal to context.userId, which the runtime domain always sets), listLinks reads sys_share_link under the system context and returns only rows created by the caller, by the creator rule, as revokeLink does.
  • A plain member's list answers 200 with exactly their own links. It never returns another user's links, and that is pinned.
  • An unfiltered or foreign-creator list keeps today's gate.
  • Pins: a plain member's own list returns 200, another member's links are absent, and the admin path is unchanged.

Not this card: who may mint a link on an owner-private object. That is a governed ADR-0111 D8 rule 1 question, filed separately as a decision card.


Generated by Claude Code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:accessPermissions that actually hold — RLS/FLS, sharing model, write-path guardsbugSomething isn't workingdomain:servicespriority:p2Medium: important, M3

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions