administrator 2/8 — one decider over the verified claims, accepting either the credential or the legacy role (#1948) #1950

Closed
opened 2026-09-28 03:04:53 +00:00 by matou-build-agent · 2 comments

Parent

What to build

One predicate answers does this identity administer this community, from
the verified claim set the door already mints — and every site that asks calls
it: the panel's authorization, the bridge's claim minting, the spaces check, and
#1535's roles reconciler when it is built. Today that question is answered in
four places from two sources that can disagree, which is how role became
incoherent.

This is the expand half of the change: the predicate accepts either the
administrator credential or the legacy role: operator. So holding the
credential now grants everything the role granted, every existing community
keeps working unchanged, and nothing has to be migrated on a deadline. The
contract half — deleting role — is 8/8.

The credential's slug rides sign-in as a verified claim through the path that
already carries credential slugs to every door. No new claim mechanism, no
trusted header, no new door check.

Acceptance criteria

  • Given a member holding a live Administrator credential, when any site asks whether they administer the community, then the predicate answers yes — for the panel's authz, the bridge's claims and the spaces check alike.
  • Given a member holding only role: operator, when the same question is asked, then it still answers yes (the expand phase honours both).
  • Given a member holding neither, when the question is asked, then it answers no.
  • Given a revoked Administrator credential, when the question is asked, then it answers no.
  • Given a signed-in holder, when their session's claims are inspected, then the administrator slug is carried as a verified claim.
  • Given the four read sites, when the change lands, then none of them compares a role attribute itself — each calls the predicate.
  • Given any existing community, when it is exercised end to end, then its behaviour is unchanged by this ticket.
  • Proven at internal/controlapi's gate/authz tests and internal/idp's claim tests, plus a unit test of the predicate where it lives.

Blocked by

  • 1/8 — the credential must exist before holding it can mean anything.

Task manifest

task: one-decider-expand
implements_flow: administrator-credential
implements_edge: "D1 -> A1 (signs in holding Administrator)"
wireframe: docs/ux/wireframes/administrator-credential/ac-a1-the-control-panel.html
interface: |
  HoldsAdministrator(claims) bool   # one truth, over the verified claim set
  expand phase: holds the administrator slug OR carries the legacy role: operator
  callers: controlapi authz, idp claim minting, controlapi spaces, #1535's reconciler
seam: internal/controlapi gate/authz tests + internal/idp claim tests + the predicate's unit test
acceptance:
  - given: a holder of a live Administrator credential
    when: any site asks
    then: the predicate answers yes
  - given: a member holding only role operator
    when: the same question is asked
    then: it still answers yes during expand
  - given: a revoked credential
    when: the question is asked
    then: it answers no
depends_on: [administrator-builtin-definition]
out_of_scope:
  - deleting role (8/8)
  - "#1535's per-service tranches (this changes only what the reconciler keys on)"
needs_human_decision: []

Ticketed by /to-tickets from spec #1948 (ADR 0286); granularity, the cross-repo edge and the cut-over guard confirmed with Ben 2026-09-28. Slice-map skipped at his call — one feature, no cross-feature coupling left to find.

🤖 Generated with Claude Code

https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY

## Parent - **Spec:** [#1948 — the Administrator credential replaces the operator role](https://git.matou.nz/Matou/idss/issues/1948) (stories 11, 21, 22 (expand half)) - **Design:** ADR 0286 d.2, d.3, d.10, d.11 · flow `docs/ux/flows/administrator-credential.mermaid` - **Wayfinder map:** #1293 ## What to build **One predicate** answers *does this identity administer this community*, from the verified claim set the door already mints — and every site that asks calls it: the panel's authorization, the bridge's claim minting, the spaces check, and #1535's roles reconciler when it is built. Today that question is answered in four places from two sources that can disagree, which is how `role` became incoherent. This is the **expand** half of the change: the predicate accepts **either** the `administrator` credential **or** the legacy `role: operator`. So holding the credential now grants everything the role granted, every existing community keeps working unchanged, and nothing has to be migrated on a deadline. The contract half — deleting `role` — is 8/8. The credential's slug rides sign-in as a verified claim through the path that already carries credential slugs to every door. No new claim mechanism, no trusted header, no new door check. ## Acceptance criteria - [ ] **Given** a member holding a live Administrator credential, **when** any site asks whether they administer the community, **then** the predicate answers yes — for the panel's authz, the bridge's claims and the spaces check alike. - [ ] **Given** a member holding only `role: operator`, **when** the same question is asked, **then** it still answers yes (the expand phase honours both). - [ ] **Given** a member holding neither, **when** the question is asked, **then** it answers no. - [ ] **Given** a revoked Administrator credential, **when** the question is asked, **then** it answers no. - [ ] **Given** a signed-in holder, **when** their session's claims are inspected, **then** the `administrator` slug is carried as a verified claim. - [ ] **Given** the four read sites, **when** the change lands, **then** none of them compares a role attribute itself — each calls the predicate. - [ ] **Given** any existing community, **when** it is exercised end to end, **then** its behaviour is unchanged by this ticket. - [ ] Proven at `internal/controlapi`'s gate/authz tests and `internal/idp`'s claim tests, plus a unit test of the predicate where it lives. ## Blocked by - 1/8 — the credential must exist before holding it can mean anything. ## Task manifest ```yaml task: one-decider-expand implements_flow: administrator-credential implements_edge: "D1 -> A1 (signs in holding Administrator)" wireframe: docs/ux/wireframes/administrator-credential/ac-a1-the-control-panel.html interface: | HoldsAdministrator(claims) bool # one truth, over the verified claim set expand phase: holds the administrator slug OR carries the legacy role: operator callers: controlapi authz, idp claim minting, controlapi spaces, #1535's reconciler seam: internal/controlapi gate/authz tests + internal/idp claim tests + the predicate's unit test acceptance: - given: a holder of a live Administrator credential when: any site asks then: the predicate answers yes - given: a member holding only role operator when: the same question is asked then: it still answers yes during expand - given: a revoked credential when: the question is asked then: it answers no depends_on: [administrator-builtin-definition] out_of_scope: - deleting role (8/8) - "#1535's per-service tranches (this changes only what the reconciler keys on)" needs_human_decision: [] ``` --- *Ticketed by `/to-tickets` from spec [#1948](https://git.matou.nz/Matou/idss/issues/1948) (ADR 0286); granularity, the cross-repo edge and the cut-over guard confirmed with Ben 2026-09-28. Slice-map skipped at his call — one feature, no cross-feature coupling left to find.* 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY
Author
Member

swarm-claim host=bens-mac-04 run=34724
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=34724 (automated multi-host claim — lowest live claim id works this ticket)
Author
Member

close-report for #1950 — status success

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

envelope
{
  "issue": 1950,
  "status": "success",
  "commits": [
    "aaf896ec98fa825cc65881ea5c519b76944b7d96"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/controlapi/idip_gate.go",
    "internal/controlapi/idip_gate_test.go",
    "internal/controlapi/spaces.go",
    "internal/credschema/administrator.go",
    "internal/credschema/administrator_test.go",
    "internal/idp/administrator_claims_test.go",
    "internal/idp/storage.go",
    "internal/idp/verifier.go",
    "internal/keria/definitions.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go test ./internal/credschema/ ./internal/keria/ ./internal/idp/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./internal/credschema/... ./internal/keria/... ./internal/idp/... ./internal/controlapi/...",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Given a member holding a live Administrator credential, when any site asks whether they administer, then the predicate answers yes — panel authz, bridge claims, spaces alike": "credschema.HoldsAdministrator (internal/credschema/administrator.go) returns true on the administrator slug in the held set. Panel authz: internal/controlapi/idip_gate.go admin + restricted branches call it over Standing's held slugs (TestIdipGate_AdministratorCredentialGrantsThePanel). Bridge claims: internal/idp/verifier.go Groups() + storage.go setUserinfo call it over Claims.Komitis (TestSeam_IDIPClaims_AdministratorCredentialCarriesOperatorRole). Spaces: internal/controlapi/spaces.go proofAuthed calls it (see reason for the presented-verdict limitation, carried as unproven-by-seam).",
    "Given a member holding only role: operator, when the same question is asked, then it still answers yes (expand honours both)": "HoldsAdministrator's legacyOperator arm; TestHoldsAdministrator, TestGroups_AdministratorCredentialOrLegacyRoleGrantsOperators (legacy case), TestIdipGate_AdministratorCredentialGrantsThePanel (Elegacy).",
    "Given a member holding neither, when the question is asked, then it answers no": "TestHoldsAdministrator (neither case), TestGroups_...(plain case), TestIdipGate_...(Eplain refused with GateReasonOperatorsOnly).",
    "Given a revoked Administrator credential, when the question is asked, then it answers no": "A revoked credential is absent from the live held set (keria RosterEntry.committees() returns only issued() slugs), so the predicate's slug loop never matches — TestHoldsAdministrator 'revoked absent' case; at the gate seam Eplain (not in held) is the same refusal.",
    "Given a signed-in holder, when their session's claims are inspected, then the administrator slug is carried as a verified claim": "internal/idp: TestSeam_IDIPClaims_AdministratorCredentialCarriesOperatorRole asserts committee:administrator on `groups` and the bare administrator slug on `ocgroups` — the existing credential-slug path (#1949's generic issuance), no new mechanism.",
    "Given the four read sites, when the change lands, then none compares a role attribute itself — each calls the predicate": "idp/verifier.go, idp/storage.go, controlapi/idip_gate.go (admin + restricted), controlapi/spaces.go all call credschema.HoldsAdministrator; the fourth caller (#1535's roles reconciler) is OWED — see binds owed_by.",
    "Given any existing community, when exercised end to end, then its behaviour is unchanged by this ticket": "Expand phase preserves legacy role: operator at every routed site; full `go test ./...` green (nothing else changed behaviour).",
    "Proven at internal/controlapi gate/authz tests and internal/idp claim tests, plus a unit test of the predicate where it lives": "internal/controlapi/idip_gate_test.go, internal/idp/administrator_claims_test.go, internal/credschema/administrator_test.go."
  },
  "binds": [
    {
      "symbol": "HoldsAdministrator",
      "defined_in": "internal/credschema/administrator.go"
    }
  ],
  "summary": "The one decider credschema.HoldsAdministrator over the verified claim set, expand phase (credential OR legacy role: operator), with the bridge's claim minting, the panel's authz and the spaces door routed through it.",
  "blockers": []
}
**close-report** for #1950 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1950, "status": "success", "commits": [ "aaf896ec98fa825cc65881ea5c519b76944b7d96" ], "changed_files": [ "STATUS.md", "internal/controlapi/idip_gate.go", "internal/controlapi/idip_gate_test.go", "internal/controlapi/spaces.go", "internal/credschema/administrator.go", "internal/credschema/administrator_test.go", "internal/idp/administrator_claims_test.go", "internal/idp/storage.go", "internal/idp/verifier.go", "internal/keria/definitions.go" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go test ./internal/credschema/ ./internal/keria/ ./internal/idp/ ./internal/controlapi/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./internal/credschema/... ./internal/keria/... ./internal/idp/... ./internal/controlapi/...", "exit_code": 0 } ], "criteria": { "Given a member holding a live Administrator credential, when any site asks whether they administer, then the predicate answers yes — panel authz, bridge claims, spaces alike": "credschema.HoldsAdministrator (internal/credschema/administrator.go) returns true on the administrator slug in the held set. Panel authz: internal/controlapi/idip_gate.go admin + restricted branches call it over Standing's held slugs (TestIdipGate_AdministratorCredentialGrantsThePanel). Bridge claims: internal/idp/verifier.go Groups() + storage.go setUserinfo call it over Claims.Komitis (TestSeam_IDIPClaims_AdministratorCredentialCarriesOperatorRole). Spaces: internal/controlapi/spaces.go proofAuthed calls it (see reason for the presented-verdict limitation, carried as unproven-by-seam).", "Given a member holding only role: operator, when the same question is asked, then it still answers yes (expand honours both)": "HoldsAdministrator's legacyOperator arm; TestHoldsAdministrator, TestGroups_AdministratorCredentialOrLegacyRoleGrantsOperators (legacy case), TestIdipGate_AdministratorCredentialGrantsThePanel (Elegacy).", "Given a member holding neither, when the question is asked, then it answers no": "TestHoldsAdministrator (neither case), TestGroups_...(plain case), TestIdipGate_...(Eplain refused with GateReasonOperatorsOnly).", "Given a revoked Administrator credential, when the question is asked, then it answers no": "A revoked credential is absent from the live held set (keria RosterEntry.committees() returns only issued() slugs), so the predicate's slug loop never matches — TestHoldsAdministrator 'revoked absent' case; at the gate seam Eplain (not in held) is the same refusal.", "Given a signed-in holder, when their session's claims are inspected, then the administrator slug is carried as a verified claim": "internal/idp: TestSeam_IDIPClaims_AdministratorCredentialCarriesOperatorRole asserts committee:administrator on `groups` and the bare administrator slug on `ocgroups` — the existing credential-slug path (#1949's generic issuance), no new mechanism.", "Given the four read sites, when the change lands, then none compares a role attribute itself — each calls the predicate": "idp/verifier.go, idp/storage.go, controlapi/idip_gate.go (admin + restricted), controlapi/spaces.go all call credschema.HoldsAdministrator; the fourth caller (#1535's roles reconciler) is OWED — see binds owed_by.", "Given any existing community, when exercised end to end, then its behaviour is unchanged by this ticket": "Expand phase preserves legacy role: operator at every routed site; full `go test ./...` green (nothing else changed behaviour).", "Proven at internal/controlapi gate/authz tests and internal/idp claim tests, plus a unit test of the predicate where it lives": "internal/controlapi/idip_gate_test.go, internal/idp/administrator_claims_test.go, internal/credschema/administrator_test.go." }, "binds": [ { "symbol": "HoldsAdministrator", "defined_in": "internal/credschema/administrator.go" } ], "summary": "The one decider credschema.HoldsAdministrator over the verified claim set, expand phase (credential OR legacy role: operator), with the bridge's claim minting, the panel's authz and the spaces door routed through it.", "blockers": [] } ``` </details>
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.

Reference
Matou/idss#1950
No description provided.