sign-in S2: every session re-walks the ledger — refreshes and the silent hop included #1524

Closed
opened 2026-09-16 03:14:54 +00:00 by ben · 3 comments
Owner

Parent

Spec #1492 (wallet sign-in — the app door by device, the approve card, sign-in sites, refusals, ledger-walked sessions, and the App-only switch). Program map #1293. Design contract: DDR 0246, flow docs/ux/flows/wallet-signin.mermaid, wireframes docs/ux/wireframes/wallet-signin/. Mechanics: ADR 0236 (the bridge verifies in Go), proven end to end by prototype #1301 (spikes/1301-wallet-signin/).

Story 29 of the spec. ADR 0196 amendment (2026-09-15).

What to build

A revoked member should stop getting in without anyone maintaining a list. Every time the door mints a
token or completes a silent hop for an existing session, it re-reads the community's ledger for that
session's credential. No app is involved and nothing is re-presented — the session already records which
credential it rests on. Revocation then lands within an access-token hour at worst, and at the next
service hop at best.

Acceptance criteria

  • Exchanging a refresh token re-walks the issuer's ledger for the recorded credential and refuses on a
    revocation seal or on records-unreachable, caching nothing
  • A second service's authorize hitting the silent hop runs the same walk before the request completes;
    a revoked or unreachable walk falls through to the sign-in page instead of completing silently
  • ADR 0196's lengths are unchanged (12 h cookie, 1 h tokens, 30 d rotating refresh)
  • Proven at the bridge seam: refresh after a revoke refused, silent hop refused after a revoke

Blocked by

Tracker: #1523

  • S1 (the verifier and its seal walk)

Task manifest

task: sessions-walk-the-ledger
seam: the bridge's OIDC-over-HTTP smoke tests
depends_on: [wallet-signin:go-verifier-at-the-door]
out_of_scope: [changing session lengths, keep-me-signed-in, remembered devices]
needs_human_decision: []
## Parent Spec **#1492** (wallet sign-in — the app door by device, the approve card, sign-in sites, refusals, ledger-walked sessions, and the App-only switch). Program map **#1293**. Design contract: **DDR 0246**, flow `docs/ux/flows/wallet-signin.mermaid`, wireframes `docs/ux/wireframes/wallet-signin/`. Mechanics: **ADR 0236** (the bridge verifies in Go), proven end to end by prototype **#1301** (`spikes/1301-wallet-signin/`). Story 29 of the spec. **ADR 0196 amendment** (2026-09-15). ## What to build A revoked member should stop getting in without anyone maintaining a list. Every time the door mints a token or completes a silent hop for an existing session, it re-reads the community's ledger for that session's credential. No app is involved and nothing is re-presented — the session already records which credential it rests on. Revocation then lands within an access-token hour at worst, and at the next service hop at best. ## Acceptance criteria - [ ] Exchanging a refresh token re-walks the issuer's ledger for the recorded credential and refuses on a revocation seal or on records-unreachable, caching nothing - [ ] A second service's authorize hitting the silent hop runs the same walk before the request completes; a revoked or unreachable walk falls through to the sign-in page instead of completing silently - [ ] ADR 0196's lengths are unchanged (12 h cookie, 1 h tokens, 30 d rotating refresh) - [ ] Proven at the bridge seam: refresh after a revoke refused, silent hop refused after a revoke ## Blocked by Tracker: #1523 - S1 (the verifier and its seal walk) ## Task manifest ```yaml task: sessions-walk-the-ledger seam: the bridge's OIDC-over-HTTP smoke tests depends_on: [wallet-signin:go-verifier-at-the-door] out_of_scope: [changing session lengths, keep-me-signed-in, remembered devices] needs_human_decision: [] ```

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

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

Ruled by agent under ADR 0174 — veto anytime.

Shared-gate unblock (rode along with this ticket). While pushing this green #1524 commit, the pre-receive Go gate refused it on golangci-lint findings in bootstrap/cmd/bootstrap/channel.go — code from #1578, NOT this slice: an unchecked f.Close() (errcheck) and an unused log parameter (revive). Because the gate lints the whole tree on any Go-touching push, this had wedged every Go push to main since #1578 landed (later commits landed only because they were TypeScript/scripts, which skip the Go stage).

Ruling: made the minimal, objectively-correct fix in the same commit — defer func() { _ = f.Close() }() and the unused param renamed to _.

Why two-way: revertible in a later commit, no behaviour change, not on the one-way-door list. Proof: golangci-lint run ./bootstrap/cmd/bootstrap/ → 0 issues; the pre-receive gate then accepted the push (build + full go test ./... + lint all green).

Ruled by agent under ADR 0174 — veto anytime. **Shared-gate unblock (rode along with this ticket).** While pushing this green #1524 commit, the pre-receive Go gate refused it on golangci-lint findings in `bootstrap/cmd/bootstrap/channel.go` — code from #1578, NOT this slice: an unchecked `f.Close()` (errcheck) and an unused `log` parameter (revive). Because the gate lints the whole tree on any Go-touching push, this had wedged **every** Go push to main since #1578 landed (later commits landed only because they were TypeScript/scripts, which skip the Go stage). **Ruling:** made the minimal, objectively-correct fix in the same commit — `defer func() { _ = f.Close() }()` and the unused param renamed to `_`. **Why two-way:** revertible in a later commit, no behaviour change, not on the one-way-door list. **Proof:** `golangci-lint run ./bootstrap/cmd/bootstrap/` → `0 issues`; the pre-receive gate then accepted the push (build + full `go test ./...` + lint all green).

