IDIP credentials reach the token on groups but Nextcloud maps ocgroups — a credential opens nothing at the files door (kanidm komiti do, DDR 0179) #1104

Closed
opened 2026-09-01 06:19:29 +00:00 by ben · 5 comments
Owner

The gap

On the IDIP path a community credential reaches the ID token as committee:<slug> on the groups claim (internal/idp/storage.go:545). Nextcloud's user_oidc maps groups from ocgroups ALONE (--mapping-groups=ocgroups, internal/clan/files.go:849), and the bridge fills ocgroups with only the files-admin bit — ["admin"] for an operator, [] for everyone else (storage.go:547-555).

So on IDIP, holding a credential opens nothing at the files door. The claim is minted correctly and consumed by nobody.

The kanidm path does not have this gap: filesClaimMapPath gives each komiti its own ocgroups claim-map entry, which is exactly what DDR 0179 ruled ("a komiti must carry its own claim-map entry here to reach Nextcloud as a group, as files-admin already does for the bare value admin" — internal/kanidm/kanidm.go:451-459). The IDIP bridge never got the equivalent.

How it surfaced

Drive 20260901T055806Z — 30 legs, 29 green, 1 red, 0 skips, the first run to walk the whole credentials tail. create-credential, preset-invite, preset-join and preset-approve all green: a credential was defined, an invite minted carrying it as a preset, a member joined off that invite, and approval issued Membership + the preset in one ceremony. Then credential-claim red:

the door's personal settings never named the finance group — the groups claim did not carry committee:finance (ADR 0196)

The leg was asserting parity that had never been built. It is the drive over-claiming, but the underlying gap is real.

Why it matters

DDR 0217's whole vocabulary is that a credential is what a community issues so that it means something. Until this lands, an IDIP credential is a record with no consequence at any service — S7i's "WHICH SERVICES THIS CREDENTIAL OPENS" access matrix has nothing behind it.

Relationship to #1063

#1063 (/research, still queued) asks how service access should require presentation of a credential — claims-in-token vs step-up IPEX presentation vs a direct TEL check. This ticket is the narrow, already-decided half of that: the kanidm path's answer (claims in ocgroups) applied to the IDIP bridge, so parity exists while the richer model is designed. Whether that is the right long-term shape is #1063's call — worth ruling that before building, in case the answer is "presentation, not claims".

Drive legs

credential-claim and credential-claim-gone in journey.idip.spec.ts are the proof both ways (issue names the group, receipted revoke un-names it). They are pointed at this ticket in CREDENTIAL_LEG_LEDGER and will skip with its number until it ships, then arm themselves.

## The gap On the IDIP path a community credential reaches the ID token as `committee:<slug>` on the **`groups`** claim (`internal/idp/storage.go:545`). Nextcloud's user_oidc maps groups from **`ocgroups` ALONE** (`--mapping-groups=ocgroups`, `internal/clan/files.go:849`), and the bridge fills `ocgroups` with only the files-admin bit — `["admin"]` for an operator, `[]` for everyone else (`storage.go:547-555`). So on IDIP, **holding a credential opens nothing at the files door.** The claim is minted correctly and consumed by nobody. The kanidm path does not have this gap: `filesClaimMapPath` gives each komiti its own `ocgroups` claim-map entry, which is exactly what DDR 0179 ruled ("a komiti must carry its own claim-map entry here to reach Nextcloud as a group, as files-admin already does for the bare value `admin`" — `internal/kanidm/kanidm.go:451-459`). The IDIP bridge never got the equivalent. ## How it surfaced Drive `20260901T055806Z` — **30 legs, 29 green, 1 red, 0 skips**, the first run to walk the whole credentials tail. `create-credential`, `preset-invite`, `preset-join` and `preset-approve` all green: a credential was defined, an invite minted carrying it as a preset, a member joined off that invite, and approval issued Membership + the preset in one ceremony. Then `credential-claim` red: > the door's personal settings never named the finance group — the groups claim did not carry `committee:finance` (ADR 0196) The leg was asserting parity that had never been built. It is the drive over-claiming, but the underlying gap is real. ## Why it matters DDR 0217's whole vocabulary is that a credential is what a community issues so that it *means* something. Until this lands, an IDIP credential is a record with no consequence at any service — S7i's "WHICH SERVICES THIS CREDENTIAL OPENS" access matrix has nothing behind it. ## Relationship to #1063 #1063 (`/research`, still queued) asks how service access should *require* presentation of a credential — claims-in-token vs step-up IPEX presentation vs a direct TEL check. This ticket is the narrow, already-decided half of that: the kanidm path's answer (claims in `ocgroups`) applied to the IDIP bridge, so parity exists while the richer model is designed. Whether that is the right long-term shape is #1063's call — worth ruling that before building, in case the answer is "presentation, not claims". ## Drive legs `credential-claim` and `credential-claim-gone` in `journey.idip.spec.ts` are the proof both ways (issue names the group, receipted revoke un-names it). They are pointed at this ticket in `CREDENTIAL_LEG_LEDGER` and will skip with its number until it ships, then arm themselves.
Author
Owner

