idip: idss-idp bbolt persistence for auth-code/refresh records #794
Labels
No labels
agent-blocked
agent-working
autopilot
bug
deferred
deploy-pending
enhancement
landing-pr
model-haiku
model-opus
model-sonnet
needs-design
needs-info
needs-triage
no-triage
out-of-scope
priority
ready-for-agent
ready-for-human
ready-for-session
rehearsal-183
snapshot-pending
standing-drive
wayfinder:grilling
wayfinder:map
wayfinder:prototype
wayfinder:research
wayfinder:task
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Matou/idss#794
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from #776 (ADR 0196). The idss-idp bridge (
internal/idp/storage.go) currently keeps auth-code and refresh-token records IN MEMORY behind an unexportedstore. ADR 0196 calls for embedded bbolt at the declaredStateDirectory=/var/lib/idss-idpso a bridge RESTART (as opposed to a wipe) does not drop every live 30-day refresh session.Every #776 acceptance clause holds either way — including story 18 (a WIPE loses only live sessions; nothing here is a member record) — so this was ruled a two-way-door deferral under ADR 0174. Scope: back the code/refresh maps (and only those; the signing key already persists via the Nix generator, and the verified-key cache is deliberately ephemeral) with bbolt, keyed the same, so a restart re-hydrates live sessions. Add
go.etcd.io/bbolt(+ lockfile). The seam (internal/idp/seam_test.go) should gain a restart-survives-refresh case.Verified against the current code: the idip bridge's
storekeeps auth-code/refresh records in in-memory maps only (the code's own comment names this as the ADR 0196 gap this ticket closes). The scope is well-bounded and excludes the signing key (already Nix-persisted) and the verified-key cache (deliberately ephemeral). Two-way door — a new embedded-DB dependency, revertible by commit, provable by a restart-survives-refresh seam test — proceeding toready-for-agent.Agent Brief
Category: enhancement
Summary: Back the idip bridge's auth-code and refresh-token records with embedded bbolt persistence so a bridge process restart doesn't drop live sessions.
Current behavior:
The bridge's auth-code and refresh-token records live only in in-memory maps behind an unexported store type. A process restart (as distinct from a state wipe) loses every live session, forcing affected members to re-authenticate even though nothing about their membership actually changed.
Desired behavior:
Auth-code and refresh-token records are persisted to an embedded bbolt database at the declared state directory (
/var/lib/idss-idp). A bridge restart re-hydrates these records from disk so live sessions (including 30-day refresh sessions) survive. A full wipe of the state directory still loses live sessions — that remains correct behavior (no member record is stored here; membership truth lives elsewhere).Key interfaces:
go.etcd.io/bbolt, with the module's lockfile updated accordingly.Acceptance criteria:
Out of scope:
swarm-claim host=matou-dev-server-01 run=10599
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #794 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope
idss-idp— an IDIP community updates its control plane and runs its founding-day sign-in bridge forever #1689