research: how service access can require presentation of a specific credential (IDIP) #1063

Closed
opened 2026-08-31 06:14:04 +00:00 by ben · 1 comment
Owner

Question

On the IDIP path, how can access to a service require presentation of a specific credential — not just "is a member", but "holds credential X issued by this community" — and what does that make of the service × komiti matrix (ADR 0076)?

Asked by Ben, 2026-08-31 (this session). Research ticket: the output is a findings doc + options + a recommendation for a ruling, not code.

What we have today

  • Membership + committee ACDCs from the community group AID (ADR 0196); the bridge (idss-idp, internal/idp/) verifies a KERI challenge + membership-ACDC presentation at sign-in, and mirrors committee credentials into the OIDC groups claim as committee:<slug>. Every refresh re-checks IsIssued against the TEL (issuer-side; a verifier agent never learns revocation — prototype #732).
  • The auth gate (ADR 0074/0076) enforces suspension + the service × komiti matrix per browser request, reading the token's groups. It is IdP-blind by design (ADR 0016 seam).
  • So "service requires credential X" is already expressible as a matrix row keyed on committee:<slug> — but presentation happens once, at sign-in, and the gate trusts the claim for the token's lifetime (1 h access / 30 d rotating refresh, ADR 0196).

What to investigate (options to weigh, not pre-decided)

  1. Claims-in-token (status quo, made explicit). Matrix keyed on committee:<slug>; the credential is presented at sign-in, revocation bites at next refresh (≤1 h) + gate session kill. Cheapest; is it enough? What does "presentation" mean to the community if it's implicit?
  2. Per-service presentation at the door (step-up). The gate, on a matrix-restricted service, redirects to the bridge with a scope/acr naming the required credential; the bridge runs an IPEX presentation of that ACDC (internal/idp/keri_verifier.go) and checks its TEL state live before issuing a service-scoped token. Costs: a second ceremony per service per session; is that a signify challenge (key press) or a full re-sign-in? What does the member see (DDR 0172's refusal surface + a "present your credential" screen)?
  3. Direct TEL check at the gate. The gate (or bridge) queries the registry TEL for the credential SAID on each request/refresh rather than trusting the claim — ADR 0198's noted-not-ruled hardening spike ("a raw TEL read over KERIA's public CESR routes"). Freshness without a member-facing ceremony.
  4. Service-native verification. Which catalogue services could verify an ACDC themselves? (Expect: none of Nextcloud/Forgejo/Mattermost/Jitsi — record it, so the gate stays the one place.)
  5. Client-protocol paths (WebDAV/S3, ADR 0074 exempt) — credential-requiring access there means reconciler-provisioned app credentials only for holders; confirm nothing new.

For each: revocation latency, member-facing ceremony cost, what changes in the gate (must stay IdP-blind or the ADR 0016 seam breaks), what changes in the bridge, whether the kanidm path needs a parity story (probably: the matrix stays komiti-keyed there; the word differs, the gate row is the same shape).

Deliverables

  • docs/research/<date>-idip-credential-gated-service-access.md: findings against primary sources (KERI/ACDC/IPEX specs, signify-ts/KERIA API, our internal/idp + gate code), the option table above filled in, and a proposed default ruling for Ben (ADR 0174: a ruling ticket carries its proposal).
  • If the recommendation is option 2 or 3: the design-tier next step named (grill → DDR → spec), and the seam tests it would need.
  • Feeds #1061's "what the matrix becomes" question — file the ruling as a comment there too.

Why session (not swarm)

Research run (/research) against external specs + a live IDIP gateway for the TEL-route probe (matou-workstation holds the standing IDIP community from #1054). No Ben hands needed until the ruling.

  • #1061, #1062; ADRs 0016, 0074, 0076, 0196, 0198; prototype #732; spike spikes/890-idip-verifier; DDR 0172/0173.
## Question On the **IDIP path**, how can access to a service **require presentation of a specific credential** — not just "is a member", but "holds credential X issued by this community" — and what does that make of the service × komiti matrix (ADR 0076)? Asked by Ben, 2026-08-31 (this session). Research ticket: the output is a findings doc + options + a recommendation for a ruling, not code. ## What we have today - **Membership + committee ACDCs** from the community group AID (ADR 0196); the bridge (`idss-idp`, `internal/idp/`) verifies a KERI challenge + membership-ACDC presentation at **sign-in**, and mirrors committee credentials into the OIDC `groups` claim as `committee:<slug>`. Every refresh re-checks `IsIssued` against the TEL (issuer-side; a verifier agent never learns revocation — prototype #732). - **The auth gate** (ADR 0074/0076) enforces suspension + the service × komiti matrix per browser request, reading the token's groups. It is IdP-blind by design (ADR 0016 seam). - So "service requires credential X" is *already expressible* as a matrix row keyed on `committee:<slug>` — but presentation happens **once, at sign-in**, and the gate trusts the claim for the token's lifetime (1 h access / 30 d rotating refresh, ADR 0196). ## What to investigate (options to weigh, not pre-decided) 1. **Claims-in-token (status quo, made explicit).** Matrix keyed on `committee:<slug>`; the credential is presented at sign-in, revocation bites at next refresh (≤1 h) + gate session kill. Cheapest; is it *enough*? What does "presentation" mean to the community if it's implicit? 2. **Per-service presentation at the door (step-up).** The gate, on a matrix-restricted service, redirects to the bridge with a scope/`acr` naming the required credential; the bridge runs an IPEX presentation of *that* ACDC (`internal/idp/keri_verifier.go`) and checks its TEL state live before issuing a service-scoped token. Costs: a second ceremony per service per session; is that a signify challenge (key press) or a full re-sign-in? What does the member see (DDR 0172's refusal surface + a "present your credential" screen)? 3. **Direct TEL check at the gate.** The gate (or bridge) queries the registry TEL for the credential SAID on each request/refresh rather than trusting the claim — ADR 0198's noted-not-ruled hardening spike ("a raw TEL read over KERIA's public CESR routes"). Freshness without a member-facing ceremony. 4. **Service-native verification.** Which catalogue services could verify an ACDC themselves? (Expect: none of Nextcloud/Forgejo/Mattermost/Jitsi — record it, so the gate stays the one place.) 5. **Client-protocol paths** (WebDAV/S3, ADR 0074 exempt) — credential-requiring access there means reconciler-provisioned app credentials only for holders; confirm nothing new. For each: revocation latency, member-facing ceremony cost, what changes in the gate (must stay IdP-blind or the ADR 0016 seam breaks), what changes in the bridge, whether the kanidm path needs a parity story (probably: the matrix stays komiti-keyed there; the *word* differs, the gate row is the same shape). ## Deliverables - `docs/research/<date>-idip-credential-gated-service-access.md`: findings against primary sources (KERI/ACDC/IPEX specs, signify-ts/KERIA API, our `internal/idp` + gate code), the option table above filled in, and a **proposed default ruling** for Ben (ADR 0174: a ruling ticket carries its proposal). - If the recommendation is option 2 or 3: the design-tier next step named (grill → DDR → spec), and the seam tests it would need. - Feeds #1061's "what the matrix becomes" question — file the ruling as a comment there too. ## Why session (not swarm) Research run (`/research`) against external specs + a live IDIP gateway for the TEL-route probe (matou-workstation holds the standing IDIP community from #1054). No Ben hands needed until the ruling. <!-- session-host: matou-workstation --> ## Related - #1061, #1062; ADRs 0016, 0074, 0076, 0196, 0198; prototype #732; spike `spikes/890-idip-verifier`; DDR 0172/0173.
Author
Owner

RULED — option 1 (Ben, 2026-09-02): a live roster check at the gate, never a presentation ceremony

ADR 0222 (docs/adr/0222-service-access-checks-the-roster-not-a-presented-credential.md) records it. The two facts that decided it:

  1. The gate already asks live. GateDecision reads deny list + matrix + standing per request — it never trusts token claims, so option 1's supposed weakness (revocation latency) doesn't exist. This ticket's own framing ("the gate trusts the claim for the token's lifetime") was wrong; the token matters only for the service's inner roles (ocgroups).
  2. At the community's own door, the verifier IS the issuer. Presenting an ACDC back to the body that issued it and holds its registry proves nothing that body doesn't already know. Presentation (option 2) earns its keep only for an external verifier — deferred as its own future feature, not rejected. Option 3 (raw TEL read at the gate) stays ADR 0198's hardening spike; option 4 recorded closed: no catalogue service can verify an ACDC, the gate stays the one place.

Finding from the wiring (worse than the half-wired picture #1104 painted): WithAuthGate is handed the kanidm-path members orchestrator on BOTH paths (control-plane/cmd/control-plane/main.go), and its holder lookup reads kanidm's directory — nothing reads the IDIP roster. So the matrix is currently unenforceable on IDIP entirely, not just missing the inner door.

The wiring the ruling names (three edits, all rekeying existing shapes):

  1. the gate's holder lookup reads the IDIP roster (same interface, credential-holder answer);
  2. the bridge fills ocgroups from held credentials — #1104 (safe to build: the answer is claims, not presentation);
  3. the credential detail screen grows the restrict/open surface — wireframed now in p6-s7i-credential-detail.html (inline picker, the built KomitiDetailScreen contract: set-open-*/set-restricted-*, restrict additive), flow edge added to p6-members-idip.mermaid.

Deliverable deviation, stated plainly: no separate docs/research/ findings doc was minted — the investigation ran against the code in-session and the option table folded into ADR 0222's Context/Consequences, which is the durable record. Closing.

## RULED — option 1 (Ben, 2026-09-02): a live roster check at the gate, never a presentation ceremony **ADR 0222** (`docs/adr/0222-service-access-checks-the-roster-not-a-presented-credential.md`) records it. The two facts that decided it: 1. **The gate already asks live.** `GateDecision` reads deny list + matrix + standing per request — it never trusts token claims, so option 1's supposed weakness (revocation latency) doesn't exist. This ticket's own framing ("the gate trusts the claim for the token's lifetime") was wrong; the token matters only for the service's *inner* roles (`ocgroups`). 2. **At the community's own door, the verifier IS the issuer.** Presenting an ACDC back to the body that issued it and holds its registry proves nothing that body doesn't already know. Presentation (option 2) earns its keep only for an *external* verifier — deferred as its own future feature, not rejected. Option 3 (raw TEL read at the gate) stays ADR 0198's hardening spike; option 4 recorded closed: no catalogue service can verify an ACDC, the gate stays the one place. **Finding from the wiring (worse than the half-wired picture #1104 painted):** `WithAuthGate` is handed the kanidm-path members orchestrator on BOTH paths (`control-plane/cmd/control-plane/main.go`), and its holder lookup reads kanidm's directory — nothing reads the IDIP roster. So the matrix is currently unenforceable on IDIP entirely, not just missing the inner door. **The wiring the ruling names (three edits, all rekeying existing shapes):** 1. the gate's holder lookup reads the IDIP roster (same interface, credential-holder answer); 2. the bridge fills `ocgroups` from held credentials — #1104 (safe to build: the answer is claims, not presentation); 3. the credential detail screen grows the restrict/open surface — wireframed now in `p6-s7i-credential-detail.html` (inline picker, the built `KomitiDetailScreen` contract: `set-open-*`/`set-restricted-*`, restrict additive), flow edge added to `p6-members-idip.mermaid`. **Deliverable deviation, stated plainly:** no separate `docs/research/` findings doc was minted — the investigation ran against the code in-session and the option table folded into ADR 0222's Context/Consequences, which is the durable record. Closing.
ben closed this issue 2026-09-02 05:36:17 +00:00
Sign in to join this conversation.
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
Matou/idss#1063
No description provided.