Settings store + admin settings UI (policy out of the config file) #52

Closed
opened 2026-07-29 02:12:16 +00:00 by Cordy · 1 comment
Owner

Long-term home for application policy so operators stop editing config secrets for day-to-day changes. The License panel (GET/PUT /api/v1/license, paste-to-install, JSON state file) is already the embryo of this pattern — grow it panel by panel, never big-bang.

Candidates, each earning its panel as it lands: quota defaults, share defaults (expiry, allow-upload), trash retention/auto-purge, feature toggles, license (exists).

Boundary discipline (the reason Cairn isn't Nextcloud):

  • Infrastructure stays in the immutable config file: ports, storage driver, IdP endpoint, encryption custody. GitOps-friendly, 12-factor, auditable.
  • Identity-derived privileges stay with the IdP (auth.adminGroups) + break-glass auth.admins — the settings store must never own who-is-admin, or it fights the directory and leaves orphaned privileges.

Mechanics when started: one small admin-gated store (atomic JSON, same pattern as shares/app-passwords/license state), one /api/v1/settings surface, panels in the avatar-menu settings area of UI v2.

Long-term home for **application policy** so operators stop editing config secrets for day-to-day changes. The License panel (`GET/PUT /api/v1/license`, paste-to-install, JSON state file) is already the embryo of this pattern — grow it panel by panel, never big-bang. Candidates, each earning its panel as it lands: quota defaults, share defaults (expiry, allow-upload), trash retention/auto-purge, feature toggles, license (exists). **Boundary discipline (the reason Cairn isn't Nextcloud):** - Infrastructure stays in the immutable config file: ports, storage driver, IdP endpoint, encryption custody. GitOps-friendly, 12-factor, auditable. - Identity-derived privileges stay with the IdP (`auth.adminGroups`) + break-glass `auth.admins` — the settings store must never own who-is-admin, or it fights the directory and leaves orphaned privileges. Mechanics when started: one small admin-gated store (atomic JSON, same pattern as shares/app-passwords/license state), one `/api/v1/settings` surface, panels in the avatar-menu settings area of UI v2.
Author
Owner

Shipped in v0.3.10 (PR #55). internal/settings atomic-JSON policy store, GET/PUT /api/v1/settings (read for any authed user, write admin-gated), and a Settings panel in the avatar menu (admins only). First panel: instance name (shown in the header) + default share expiry / upload defaults. Boundary held — policy only, never identity. Grows one panel at a time from here.

Shipped in **v0.3.10** (PR #55). `internal/settings` atomic-JSON policy store, `GET/PUT /api/v1/settings` (read for any authed user, write admin-gated), and a **Settings** panel in the avatar menu (admins only). First panel: instance name (shown in the header) + default share expiry / upload defaults. Boundary held — policy only, never identity. Grows one panel at a time from here.
Cordy closed this issue 2026-07-29 04:54:47 +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#52
No description provided.