close-report for #1524 — status success

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

envelope
{
  "issue": 1524,
  "status": "success",
  "commits": [
    "415f53ea"
  ],
  "changed_files": [
    "internal/idp/signin.go",
    "internal/idp/fake_verifier_test.go",
    "internal/idp/signin_revocation_seam_test.go",
    "bootstrap/cmd/bootstrap/channel.go",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "nix develop .#go-ci -c go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c go build ./...",
      "exit_code": 0
    },
    {
      "command": "nix develop .#go-ci -c golangci-lint run ./bootstrap/cmd/bootstrap/",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Exchanging a refresh token re-walks the issuer's ledger for the recorded credential and refuses on a revocation seal or on records-unreachable, caching nothing": "internal/idp/storage.go TokenRequestByRefreshToken calls verifier.IsIssued (LedgerVerifier.IsIssued -> core.Standing seal walk) on rec.identity.MembershipSAID, refusing on !issued (ErrCredentialRevoked) or err (records-unreachable); no caching on the refresh path. Proven by TestSeam_RefreshAfterRevoke_Refused (pre-existing) + new TestSeam_RefreshWhenRecordsUnreachable_Refused in internal/idp/signin_revocation_seam_test.go",
    "A second service's authorize hitting the silent hop runs the same walk before the request completes; a revoked or unreachable walk falls through to the sign-in page instead of completing silently": "internal/idp/signin.go login.completeFromSession now runs verifier.IsIssued on the held credential's MembershipSAID before completing; on !issued or err it returns false so handlePage renders the sign-in form (writePage, 200) instead of 302. Proven by TestSeam_SilentHopAfterRevoke_FallsToSignIn and TestSeam_SilentHopWhenRecordsUnreachable_FallsToSignIn (both red before the fix, green after)",
    "ADR 0196's lengths are unchanged (12 h cookie, 1 h tokens, 30 d rotating refresh)": "No change to sessionCookieMaxAge / accessTokenLifetime / refreshTokenLifetime; the diff touches only completeFromSession's ledger re-walk. out_of_scope [changing session lengths] honoured",
    "Proven at the bridge seam: refresh after a revoke refused, silent hop refused after a revoke": "internal/idp seam (OIDC-over-HTTP smoke over the fake verifier): TestSeam_RefreshAfterRevoke_Refused + TestSeam_SilentHopAfterRevoke_FallsToSignIn; go test ./internal/idp green"
  },
  "summary": "The silent cross-client SSO hop now re-walks the community's ledger (IsIssued) before completing, refusing/falling through on a revoke or unreachable ledger exactly like the refresh path, closing the last session path that did not re-check.",
  "blockers": []
}
**close-report** for #1524 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1524, "status": "success", "commits": [ "415f53ea" ], "changed_files": [ "internal/idp/signin.go", "internal/idp/fake_verifier_test.go", "internal/idp/signin_revocation_seam_test.go", "bootstrap/cmd/bootstrap/channel.go", "STATUS.md" ], "tests": [ { "command": "nix develop .#go-ci -c go test ./internal/idp/", "exit_code": 0 }, { "command": "nix develop .#go-ci -c go build ./...", "exit_code": 0 }, { "command": "nix develop .#go-ci -c golangci-lint run ./bootstrap/cmd/bootstrap/", "exit_code": 0 } ], "criteria": { "Exchanging a refresh token re-walks the issuer's ledger for the recorded credential and refuses on a revocation seal or on records-unreachable, caching nothing": "internal/idp/storage.go TokenRequestByRefreshToken calls verifier.IsIssued (LedgerVerifier.IsIssued -> core.Standing seal walk) on rec.identity.MembershipSAID, refusing on !issued (ErrCredentialRevoked) or err (records-unreachable); no caching on the refresh path. Proven by TestSeam_RefreshAfterRevoke_Refused (pre-existing) + new TestSeam_RefreshWhenRecordsUnreachable_Refused in internal/idp/signin_revocation_seam_test.go", "A second service's authorize hitting the silent hop runs the same walk before the request completes; a revoked or unreachable walk falls through to the sign-in page instead of completing silently": "internal/idp/signin.go login.completeFromSession now runs verifier.IsIssued on the held credential's MembershipSAID before completing; on !issued or err it returns false so handlePage renders the sign-in form (writePage, 200) instead of 302. Proven by TestSeam_SilentHopAfterRevoke_FallsToSignIn and TestSeam_SilentHopWhenRecordsUnreachable_FallsToSignIn (both red before the fix, green after)", "ADR 0196's lengths are unchanged (12 h cookie, 1 h tokens, 30 d rotating refresh)": "No change to sessionCookieMaxAge / accessTokenLifetime / refreshTokenLifetime; the diff touches only completeFromSession's ledger re-walk. out_of_scope [changing session lengths] honoured", "Proven at the bridge seam: refresh after a revoke refused, silent hop refused after a revoke": "internal/idp seam (OIDC-over-HTTP smoke over the fake verifier): TestSeam_RefreshAfterRevoke_Refused + TestSeam_SilentHopAfterRevoke_FallsToSignIn; go test ./internal/idp green" }, "summary": "The silent cross-client SSO hop now re-walks the community's ledger (IsIssued) before completing, refusing/falling through on a revoke or unreachable ledger exactly like the refresh path, closing the last session path that did not re-check.", "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#1524
No description provided.