Correction to this ticket's premise — the healer found the deeper half while I was filing it (7c3a0a06).

I wrote above that "the claim is minted correctly and consumed by nobody". The first half was wrong. RosterEntry.View() projected Committees off a stored profile field nothing in production has ever written: a committee grant lives in RosterEntry.Held as an issued ACDC, and neither AnchorCredentialIssuance, ConfirmReceipt, Join nor Register touches Committees. So MemberView.Committees was always empty → Claims.Komitis always empty → Identity.Groups() could only ever mint members. The committee:<slug> half of ADR 0196 was wired to nothing at all.

It shipped because a seam test seeded Committees: []string{"finance"} straight onto the Join entry (internal/idp/keri_verifier_test.go:55), pinning a groups claim production had no path to mint — the test was the only thing that ever set that field.

7c3a0a06 fixes it: View() now derives the slugs from the held set, gated on CredentialState.issued() — the identical predicate Registry.IsIssued answers the bridge's every-refresh re-check with, so the groups a token carries and the check that keeps it alive can never disagree.

What remains, and what this ticket is now narrowed to: with that fixed, the token's groups claim does carry committee:<slug>. Nextcloud still maps groups from ocgroups alone (--mapping-groups=ocgroups, internal/clan/files.go:849), and the IDIP bridge fills ocgroups with only the files-admin bit (storage.go:547-555). So the remaining gap is exactly the claim-map parity the kanidm path already has via filesClaimMapPath (DDR 0179) — nothing more, but nothing less: a held IDIP credential still opens nothing at the files door.

The credential-claim / credential-claim-gone legs stay pointed here and will arm when this lands. Everything else in the tail is unaffected by the correction.

**Correction to this ticket's premise — the healer found the deeper half while I was filing it (`7c3a0a06`).** I wrote above that "the claim is minted correctly and consumed by nobody". The first half was wrong. `RosterEntry.View()` projected `Committees` off a stored profile field **nothing in production has ever written**: a committee grant lives in `RosterEntry.Held` as an issued ACDC, and neither `AnchorCredentialIssuance`, `ConfirmReceipt`, `Join` nor `Register` touches `Committees`. So `MemberView.Committees` was always empty → `Claims.Komitis` always empty → `Identity.Groups()` could only ever mint `members`. **The `committee:<slug>` half of ADR 0196 was wired to nothing at all.** It shipped because a seam test seeded `Committees: []string{"finance"}` straight onto the Join entry (`internal/idp/keri_verifier_test.go:55`), pinning a groups claim production had no path to mint — the test was the only thing that ever set that field. `7c3a0a06` fixes it: `View()` now derives the slugs from the held set, gated on `CredentialState.issued()` — the identical predicate `Registry.IsIssued` answers the bridge's every-refresh re-check with, so the groups a token carries and the check that keeps it alive can never disagree. **What remains, and what this ticket is now narrowed to:** with that fixed, the token's `groups` claim does carry `committee:<slug>`. Nextcloud still maps groups from **`ocgroups` alone** (`--mapping-groups=ocgroups`, `internal/clan/files.go:849`), and the IDIP bridge fills `ocgroups` with only the files-admin bit (`storage.go:547-555`). So the remaining gap is exactly the claim-map parity the kanidm path already has via `filesClaimMapPath` (DDR 0179) — nothing more, but nothing less: a held IDIP credential still opens nothing at the files door. The `credential-claim` / `credential-claim-gone` legs stay pointed here and will arm when this lands. Everything else in the tail is unaffected by the correction.
Author
Owner

