idip-credentials: T1 — credential definitions: store, cards, create (S8i), detail skeleton (S7i) #1078

Closed
opened 2026-08-31 18:33:30 +00:00 by ben · 3 comments
Owner

Parent

Spec #1074 (IDIP Members credentials; DDR 0217). Source ticket #1061.

What to build

A steward on an IDIP community creates a credential (name, description, optional criteria) from the Members tab and sees it as a card beside built-in Membership; opening it shows the empty detail (no holders). Rename changes only the display name. The definitions store (roster-side, unsigned, control-plane state dir — never the config repo) carries name, immutable slug, description, criteria, and the retired flag from day one. No ceremony — nothing is signed until first issue (DDR 0217 rulings 1–3).

Acceptance criteria

  • Creating from S8i shows the slug preview before confirm; the new card appears in S1i's CREDENTIALS section and S7i shows the empty holders state
  • Membership's card reads built-in and its detail offers no rename/delete; every list places it first
  • Rename after first issue changes display only — the stored slug and any anchor records are untouched (adapter seam test)
  • Definitions live in the control-plane state directory beside the roster; a gateway redeploy leaves them untouched
  • Control-API definitions routes refuse unauthenticated and wrong-token callers (contract tests)
  • kanidm-path Members tab byte-identical (branch keys on the roster probe)

Blocked by

None — can start immediately.

Task manifest

