Read-only space membership (viewer role via IdP group) #64

Closed
opened 2026-07-29 23:20:11 +00:00 by Cordy · 0 comments
Owner

Derived from the public-sector analysis (#59, docs/PUBLIC-SECTOR.md). Auditor/internal-affairs persona: must read everything in a space, change nothing. Today every space member can write.

Design (follows the directory-is-the-source-of-truth philosophy — no parallel permission system):

  • Membership in <space>-ro grants read-only access to /spaces/<space> (suffix configurable, e.g. auth.spaceReadOnlySuffix, default -ro).
  • A user in both groups gets write (write wins).
  • Enforced in the scope overlay (internal/storage/scope) so web UI, REST, WebDAV, and TUS behave identically: reads/lists succeed, any mutation → 403.
  • Web UI: hide/disable upload, delete, rename, new-folder for read-only spaces (server remains the enforcement point).
  • /spaces listing includes read-only spaces (with a viewer indicator).

Acceptance: user only in case-x-ro can list/download in /spaces/case-x but PUT/DELETE/MKCOL fail with 403 across web + WebDAV; adding them to case-x in the IdP grants write at next sign-in with no Cairn-side change.

Derived from the public-sector analysis (#59, docs/PUBLIC-SECTOR.md). Auditor/internal-affairs persona: must read everything in a space, change nothing. Today every space member can write. **Design (follows the directory-is-the-source-of-truth philosophy — no parallel permission system):** - Membership in `<space>-ro` grants **read-only** access to `/spaces/<space>` (suffix configurable, e.g. `auth.spaceReadOnlySuffix`, default `-ro`). - A user in both groups gets write (write wins). - Enforced in the scope overlay (`internal/storage/scope`) so web UI, REST, WebDAV, and TUS behave identically: reads/lists succeed, any mutation → 403. - Web UI: hide/disable upload, delete, rename, new-folder for read-only spaces (server remains the enforcement point). - `/spaces` listing includes read-only spaces (with a viewer indicator). **Acceptance:** user only in `case-x-ro` can list/download in `/spaces/case-x` but PUT/DELETE/MKCOL fail with 403 across web + WebDAV; adding them to `case-x` in the IdP grants write at next sign-in with no Cairn-side change.
Cordy closed this issue 2026-07-30 01:48:10 +00:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Cordy/Cairn#64
No description provided.