UNPARKED — #1063 is RULED (ADR 0222, option 1: access is a live roster check; the answer is CLAIMS, not presentation), so this is safe to build exactly as filed: the bridge fills ocgroups from held credentials, the DDR 0179 parity. This is wiring edit 2 of 3 (siblings: #1155 gate-reads-roster, #1156 restrict/open editor — both independent of this one). The two skipped drive legs (credential-claim / credential-claim-gone, CREDENTIAL_LEG_LEDGER) self-arm the moment this ships. → ready-for-agent.

UNPARKED — #1063 is RULED (ADR 0222, option 1: access is a live roster check; the answer is CLAIMS, not presentation), so this is safe to build exactly as filed: the bridge fills `ocgroups` from held credentials, the DDR 0179 parity. This is **wiring edit 2 of 3** (siblings: #1155 gate-reads-roster, #1156 restrict/open editor — both independent of this one). The two skipped drive legs (`credential-claim` / `credential-claim-gone`, CREDENTIAL_LEG_LEDGER) self-arm the moment this ships. → ready-for-agent.

swarm-claim host=matou-dev-server-01 run=16640
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=16640 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1104 — status success

⛔ close-report gates REFUSED this close — the following claims did not verify:

  • commit 322eafa0 is not reachable from origin/main (not landed)
  • changed_files: 'internal/idp/storage.go' is not in the diff of the claimed commits
  • changed_files: 'internal/idp/seam_test.go' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/journey.idip.spec.ts' is not in the diff of the claimed commits
  • changed_files: 'app/tests/e2e/fixtures/idip.ts' is not in the diff of the claimed commits
  • changed_files: 'STATUS.md' is not in the diff of the claimed commits
envelope
{
  "issue": 1104,
  "status": "success",
  "commits": [
    "322eafa0"
  ],
  "changed_files": [
    "internal/idp/storage.go",
    "internal/idp/seam_test.go",
    "app/tests/e2e/journey.idip.spec.ts",
    "app/tests/e2e/fixtures/idip.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c sh -c 'go build ./... && go vet ./internal/idp/'",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vitest run tests/e2e/fixtures/idip.test.ts",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "IDIP bridge fills ocgroups from held credentials (DDR 0179 parity)": "internal/idp/storage.go setUserinfo appends id.Claims.Komitis (bare slugs) to ocgroups, byte-identical to kanidm AddFilesKomitiClaimMap",
    "an operator carries [admin, <slug>...] and a plain member carries [<slug>...] (files door opens without operator rights)": "internal/idp/seam_test.go TestSeam_ActiveMember_CodeFlowAndClaims (admin+taiao) and TestSetUserinfo_MemberKomiti_ReachesFilesDoor (member komiti, no admin)",
    "the credential-claim / credential-claim-gone drive legs arm": "journey.idip.spec.ts prechecks flipped to () => true; gone-leg corrected to assert the bare slug's absence; CLAIM_LEGS_AWAIT skip constant removed"
  },
  "summary": "IDIP bridge now fills ocgroups from held komiti so a credential opens the Nextcloud files door, the DDR 0179 parity the kanidm path already had.",
  "blockers": []
}
**close-report** for #1104 — status `success` :no_entry: **close-report gates REFUSED this close** — the following claims did not verify: - commit 322eafa0 is not reachable from origin/main (not landed) - changed_files: 'internal/idp/storage.go' is not in the diff of the claimed commits - changed_files: 'internal/idp/seam_test.go' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/journey.idip.spec.ts' is not in the diff of the claimed commits - changed_files: 'app/tests/e2e/fixtures/idip.ts' is not in the diff of the claimed commits - changed_files: 'STATUS.md' is not in the diff of the claimed commits <details><summary>envelope</summary> ```json { "issue": 1104, "status": "success", "commits": [ "322eafa0" ], "changed_files": [ "internal/idp/storage.go", "internal/idp/seam_test.go", "app/tests/e2e/journey.idip.spec.ts", "app/tests/e2e/fixtures/idip.ts", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/idp/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c sh -c 'go build ./... && go vet ./internal/idp/'", "exit_code": 0 }, { "command": "node_modules/.bin/vitest run tests/e2e/fixtures/idip.test.ts", "exit_code": 0 }, { "command": "node_modules/.bin/vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "IDIP bridge fills ocgroups from held credentials (DDR 0179 parity)": "internal/idp/storage.go setUserinfo appends id.Claims.Komitis (bare slugs) to ocgroups, byte-identical to kanidm AddFilesKomitiClaimMap", "an operator carries [admin, <slug>...] and a plain member carries [<slug>...] (files door opens without operator rights)": "internal/idp/seam_test.go TestSeam_ActiveMember_CodeFlowAndClaims (admin+taiao) and TestSetUserinfo_MemberKomiti_ReachesFilesDoor (member komiti, no admin)", "the credential-claim / credential-claim-gone drive legs arm": "journey.idip.spec.ts prechecks flipped to () => true; gone-leg corrected to assert the bare slug's absence; CLAIM_LEGS_AWAIT skip constant removed" }, "summary": "IDIP bridge now fills ocgroups from held komiti so a credential opens the Nextcloud files door, the DDR 0179 parity the kanidm path already had.", "blockers": [] } ``` </details>