task: idip-credentials-credential-definitions
implements_flow: p6-members-idip
implements_edge: "P6-S8i → S7i (defined — empty state)"
wireframe: docs/ux/wireframes/p6-members-idip/p6-s8i-create-credential.html + p6-s7i-credential-detail.html + p6-s1i-members.html (credentials-panel)
seam: keria adapter definitions-store seam tests + control-API contract tests + dashboard thin
depends_on: []
out_of_scope: [credential-gated presentation (#1063), custom fields, kanidm-path changes, rescue engine adapters]
needs_human_decision: []
## Parent Spec #1074 (IDIP Members credentials; DDR 0217). Source ticket #1061. ## What to build A steward on an IDIP community creates a credential (name, description, optional criteria) from the Members tab and sees it as a card beside built-in Membership; opening it shows the empty detail (no holders). Rename changes only the display name. The definitions store (roster-side, unsigned, control-plane state dir — never the config repo) carries name, immutable slug, description, criteria, and the retired flag from day one. No ceremony — nothing is signed until first issue (DDR 0217 rulings 1–3). ## Acceptance criteria - [ ] Creating from S8i shows the slug preview before confirm; the new card appears in S1i's CREDENTIALS section and S7i shows the empty holders state - [ ] Membership's card reads built-in and its detail offers no rename/delete; every list places it first - [ ] Rename after first issue changes display only — the stored slug and any anchor records are untouched (adapter seam test) - [ ] Definitions live in the control-plane state directory beside the roster; a gateway redeploy leaves them untouched - [ ] Control-API definitions routes refuse unauthenticated and wrong-token callers (contract tests) - [ ] kanidm-path Members tab byte-identical (branch keys on the roster probe) ## Blocked by None — can start immediately. ## Task manifest ```yaml task: idip-credentials-credential-definitions implements_flow: p6-members-idip implements_edge: "P6-S8i → S7i (defined — empty state)" wireframe: docs/ux/wireframes/p6-members-idip/p6-s8i-create-credential.html + p6-s7i-credential-detail.html + p6-s1i-members.html (credentials-panel) seam: keria adapter definitions-store seam tests + control-API contract tests + dashboard thin depends_on: [] out_of_scope: [credential-gated presentation (#1063), custom fields, kanidm-path changes, rescue engine adapters] needs_human_decision: [] ```

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

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

Auth-posture note (AC5 "refuse unauthenticated and wrong-token") — ruled by agent under ADR 0174, veto anytime.

AC5's phrasing echoes the roster surface's bridge-read bearer test, but the definitions routes are steward acts the dashboard makes, and the dashboard cannot present the bridge gate secret by construction — the admin front-door route injects the operator identity (X-Idss-Identity), never a bearer. Bearer-gating the definitions routes would therefore make create-from-S8i impossible (contradicting AC1).

So WithIdipCredentials gates on the operator SSO session (operatorAuthed / X-Idss-Identity, the same posture as the logstream/mail steward routes): a caller with no session is 401. At this seam "wrong-token" collapses to "no/blank operator session" — the front door is the sole issuer of the verified identity. This is a two-way door: it tightens the surface (the roster steward routes are ungated), is revertible, and is proven by TestIdipCredentials_RefuseUnauthenticated.

Deferred to their DAG tickets (kept out of this skeleton): issue-to-member / holders (#1079), delete + retire lifecycle (#1084), credential-gated presentation (#1063).

Auth-posture note (AC5 "refuse unauthenticated and wrong-token") — ruled by agent under ADR 0174, veto anytime. AC5's phrasing echoes the roster surface's *bridge-read* bearer test, but the definitions routes are **steward acts** the dashboard makes, and the dashboard cannot present the bridge gate secret by construction — the admin front-door route injects the operator identity (`X-Idss-Identity`), never a bearer. Bearer-gating the definitions routes would therefore make create-from-S8i impossible (contradicting AC1). So `WithIdipCredentials` gates on the **operator SSO session** (`operatorAuthed` / `X-Idss-Identity`, the same posture as the logstream/mail steward routes): a caller with no session is 401. At this seam "wrong-token" collapses to "no/blank operator session" — the front door is the sole issuer of the verified identity. This is a two-way door: it *tightens* the surface (the roster steward routes are ungated), is revertible, and is proven by `TestIdipCredentials_RefuseUnauthenticated`. Deferred to their DAG tickets (kept out of this skeleton): `issue-to-member` / holders (#1079), delete + retire lifecycle (#1084), credential-gated presentation (#1063).

close-report for #1078 — status success

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

envelope
{
  "issue": 1078,
  "status": "success",
  "commits": [
    "900d1bc3"
  ],
  "changed_files": [
    "STATUS.md",
    "control-plane/cmd/control-plane/main.go",
    "dashboard/src/components/members/MembersSurface.vue",
    "dashboard/src/components/members/CredentialsSurface.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/api/idipCredentialsClient.ts",
    "dashboard/src/lib/idipCredentials.ts",
    "dashboard/src/lib/mountRegistry.ts",
    "dashboard/tests/unit/credentialsSurface.test.ts",
    "internal/controlapi/idip_credentials.go",
    "internal/controlapi/idip_credentials_test.go",
    "internal/keria/adapter.go",
    "internal/keria/definitions.go",
    "internal/keria/definitions_test.go",
    "internal/keriawire/wire.go",
    "packages/openapi-spec/openapi.yaml"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/keria/ ./internal/controlapi/ ./internal/keriawire/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./internal/keria/... ./internal/controlapi/...",
      "exit_code": 0
    },
    {
      "command": "node packages/openapi-spec/scripts/generate-client.mjs --check",
      "exit_code": 0
    },
    {
      "command": "CI=true dashboard/node_modules/.bin/vitest run",
      "exit_code": 0
    },
    {
      "command": "dashboard/node_modules/.bin/vue-tsc -p dashboard/tsconfig.json --noEmit",
      "exit_code": 0
    },
    {
      "command": "eslint (changed dashboard files)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Creating from S8i shows the slug preview before confirm; the new card appears in S1i's CREDENTIALS section and S7i shows the empty holders state": "CredentialsSurface.vue S8i create form has data-field=slug-preview computed via slugify (client mirror of keria.Slugify); confirmCreate lands on S7i detail with data-status=holders-empty; back re-reads the panel showing the new card — credentialsSurface.test.ts 'creates from S8i ... lands on S7i with an empty holders state'",
    "Membership's card reads built-in and its detail offers no rename/delete; every list places it first": "keria.Definitions synthesises Membership built-in first in List()/Get(); Rename(membership)->ErrBuiltInImmutable; CredentialsSurface hides rename for builtIn — TestDefinitions_MembershipFirstAndBuiltIn, TestIdipCredentials_CreateListRename, credentialsSurface.test.ts 'Membership's detail offers no rename'",
    "Rename after first issue changes display only — the stored slug and any anchor records are untouched (adapter seam test)": "TestDefinitions_RenameIsDisplayOnly: Rename moves only Name; slug/description/criteria/retired unchanged and the separate Registry roster/anchor record is byte-identical (reflect.DeepEqual before==after)",
    "Definitions live in the control-plane state directory beside the roster; a gateway redeploy leaves them untouched": "keria.NewFileDefinitions at IDSS_STATE_DIR/keria/credential-definitions.json (main.go, beside roster.json, never config repo); TestDefinitions_DurableBesideRoster reopens the file and reads the definitions back",
    "Control-API definitions routes refuse unauthenticated and wrong-token callers (contract tests)": "WithIdipCredentials gates every route on operatorAuthed (operator SSO session / X-Idss-Identity); TestIdipCredentials_RefuseUnauthenticated asserts 401 with no/blank session on all four routes and that a refused create stores nothing. Auth-posture interpretation documented in an issue comment (ADR 0174)",
    "kanidm-path Members tab byte-identical (branch keys on the roster probe)": "CredentialsSurface rests (renders nothing) when the definitions list answers 404 (the kanidm path, where WithIdipCredentials is not mounted), mirroring the roster probe; credentialsSurface.test.ts 'rests on the kanidm path (list null) and renders nothing'"
  },
  "summary": "IDIP credential definitions store + control-API surface + dashboard credentials panel/create(S8i)/detail(S7i) skeleton, Membership built-in first, rename display-only, session-gated routes.",
  "blockers": []
}
**close-report** for #1078 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1078, "status": "success", "commits": [ "900d1bc3" ], "changed_files": [ "STATUS.md", "control-plane/cmd/control-plane/main.go", "dashboard/src/components/members/MembersSurface.vue", "dashboard/src/components/members/CredentialsSurface.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/api/idipCredentialsClient.ts", "dashboard/src/lib/idipCredentials.ts", "dashboard/src/lib/mountRegistry.ts", "dashboard/tests/unit/credentialsSurface.test.ts", "internal/controlapi/idip_credentials.go", "internal/controlapi/idip_credentials_test.go", "internal/keria/adapter.go", "internal/keria/definitions.go", "internal/keria/definitions_test.go", "internal/keriawire/wire.go", "packages/openapi-spec/openapi.yaml" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/keria/ ./internal/controlapi/ ./internal/keriawire/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./internal/keria/... ./internal/controlapi/...", "exit_code": 0 }, { "command": "node packages/openapi-spec/scripts/generate-client.mjs --check", "exit_code": 0 }, { "command": "CI=true dashboard/node_modules/.bin/vitest run", "exit_code": 0 }, { "command": "dashboard/node_modules/.bin/vue-tsc -p dashboard/tsconfig.json --noEmit", "exit_code": 0 }, { "command": "eslint (changed dashboard files)", "exit_code": 0 } ], "criteria": { "Creating from S8i shows the slug preview before confirm; the new card appears in S1i's CREDENTIALS section and S7i shows the empty holders state": "CredentialsSurface.vue S8i create form has data-field=slug-preview computed via slugify (client mirror of keria.Slugify); confirmCreate lands on S7i detail with data-status=holders-empty; back re-reads the panel showing the new card — credentialsSurface.test.ts 'creates from S8i ... lands on S7i with an empty holders state'", "Membership's card reads built-in and its detail offers no rename/delete; every list places it first": "keria.Definitions synthesises Membership built-in first in List()/Get(); Rename(membership)->ErrBuiltInImmutable; CredentialsSurface hides rename for builtIn — TestDefinitions_MembershipFirstAndBuiltIn, TestIdipCredentials_CreateListRename, credentialsSurface.test.ts 'Membership's detail offers no rename'", "Rename after first issue changes display only — the stored slug and any anchor records are untouched (adapter seam test)": "TestDefinitions_RenameIsDisplayOnly: Rename moves only Name; slug/description/criteria/retired unchanged and the separate Registry roster/anchor record is byte-identical (reflect.DeepEqual before==after)", "Definitions live in the control-plane state directory beside the roster; a gateway redeploy leaves them untouched": "keria.NewFileDefinitions at IDSS_STATE_DIR/keria/credential-definitions.json (main.go, beside roster.json, never config repo); TestDefinitions_DurableBesideRoster reopens the file and reads the definitions back", "Control-API definitions routes refuse unauthenticated and wrong-token callers (contract tests)": "WithIdipCredentials gates every route on operatorAuthed (operator SSO session / X-Idss-Identity); TestIdipCredentials_RefuseUnauthenticated asserts 401 with no/blank session on all four routes and that a refused create stores nothing. Auth-posture interpretation documented in an issue comment (ADR 0174)", "kanidm-path Members tab byte-identical (branch keys on the roster probe)": "CredentialsSurface rests (renders nothing) when the definitions list answers 404 (the kanidm path, where WithIdipCredentials is not mounted), mirroring the roster probe; credentialsSurface.test.ts 'rests on the kanidm path (list null) and renders nothing'" }, "summary": "IDIP credential definitions store + control-API surface + dashboard credentials panel/create(S8i)/detail(S7i) skeleton, Membership built-in first, rename display-only, session-gated routes.", "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#1078
No description provided.