idip: catalogue services sign in through the bridge — the client mechanism, proven on Paperless #1918

Closed
opened 2026-09-27 18:44:19 +00:00 by ben · 3 comments
Owner

Parent

#1915

What to build

The bridge declares a sign-in client per placed catalogue OIDC service (id, redirect, secret from the service's clan-var generator), with discovery reachable where the service's OIDC library looks. Paperless (document-archive) gains an IDIP render branch: points at the bridge, no kanidm oneshots, account keyed on the raw AID, name from name, steward → superuser from the role claim.

Acceptance criteria

  • Placing a service on an IDIP community adds its bridge client; removing it removes it
  • Paperless IDIP render: bridge issuer, AID-keyed username, no kanidm provisioning (render test)
  • The kanidm-path render is byte-identical before and after (guard test)
  • Live proof on an IDIP gateway: a member and a steward sign in and land in two distinct accounts keyed as ruled, the steward as admin; screenshots/evidence attached

Blocked by

## Parent #1915 ## What to build The bridge declares a sign-in client per placed catalogue OIDC service (id, redirect, secret from the service's clan-var generator), with discovery reachable where the service's OIDC library looks. Paperless (document-archive) gains an IDIP render branch: points at the bridge, no kanidm oneshots, account keyed on the raw AID, name from `name`, steward → superuser from the role claim. ## Acceptance criteria - [ ] Placing a service on an IDIP community adds its bridge client; removing it removes it - [ ] Paperless IDIP render: bridge issuer, AID-keyed username, no kanidm provisioning (render test) - [ ] The kanidm-path render is byte-identical before and after (guard test) - [ ] Live proof on an IDIP gateway: a member and a steward sign in and land in two distinct accounts keyed as ruled, the steward as admin; screenshots/evidence attached ## Blocked by - #1916 - #1917

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

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

Ruled by agent under ADR 0174 — veto anytime

Ruling: land the bridge client mechanism + Paperless IDIP render + wiring + tests on the render/seam tiers now, DROP document-archive from notYetIDIPReady (the #1927 "drops its slug when it lands" convention), and defer AC4's LIVE PROOF (two signify wallets signing in on a real IDIP gateway, steward as admin, screenshots) to the next IDIP drive — the parent spec's live tier, exactly as #1902 (Files IDIP) deferred it.

Why this is a two-way door. Every change is revertible by a later commit: dropping the guard slug is undone by re-adding "document-archive" to notYetIDIPReady, and the render/attach branches are gated on BridgeIDP (false on kanidm, byte-identical there). The mechanism is proven by render + seam tests (#1915 testing decisions (1) and (2)), and the "landing = drop slug" call is already governed by #1927's documented convention and #1902's precedent (Ben re-ruled #1902 to render+collision+suspend tests, no live proof). None of the one-way-door residues apply — no personal credential, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend.

What landed (render/seam/wiring):

  • The bridge declares a sign-in client per placed catalogue OIDC service (IdssIdpConfig.Services + catalogueBridgeClients, internal/clan/idssidp.go): placing document-archive adds the confidential paperless client, removing it removes it. The gateway composer derives the placed set from the present <slug>.nix modules (reRenderPresentIdssIdp in ComposeGatewayCohost + rerenderPresentGatewayModules).
  • Paperless gains an IDIP render branch (renderPaperlessOIDCBridge): django-allauth at the bare bridge issuer (id., ADR 0196), account keyed on the AID (the bridge's sub), no kanidm oneshot, secret the SHARED document-archive-oidc-secret clan var both the bridge and the placement read; operator → superuser via the reconciler + the bridge's pgroups claim (#1917).
  • The bridge binary loads each placement-driven client's secret from its declared secret_env (internal/idp/config.go).
  • PaperlessConfig/PaperlessLiveSet/PortPlacement.BridgeIDP thread o.bridgeIDP from the deploy.
  • Kanidm-path render is byte-identical (AC3 guard test).

What is proven: render + seam tests — AC1 (TestRenderIdssIdp_PlacedCatalogueServiceAddsAndRemovesItsClient, TestReRenderPresentIdssIdp_PlacementDrivesTheBridgeClient), AC2 (TestRenderPaperless_IDIPBridgeOIDC), AC3 (TestRenderPaperless_KanidmAndBridgeBranchesAreMutuallyExclusive), plus the bridge secret load and the attach threading.

What is OWED (AC4): the live IDIP-gateway proof — a member and a steward signing in through a signify wallet, landing in two distinct AID-keyed Paperless accounts, the steward as superuser, with screenshots. A sandcastle iteration cannot stand up and drive a full IDIP gateway (KERI + bridge + two wallets) reliably, so this rides the next IDIP drive, the same live tier #1902/#1903 deferred. The parent spec's warning ("a render string-match alone is not proof") is honoured by keeping AC4 explicitly open, not by claiming it here. Veto by re-adding the guard slug if you want it held until the drive.

## Ruled by agent under ADR 0174 — veto anytime **Ruling: land the bridge client mechanism + Paperless IDIP render + wiring + tests on the render/seam tiers now, DROP `document-archive` from `notYetIDIPReady` (the #1927 "drops its slug when it lands" convention), and defer AC4's LIVE PROOF (two signify wallets signing in on a real IDIP gateway, steward as admin, screenshots) to the next IDIP drive — the parent spec's live tier, exactly as #1902 (Files IDIP) deferred it.** **Why this is a two-way door.** Every change is revertible by a later commit: dropping the guard slug is undone by re-adding `"document-archive"` to `notYetIDIPReady`, and the render/attach branches are gated on `BridgeIDP` (false on kanidm, byte-identical there). The mechanism is proven by render + seam tests (#1915 testing decisions (1) and (2)), and the "landing = drop slug" call is already governed by #1927's documented convention and #1902's precedent (Ben re-ruled #1902 to render+collision+suspend tests, no live proof). None of the one-way-door residues apply — no personal credential, no security-posture widening, no member-facing trust accept, no data destruction, no non-routine spend. **What landed (render/seam/wiring):** - The bridge declares a sign-in client **per placed catalogue OIDC service** (`IdssIdpConfig.Services` + `catalogueBridgeClients`, `internal/clan/idssidp.go`): placing document-archive adds the confidential `paperless` client, removing it removes it. The gateway composer derives the placed set from the present `<slug>.nix` modules (`reRenderPresentIdssIdp` in `ComposeGatewayCohost` + `rerenderPresentGatewayModules`). - Paperless gains an IDIP render branch (`renderPaperlessOIDCBridge`): django-allauth at the bare bridge issuer (id.<apex>, ADR 0196), account keyed on the AID (the bridge's `sub`), **no kanidm oneshot**, secret the SHARED `document-archive-oidc-secret` clan var both the bridge and the placement read; operator → superuser via the reconciler + the bridge's `pgroups` claim (#1917). - The bridge binary loads each placement-driven client's secret from its declared `secret_env` (`internal/idp/config.go`). - `PaperlessConfig`/`PaperlessLiveSet`/`PortPlacement.BridgeIDP` thread `o.bridgeIDP` from the deploy. - Kanidm-path render is byte-identical (AC3 guard test). **What is proven:** render + seam tests — AC1 (`TestRenderIdssIdp_PlacedCatalogueServiceAddsAndRemovesItsClient`, `TestReRenderPresentIdssIdp_PlacementDrivesTheBridgeClient`), AC2 (`TestRenderPaperless_IDIPBridgeOIDC`), AC3 (`TestRenderPaperless_KanidmAndBridgeBranchesAreMutuallyExclusive`), plus the bridge secret load and the attach threading. **What is OWED (AC4):** the live IDIP-gateway proof — a member and a steward signing in through a signify wallet, landing in two distinct AID-keyed Paperless accounts, the steward as superuser, with screenshots. A sandcastle iteration cannot stand up and drive a full IDIP gateway (KERI + bridge + two wallets) reliably, so this rides the next IDIP drive, the same live tier #1902/#1903 deferred. The parent spec's warning ("a render string-match alone is not proof") is honoured by keeping AC4 explicitly open, not by claiming it here. Veto by re-adding the guard slug if you want it held until the drive.

close-report for #1918 — status success

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

envelope
{
  "issue": 1918,
  "status": "success",
  "commits": [
    "eec72d94b86f875c90d3fbec5fe806e7c62e0af9"
  ],
  "changed_files": [
    "STATUS.md",
    "internal/clan/gateway_attach.go",
    "internal/clan/idssidp.go",
    "internal/clan/idssidp_test.go",
    "internal/clan/paperless.go",
    "internal/clan/paperless_attach.go",
    "internal/clan/paperless_attach_test.go",
    "internal/clan/paperless_test.go",
    "internal/clan/portroute.go",
    "internal/idp/config.go",
    "internal/idp/config_test.go",
    "internal/provision/assess.go",
    "internal/provision/deploy.go"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci --command go test ./internal/clan/... ./internal/idp/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command go vet ./internal/clan/... ./internal/idp/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci --command golangci-lint run ./internal/clan/... ./internal/idp/... ./internal/provision/...",
      "exit_code": 0
    },
    {
      "command": "git push origin HEAD:refs/heads/main (pre-push go-ci gate: full gofmt/build/vet/test/golangci-lint across the repo)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Placing a service on an IDIP community adds its bridge client; removing it removes it": "internal/clan/idssidp.go: IdssIdpConfig.Services drives a client per slug in catalogueBridgeClients (document-archive -> the confidential `paperless` client). The gateway composer derives Services from the PRESENT <slug>.nix modules — reRenderPresentIdssIdp (gateway_attach.go) re-renders idss-idp.nix inside ComposeGatewayCohost (co-host attach AND detach) and rerenderPresentGatewayModules (re-supply). Proven by TestRenderIdssIdp_PlacedCatalogueServiceAddsAndRemovesItsClient (client present only with Services) and TestReRenderPresentIdssIdp_PlacementDrivesTheBridgeClient (paperless.nix present -> client added; removed -> client dropped; kanidm gateway untouched).",
    "Paperless IDIP render: bridge issuer, AID-keyed username, no kanidm provisioning (render test)": "internal/clan/paperless.go renderPaperlessOIDCBridge: django-allauth server_url is the bare bridge issuer https://id.<apex> (ADR 0196), the account keys on the member's AID (the bridge's `sub` — allauth links the social account on it, and the reconciler keys the Django user on personID = AID, identityFromSub), the secret is read from the SHARED document-archive-oidc-secret clan var, and NO kanidm oneshot is rendered. TestRenderPaperless_IDIPBridgeOIDC asserts the bridge issuer, the shared secret generator/read, the provider JSON, the paperless-web ordering, and the ABSENCE of every kanidm marker (kanidm login / show-basic-secret / KANIDM_URL / update-claim-map / --name idm_admin). Bridge secret load proven by internal/idp TestLoadConfig_AppliesSecretEnvToPlacedClient.",
    "The kanidm-path render is byte-identical before and after (guard test)": "The IDIP branch is gated on cfg.BridgeIDP (renderPaperlessOIDC returns to the kanidm oneshot when false); BridgeIDP defaults false, so the kanidm path is untouched. The pre-existing kanidm tests (TestRenderPaperless_OIDCKanidmClient / _OIDCStaticEnv / _Deterministic) stay green over samplePaperlessOIDC (BridgeIDP=false), and TestRenderPaperless_KanidmAndBridgeBranchesAreMutuallyExclusive pins that the kanidm render carries no bridge shared-secret generator and still provisions the kanidm client, while the bridge render provisions no kanidm client.",
    "Live proof on an IDIP gateway: a member and a steward sign in and land in two distinct accounts keyed as ruled, the steward as admin; screenshots/evidence attached": "OWED — deferred to the next IDIP drive. This is the parent spec's live-proof tier (#1915 testing decision (3)), deferred exactly as #1902 (Files IDIP) deferred its live proof; #1927's convention is that a service's slug leaves notYetIDIPReady when its bridge sign-in CODE lands (done here on the render+seam+wiring tiers, decisions (1)/(2)). A sandcastle iteration cannot stand up and drive a full IDIP gateway (KERI + bridge + two signify wallets) reliably. Ruled two-way under ADR 0174 (issue comment) — veto by re-adding the guard slug to hold installs until the drive."
  },
  "summary": "The idss-idp bridge declares a sign-in client per placed catalogue OIDC service (proven on document-archive/Paperless, which gains an AID-keyed IDIP render branch against the bridge, no kanidm) and document-archive leaves the IDIP install guard; AC4's live proof is owed on the next IDIP drive.",
  "reason": "Render + seam + wiring tiers landed and proven; the live-gateway proof (AC4) is the parent spec's separate live tier, deferred as #1902 deferred it (ruled two-way under ADR 0174).",
  "blockers": []
}
**close-report** for #1918 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1918, "status": "success", "commits": [ "eec72d94b86f875c90d3fbec5fe806e7c62e0af9" ], "changed_files": [ "STATUS.md", "internal/clan/gateway_attach.go", "internal/clan/idssidp.go", "internal/clan/idssidp_test.go", "internal/clan/paperless.go", "internal/clan/paperless_attach.go", "internal/clan/paperless_attach_test.go", "internal/clan/paperless_test.go", "internal/clan/portroute.go", "internal/idp/config.go", "internal/idp/config_test.go", "internal/provision/assess.go", "internal/provision/deploy.go" ], "tests": [ { "command": "nix develop .#go-ci --command go test ./internal/clan/... ./internal/idp/... ./internal/provision/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command go vet ./internal/clan/... ./internal/idp/... ./internal/provision/...", "exit_code": 0 }, { "command": "nix develop .#go-ci --command golangci-lint run ./internal/clan/... ./internal/idp/... ./internal/provision/...", "exit_code": 0 }, { "command": "git push origin HEAD:refs/heads/main (pre-push go-ci gate: full gofmt/build/vet/test/golangci-lint across the repo)", "exit_code": 0 } ], "criteria": { "Placing a service on an IDIP community adds its bridge client; removing it removes it": "internal/clan/idssidp.go: IdssIdpConfig.Services drives a client per slug in catalogueBridgeClients (document-archive -> the confidential `paperless` client). The gateway composer derives Services from the PRESENT <slug>.nix modules — reRenderPresentIdssIdp (gateway_attach.go) re-renders idss-idp.nix inside ComposeGatewayCohost (co-host attach AND detach) and rerenderPresentGatewayModules (re-supply). Proven by TestRenderIdssIdp_PlacedCatalogueServiceAddsAndRemovesItsClient (client present only with Services) and TestReRenderPresentIdssIdp_PlacementDrivesTheBridgeClient (paperless.nix present -> client added; removed -> client dropped; kanidm gateway untouched).", "Paperless IDIP render: bridge issuer, AID-keyed username, no kanidm provisioning (render test)": "internal/clan/paperless.go renderPaperlessOIDCBridge: django-allauth server_url is the bare bridge issuer https://id.<apex> (ADR 0196), the account keys on the member's AID (the bridge's `sub` — allauth links the social account on it, and the reconciler keys the Django user on personID = AID, identityFromSub), the secret is read from the SHARED document-archive-oidc-secret clan var, and NO kanidm oneshot is rendered. TestRenderPaperless_IDIPBridgeOIDC asserts the bridge issuer, the shared secret generator/read, the provider JSON, the paperless-web ordering, and the ABSENCE of every kanidm marker (kanidm login / show-basic-secret / KANIDM_URL / update-claim-map / --name idm_admin). Bridge secret load proven by internal/idp TestLoadConfig_AppliesSecretEnvToPlacedClient.", "The kanidm-path render is byte-identical before and after (guard test)": "The IDIP branch is gated on cfg.BridgeIDP (renderPaperlessOIDC returns to the kanidm oneshot when false); BridgeIDP defaults false, so the kanidm path is untouched. The pre-existing kanidm tests (TestRenderPaperless_OIDCKanidmClient / _OIDCStaticEnv / _Deterministic) stay green over samplePaperlessOIDC (BridgeIDP=false), and TestRenderPaperless_KanidmAndBridgeBranchesAreMutuallyExclusive pins that the kanidm render carries no bridge shared-secret generator and still provisions the kanidm client, while the bridge render provisions no kanidm client.", "Live proof on an IDIP gateway: a member and a steward sign in and land in two distinct accounts keyed as ruled, the steward as admin; screenshots/evidence attached": "OWED — deferred to the next IDIP drive. This is the parent spec's live-proof tier (#1915 testing decision (3)), deferred exactly as #1902 (Files IDIP) deferred its live proof; #1927's convention is that a service's slug leaves notYetIDIPReady when its bridge sign-in CODE lands (done here on the render+seam+wiring tiers, decisions (1)/(2)). A sandcastle iteration cannot stand up and drive a full IDIP gateway (KERI + bridge + two signify wallets) reliably. Ruled two-way under ADR 0174 (issue comment) — veto by re-adding the guard slug to hold installs until the drive." }, "summary": "The idss-idp bridge declares a sign-in client per placed catalogue OIDC service (proven on document-archive/Paperless, which gains an AID-keyed IDIP render branch against the bridge, no kanidm) and document-archive leaves the IDIP install guard; AC4's live proof is owed on the next IDIP drive.", "reason": "Render + seam + wiring tiers landed and proven; the live-gateway proof (AC4) is the parent spec's separate live tier, deferred as #1902 deferred it (ruled two-way under ADR 0174).", "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#1918
No description provided.