#715: managed-by-IdP is a verified claim - orphan folders say so #716

Merged
Cordy merged 9 commits from feat-715 into main 2026-09-24 04:04:16 +00:00
Owner

Closes #715

Root cause: mergeSpaceDirs marked every backend /spaces directory with no app-owned record as Managed: true, and the UI rendered that as "Managed by the identity provider" — an assumption, never a lookup. Orphaned folders (pre-#690 synthesized dirs, IdP groups since deleted, hand-made dirs) carried a false, compliance-relevant attribution. Verified on the dogfood: id.c0rdyceps.ch has no test5/qa656/Fall * groups, yet all read as IdP-managed.

Fix — three honest states:

  • app-owned record → Owned by X · group Y · app-managed (from #690, unchanged);
  • directory the IdP listing knows (case-insensitive; live DirList + KnownDirNames via new GroupsAPI.DirNamesFor) → "Managed by the identity provider";
  • directory matching nothing → orphan: true, rendered as "Folder in storage — no managing group found" in the row AND the details dialog (i18n ×4).

Fail-safe: only a successful live listing is authoritative. No directory client, or a listing error (IdP outage), keeps the old attribution — a customer never sees a mass orphan-flip because Keycloak blipped. Wiring in main.go is late-bound through the handler so Groups/Spaces construction order can't silently disable it.

Tests: spaces_orphan_test.go (orphan split, unverified fallback, DirNamesFor authority states incl. listing failure), existing union tests updated to the new signature, qa715.test.js UI pins.

Closes #715 **Root cause:** `mergeSpaceDirs` marked every backend `/spaces` directory with no app-owned record as `Managed: true`, and the UI rendered that as "Managed by the identity provider" — an assumption, never a lookup. Orphaned folders (pre-#690 synthesized dirs, IdP groups since deleted, hand-made dirs) carried a false, compliance-relevant attribution. Verified on the dogfood: id.c0rdyceps.ch has no `test5`/`qa656`/`Fall *` groups, yet all read as IdP-managed. **Fix — three honest states:** - app-owned record → `Owned by X · group Y · app-managed` (from #690, unchanged); - directory the IdP listing knows (case-insensitive; live `DirList` + `KnownDirNames` via new `GroupsAPI.DirNamesFor`) → "Managed by the identity provider"; - directory matching nothing → `orphan: true`, rendered as "Folder in storage — no managing group found" in the row AND the details dialog (i18n ×4). **Fail-safe:** only a *successful* live listing is authoritative. No directory client, or a listing error (IdP outage), keeps the old attribution — a customer never sees a mass orphan-flip because Keycloak blipped. Wiring in main.go is late-bound through the handler so Groups/Spaces construction order can't silently disable it. **Tests:** `spaces_orphan_test.go` (orphan split, unverified fallback, `DirNamesFor` authority states incl. listing failure), existing union tests updated to the new signature, `qa715.test.js` UI pins.
test(#715): RED - managed-by-IdP is a verified claim; orphans labelled honestly
All checks were successful
scout-715 / scout (push) Successful in 1s
fd4f792492
test(#715): RED - orphan label pins for the spaces inventory
All checks were successful
scout-715 / scout (push) Successful in 1s
e515b39312
splice(#715): verified IdP attribution + orphan state, API to UI
All checks were successful
scout-715 / scout (push) Successful in 1s
408f0aeebd
one-shot(#715): RED gate, splice, gofmt+vet+build+test+web, self-cleaning commit
All checks were successful
fix-715 / fix (push) Successful in 1m12s
scout-715 / scout (push) Successful in 1s
993b91cd20
mergeSpaceDirs takes a directory-group predicate built from GroupsAPI.DirNamesFor (known names + live listing; authoritative only on success). A dir the directory knows stays Managed; an unmatched dir gains orphan:true and the inventory + details show 'Folder in storage - no managing group found' (i18n x4). Unconfigured or failing listings keep the old attribution.
one-shot: apply v0.6.264 changelog entry, self-remove
All checks were successful
chg-264 / chg (push) Successful in 6s
2e6af5e5b7
docs: changelog for v0.6.264 (#715 verified IdP attribution)
All checks were successful
ci / test-and-build (pull_request) Successful in 1m16s
70db45f363
Cordy merged commit 67e0970559 into main 2026-09-24 04:04:16 +00:00
Cordy deleted branch feat-715 2026-09-24 04:04:18 +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#716
No description provided.