Skip to content

Share links: a project guest reads the project's artifacts #578

Closed

Description

@Jacksondr5

A layer of share links that must land before the Share action offers a project grant (#535). Found by the review panel on #536, #561 and #577 (Astra, by reading; not reproduced with a project-granted guest).

Definition: Shared server AC9: a project grant covers every thread in the project and the project's artifacts.

The gap

A guest holding a View grant on a project is refused that project's artifacts.

  • The web client reads artifacts with POST /api/j5/artifacts/list and /read (apps/web/src/j5/artifacts/artifactClient.ts).
  • The guest gate refuses every route that is not a GET and not on its allow-list (apps/server/src/j5/sharing/GuestGate.ts, guestHttpRule), so the session reaches ArtifactHttp.ts with no permissions and is refused.
  • The artifact change subscription is not in the guest's WebSocket allow-list either.

What it needs

  • Allow the two artifact reads for a guest whose grant is on the project the artifacts belong to, checked with PersonAccess.projectAccess. A grant on a thread gives no artifacts (AC9: a thread guest sees a link and cannot open it).
  • Allow the change subscription for that project only.
  • Writing and deleting artifacts stay refused.
  • Hostile tests: another project's artifacts, a thread guest of the same project, a path that escapes the project's artifact folder.

Related: nothing records which thread wrote an artifact, which is why a thread grant gives none. That is listed in #542.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions