IDIP: the auth gate answers restricted services from the credential roster (ADR 0222 edit 1) #1155

Closed
opened 2026-09-02 19:00:15 +00:00 by ben · 2 comments
Owner

Parent

ADR 0222 (ruled #1063, 2026-09-02) — wiring edit 1 of 3. Design contract: docs/ux/wireframes/p6-members-idip/p6-s7i-credential-detail.html (the matrix-note's promise is what this ticket makes true).

What to build

On an IDIP community, restricting a service to holders of a credential actually bites: a member holding it reaches the service, a member without it gets the honest refusal page, and a revocation closes the door on the holder's next request — no re-login, no deploy.

Today the auth gate's GateDecision is handed the kanidm-path members orchestrator on both paths (WithAuthGate(c.mem, …) in the control-plane composition), and its holder lookup reads kanidm's directory — nothing reads the IDIP roster, so a restricted matrix row on IDIP refuses everyone (and the deny-list/suspend half never sees IDIP either). The gate must stay IdP-blind (ADR 0016): it asks an interface; which roster answers is the composition root's business.

The credential answer is the receipt-gated one the steward surfaces already trust (#1098's shape): live membership + the named credential standing, from the community's own registry mirror — an errored read refuses the act and says so, never guesses (ADR 0100).

Acceptance criteria

  • On the IDIP path the gate answers a restricted service from the credential roster: holder → allow (reason names the credential), non-holder live member → the refusal, suspended member → refused everywhere (suspend revokes Membership, so the deny half rides the same roster read)
  • Stewards are never locked out of a restricted service; the admin pseudo-service stays operators/stewards-only on IDIP
  • Default stays open-to-all: a service with no matrix row reaches every live member (ADR 0076)
  • A roster read failure refuses with the honest unknown answer, never allows (ADR 0100); the kanidm path's behaviour is byte-for-byte untouched
  • Composition-root wiring pin: the IDIP substrate never silently reverts to the kanidm-only gate (the #1094 lesson — a test in control-plane/cmd/control-plane asserting what the wiring produces)
  • Seam tests at the gate seam (the GateDecision/authgate test pattern), no live KERIA needed

Blocked by

None — can start immediately.

## Parent ADR 0222 (ruled #1063, 2026-09-02) — wiring edit 1 of 3. Design contract: `docs/ux/wireframes/p6-members-idip/p6-s7i-credential-detail.html` (the matrix-note's promise is what this ticket makes true). ## What to build On an IDIP community, restricting a service to holders of a credential actually bites: a member holding it reaches the service, a member without it gets the honest refusal page, and a revocation closes the door on the holder's next request — no re-login, no deploy. Today the auth gate's `GateDecision` is handed the kanidm-path members orchestrator on **both** paths (`WithAuthGate(c.mem, …)` in the control-plane composition), and its holder lookup reads kanidm's directory — nothing reads the IDIP roster, so a restricted matrix row on IDIP refuses everyone (and the deny-list/suspend half never sees IDIP either). The gate must stay IdP-blind (ADR 0016): it asks an interface; which roster answers is the composition root's business. The credential answer is the receipt-gated one the steward surfaces already trust (#1098's shape): live membership + the named credential standing, from the community's own registry mirror — an errored read refuses the act and says so, never guesses (ADR 0100). ## Acceptance criteria - [ ] On the IDIP path the gate answers a restricted service from the credential roster: holder → allow (reason names the credential), non-holder live member → the refusal, suspended member → refused everywhere (suspend revokes Membership, so the deny half rides the same roster read) - [ ] Stewards are never locked out of a restricted service; the `admin` pseudo-service stays operators/stewards-only on IDIP - [ ] Default stays open-to-all: a service with no matrix row reaches every live member (ADR 0076) - [ ] A roster read failure refuses with the honest unknown answer, never allows (ADR 0100); the kanidm path's behaviour is byte-for-byte untouched - [ ] Composition-root wiring pin: the IDIP substrate never silently reverts to the kanidm-only gate (the #1094 lesson — a test in `control-plane/cmd/control-plane` asserting what the wiring produces) - [ ] Seam tests at the gate seam (the `GateDecision`/authgate test pattern), no live KERIA needed ## Blocked by None — can start immediately.

swarm-claim host=elitebook-distributed-server-03 run=16683
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=elitebook-distributed-server-03 run=16683 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1155 — status success

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

envelope
{
  "issue": 1155,
  "status": "success",
  "commits": [
    "07a8c8216ea34b00c43f80b8765545bc85e7df4c"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/idip_gate_wiring_test.go",
    "control-plane/cmd/control-plane/main.go",
    "internal/controlapi/idip_gate.go",
    "internal/controlapi/idip_gate_test.go",
    "internal/keria/gateroster.go",
    "internal/keria/gateroster_test.go"
  ],
  "tests": [
    {
      "command": "go test ./internal/controlapi/... ./internal/keria/... ./control-plane/cmd/control-plane/...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/controlapi/... ./internal/keria/... ./control-plane/cmd/control-plane/...",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "On the IDIP path the gate answers a restricted service from the credential roster (holder allow naming the credential; non-holder live member refused; suspended member refused everywhere)": "internal/controlapi/idip_gate.go GateDecision (restricted branch matches keria.GateRoster held slugs; deny + not-live paths); proven by TestIdipGate_RestrictedServiceReadsCredentialRoster and TestIdipGate_NotLiveMemberRefusedEverywhere in internal/controlapi/idip_gate_test.go, and TestGateRoster_SuspendedAndRemovedReadNotLive in internal/keria/gateroster_test.go",
    "Stewards are never locked out of a restricted service; admin pseudo-service stays operators/stewards-only on IDIP": "idip_gate.go admin branch + operator fallback on the restricted path; TestIdipGate_StewardsNeverLockedOut",
    "Default stays open-to-all: a service with no matrix row reaches every live member (ADR 0076)": "idip_gate.go restrictingPolicy + default-open branch; TestIdipGate_DefaultOpenToAllLiveMembers",
    "A roster read failure refuses with the honest unknown answer, never allows (ADR 0100); the kanidm path is byte-for-byte untouched": "idip_gate.go returns the read error on every path (never allow); TestIdipGate_ReadFailureRefusesNeverAllows and TestIdipGate_MisWiredRefuses; kanidm untouched via authGateDecider(c.mem, idip.gateDecider) selecting c.mem off the IDIP path (main.go)",
    "Composition-root wiring pin: the IDIP substrate never silently reverts to the kanidm-only gate (test in control-plane/cmd/control-plane)": "control-plane/cmd/control-plane/idip_gate_wiring_test.go TestAuthGateDecider_SelectsIDIPOverKanidm, TestProductionIdip_WiresRosterBackedGate, TestProductionIdip_RestsGateOffIDIPPath",
    "Seam tests at the gate seam (the GateDecision/authgate test pattern), no live KERIA needed": "internal/controlapi/idip_gate_test.go uses a fakeGateRoster + gateOperators + member.FakeAccessMatrix — no live KERIA"
  },
  "summary": "The IDIP auth gate answers restricted services from the community's credential roster via a new IdP-blind IdipGateDecider, wired on the IDIP path only, with kanidm untouched.",
  "blockers": []
}
**close-report** for #1155 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1155, "status": "success", "commits": [ "07a8c8216ea34b00c43f80b8765545bc85e7df4c" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/idip_gate_wiring_test.go", "control-plane/cmd/control-plane/main.go", "internal/controlapi/idip_gate.go", "internal/controlapi/idip_gate_test.go", "internal/keria/gateroster.go", "internal/keria/gateroster_test.go" ], "tests": [ { "command": "go test ./internal/controlapi/... ./internal/keria/... ./control-plane/cmd/control-plane/...", "exit_code": 0 }, { "command": "go vet ./internal/controlapi/... ./internal/keria/... ./control-plane/cmd/control-plane/...", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 } ], "criteria": { "On the IDIP path the gate answers a restricted service from the credential roster (holder allow naming the credential; non-holder live member refused; suspended member refused everywhere)": "internal/controlapi/idip_gate.go GateDecision (restricted branch matches keria.GateRoster held slugs; deny + not-live paths); proven by TestIdipGate_RestrictedServiceReadsCredentialRoster and TestIdipGate_NotLiveMemberRefusedEverywhere in internal/controlapi/idip_gate_test.go, and TestGateRoster_SuspendedAndRemovedReadNotLive in internal/keria/gateroster_test.go", "Stewards are never locked out of a restricted service; admin pseudo-service stays operators/stewards-only on IDIP": "idip_gate.go admin branch + operator fallback on the restricted path; TestIdipGate_StewardsNeverLockedOut", "Default stays open-to-all: a service with no matrix row reaches every live member (ADR 0076)": "idip_gate.go restrictingPolicy + default-open branch; TestIdipGate_DefaultOpenToAllLiveMembers", "A roster read failure refuses with the honest unknown answer, never allows (ADR 0100); the kanidm path is byte-for-byte untouched": "idip_gate.go returns the read error on every path (never allow); TestIdipGate_ReadFailureRefusesNeverAllows and TestIdipGate_MisWiredRefuses; kanidm untouched via authGateDecider(c.mem, idip.gateDecider) selecting c.mem off the IDIP path (main.go)", "Composition-root wiring pin: the IDIP substrate never silently reverts to the kanidm-only gate (test in control-plane/cmd/control-plane)": "control-plane/cmd/control-plane/idip_gate_wiring_test.go TestAuthGateDecider_SelectsIDIPOverKanidm, TestProductionIdip_WiresRosterBackedGate, TestProductionIdip_RestsGateOffIDIPPath", "Seam tests at the gate seam (the GateDecision/authgate test pattern), no live KERIA needed": "internal/controlapi/idip_gate_test.go uses a fakeGateRoster + gateOperators + member.FakeAccessMatrix — no live KERIA" }, "summary": "The IDIP auth gate answers restricted services from the community's credential roster via a new IdP-blind IdipGateDecider, wired on the IDIP path only, with kanidm untouched.", "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.

Reference
Matou/idss#1155
No description provided.