close-report for #1104 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1104,
  "status": "success",
  "commits": [
    "322eafa0"
  ],
  "changed_files": [
    "internal/idp/storage.go",
    "internal/idp/seam_test.go",
    "app/tests/e2e/journey.idip.spec.ts",
    "app/tests/e2e/fixtures/idip.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c sh -c 'go build ./... && go vet ./internal/idp/'",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vitest run tests/e2e/fixtures/idip.test.ts",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vue-tsc -p tsconfig.json --noEmit",
      "exit_code": 0
    }
  ],
  "criteria": {
    "IDIP bridge fills ocgroups from held credentials (DDR 0179 parity)": "internal/idp/storage.go setUserinfo appends id.Claims.Komitis (bare slugs) to ocgroups, byte-identical to kanidm AddFilesKomitiClaimMap",
    "an operator carries [admin, <slug>...] and a plain member carries [<slug>...] (files door opens without operator rights)": "internal/idp/seam_test.go TestSeam_ActiveMember_CodeFlowAndClaims (admin+taiao) and TestSetUserinfo_MemberKomiti_ReachesFilesDoor (member komiti, no admin)",
    "the credential-claim / credential-claim-gone drive legs arm": "journey.idip.spec.ts prechecks flipped to () => true; gone-leg corrected to assert the bare slug's absence; CLAIM_LEGS_AWAIT skip constant removed"
  },
  "summary": "IDIP bridge now fills ocgroups from held komiti so a credential opens the Nextcloud files door, the DDR 0179 parity the kanidm path already had.",
  "blockers": []
}
**close-report** for #1104 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1104, "status": "success", "commits": [ "322eafa0" ], "changed_files": [ "internal/idp/storage.go", "internal/idp/seam_test.go", "app/tests/e2e/journey.idip.spec.ts", "app/tests/e2e/fixtures/idip.ts", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/idp/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c sh -c 'go build ./... && go vet ./internal/idp/'", "exit_code": 0 }, { "command": "node_modules/.bin/vitest run tests/e2e/fixtures/idip.test.ts", "exit_code": 0 }, { "command": "node_modules/.bin/vue-tsc -p tsconfig.json --noEmit", "exit_code": 0 } ], "criteria": { "IDIP bridge fills ocgroups from held credentials (DDR 0179 parity)": "internal/idp/storage.go setUserinfo appends id.Claims.Komitis (bare slugs) to ocgroups, byte-identical to kanidm AddFilesKomitiClaimMap", "an operator carries [admin, <slug>...] and a plain member carries [<slug>...] (files door opens without operator rights)": "internal/idp/seam_test.go TestSeam_ActiveMember_CodeFlowAndClaims (admin+taiao) and TestSetUserinfo_MemberKomiti_ReachesFilesDoor (member komiti, no admin)", "the credential-claim / credential-claim-gone drive legs arm": "journey.idip.spec.ts prechecks flipped to () => true; gone-leg corrected to assert the bare slug's absence; CLAIM_LEGS_AWAIT skip constant removed" }, "summary": "IDIP bridge now fills ocgroups from held komiti so a credential opens the Nextcloud files door, the DDR 0179 parity the kanidm path already had.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
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
Matou/idss#1104
No description provided.