ocm: Nextcloud/ownCloud trusted-servers compat with per-server derived directory (#455) #479

Merged
Cordy merged 7 commits from fix-455 into main 2026-09-10 23:25:47 +00:00
Owner

Implements the locked #455 decisions per the approved rev-2 mockups (ocm-directory-rev2, ocm-status-servers-rev2).

Backend (TDD, red witnessed on the runner):

  • internal/ocm/directory.go: status.php (JSON with a ≥9.0 version, active only while a legacy-dialect server is allow-listed), OCS request-shared-secret (allow-list gated, async callback with trailing-slash retry — the classic NC forum mismatch) and get-shared-secret (always 403: Cairn never initiates), CardDAV sync surface at remote.php/dav/addressbooks/system/system/system (REPORT sync-collection with per-server sync tokens + 404 tombstones via a cumulative Gone list, per-user vCards with CLOUD: address, Basic auth where only the per-server secret identifies).
  • Relationship-derived listing: override (optout beats everything, then optin) → contact → sent → accepted (a merely received share never lists anyone). DirSubset enumerates only users present in our own state — no IdP enumeration ever.
  • API: GET/POST /api/v1/ocm/directory (user rows + per-server override, audited as ocm-directory-override), GET /api/v1/admin/ocm/directory (visibility only). /admin/ocm/status gains legacyServers.
  • Tests: derivation table, full handshake round-trip against an httptest Nextcloud, status.php gating, REPORT/vCard serving incl. tombstone after opt-out.

Frontend: Directory tab (visibility-only table + explanatory foot), "Where you appear" card in Federated → Contacts (derivation always named, one link per row overrides either way), Status tab compat row, legacy product sub-line, sharpened legacy Remove confirm. i18n ×4.

Docs: handbook "Appearing in Nextcloud and ownCloud Trusted servers" (incl. no-trailing-slash note and the server-wall granularity), CHANGELOG v0.6.158.

Closes #455.

Implements the locked #455 decisions per the approved rev-2 mockups (ocm-directory-rev2, ocm-status-servers-rev2). **Backend (TDD, red witnessed on the runner):** - `internal/ocm/directory.go`: `status.php` (JSON with a ≥9.0 version, active only while a legacy-dialect server is allow-listed), OCS `request-shared-secret` (allow-list gated, async callback with trailing-slash retry — the classic NC forum mismatch) and `get-shared-secret` (always 403: Cairn never initiates), CardDAV sync surface at `remote.php/dav/addressbooks/system/system/system` (REPORT sync-collection with per-server sync tokens + 404 tombstones via a cumulative Gone list, per-user vCards with `CLOUD:` address, Basic auth where only the per-server secret identifies). - Relationship-derived listing: override (`optout` beats everything, then `optin`) → contact → sent → accepted (a merely received share never lists anyone). `DirSubset` enumerates only users present in our own state — no IdP enumeration ever. - API: `GET/POST /api/v1/ocm/directory` (user rows + per-server override, audited as `ocm-directory-override`), `GET /api/v1/admin/ocm/directory` (visibility only). `/admin/ocm/status` gains `legacyServers`. - Tests: derivation table, full handshake round-trip against an httptest Nextcloud, status.php gating, REPORT/vCard serving incl. tombstone after opt-out. **Frontend:** Directory tab (visibility-only table + explanatory foot), "Where you appear" card in Federated → Contacts (derivation always named, one link per row overrides either way), Status tab compat row, legacy product sub-line, sharpened legacy Remove confirm. i18n ×4. **Docs:** handbook "Appearing in Nextcloud and ownCloud Trusted servers" (incl. no-trailing-slash note and the server-wall granularity), CHANGELOG v0.6.158. Closes #455.
Cordy merged commit e4f77e9b2a into main 2026-09-10 23:25:47 +00:00
Cordy deleted branch fix-455 2026-09-10 23:25:51 +00:00
Sign in to join this conversation.
No reviewers
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#479
No description provided.