panel-unlock: the panel asks for the handover after it lands — the door answers armed, takes the panel's key, relays once (ADR 0282, ruled option B) #1961
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.
Blocks
Depends on
You do not have permission to read 1 dependency
Reference
Matou/idss#1961
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?
Parent
pu=/puaid=off the panel URL (option A, rejected).What to build
The panel loads signed in but locked, mints its sealing keypair in its own tab memory, and asks the bridge for the sealed passcode belonging to the sign-in it has just completed. The armed wallet seals to that key; the door relays the ciphertext once and deletes it. The panel opens it in the bundle, asserts the agent's identity against the signed-in AID, and the seat unlocks — one tap on the phone, no second scan, and no secret in any URL or history entry.
Three pieces, all in this repo:
The accepted limit, already drawn
The phone must answer a second or two after Approve. A wallet that was backgrounded or closed may not, and that lands on PU-M0x cause 1 — signed in, seat locked, nothing was shared — with the twelve words in reach. That screen exists; this ticket must route to it rather than inventing a new failure state.
Acceptance criteria
handoverPortClient'spu=/puaid=reading is gone, and no code path can complete a handover from a URL.internal/idp's app-door seam and the dashboard's unit seam; the app-door golden gains the new routes the way #1939 extended it.Blocked by
None — can start immediately. matou-app#674 (the wallet arming) is its counterpart and is blocked on this for the wire.
Task manifest
Filed 2026-09-28 on Ben's ruling of option B. The plumbing #1957's close-report handed to #1936 — a live drive leg cannot build what it exists to prove.
🤖 Generated with Claude Code
https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY
Blocked — needs a human ruling on how the freshly-landed panel authenticates its claim to the armed handover (a security one-way door ADR 0282 left unspecified)
Building option B, I hit the gap ADR 0282's amendment itself flags — "the panel registers its key after the hop lands, against the sign-in it just completed (a door route this ADR has not specified)". Specifying that route is a security-posture decision (the one-way-door list), so under ADR 0174 it is not mine to rule.
The problem. In #1933 (option A) the tab's
ek=rode the sign-in code the steward physically scanned — the scan bound the sealing key to the sign-in. Option B removes that scan-binding: the panel mints its verkey after landing and must register it with the door for "the sign-in it just completed." The only session identifier the door has is the sign-in cookieidss_idp_session, whose value is the bare AID — a public, forgeable identifier looked up inheld[aid](ADR 0196,internal/idp/signin.go:281/:324). If the door binds the armed handover to that cookie, anyone who knows a live steward's public AID can forge the cookie, register their own verkey, and receive the sealed passcode → open it → own the steward's whole identity, defeating d.6's sealed-box protection. This is a new hole option B introduces that option A did not have.The decision needed — how does the freshly-landed panel prove entitlement to the armed handover?
Everything else in the slice is ready to build once this is settled: the door's armed/bind/collect + wallet-facing key/seal routes, the golden's new option-B section, and the transport rewrite removing
handoverPortClient'spu=/puaid=URL reading (AC8).signingSession.tsis already transport-agnostic (signInArmed()+requestHandover({mode:'sign-in'})), so onlyhandoverPortClient.tschanges on the dashboard side.I posted this same question to the ask-human chat thread; it timed out with no reply within the window (a late reply there will resume the same thread). Recording it here as the durable record.
Why human
Choosing the authentication mechanism that gates a steward's whole-identity passcode is a security-posture decision — irreversible in effect if shipped wrong (passcode theft), and it defines the cross-repo wire contract matou-app#674 must match. It is on ADR 0174's one-way-door list (security-posture widening), not a two-way door I can rule.
Ruled (Ben, 2026-09-28): option B — a minted handover capability, delivered over the OIDC channel.
Good catch, and right to stop. Two different "option B"s now live on this ticket — ADR 0282's (the panel asks after it lands, ruled earlier today) and this comment's (how the panel proves it may ask). This rules the second. They compose: the panel still asks after it lands; what follows says what it presents when it does.
The ruling
The AID-bearer cookie is rejected as the binding (your option A). Your reading of it is correct and I verified it independently:
setSessionCookiewritesValue: aidwith nothing signing it, andcompleteFromSessionaccepts it on nothing butheld[aid]being warm and the ledger still standing. There is no secret anywhere in that path. Binding a whole-identity passcode to a public string is not a trade-off worth weighing.Build this instead. When a control-panel sign-in completes with the unlock line on, the door mints a handover capability:
The AID must not be an input at any point in this path. An attacker who knows a steward's AID learns nothing and can do nothing.
Two details, so you are not guessing
The carrier — prefer userinfo over an ID-token claim, but this is yours to settle (two-way, per ADR 0174). An ID token tends to be persisted and logged by the clients that hold it, which is the wrong home for a single-use secret; a userinfo fetch against the access token is one call, at the moment of landing, held nowhere. If userinfo turns out to be the bigger change in the gate hop, an ID-token claim is acceptable provided the panel never writes it to storage or a log.
Scope — keep it one ticket. If the gate-hop work proves wide once you are in it, split the capability's mint-and-delivery into its own ticket and block the rest of this one on it, rather than growing this beyond a context. Say so in the close if you do.
Independent of the cookie fix
The cookie's forgeability is a live hole on its own — it is not created by this ticket and it is not fixed by it. Filed separately as #1966 (
priority). This ruling deliberately does not depend on #1966 landing first: option B stands on the minted capability, so the two can proceed in parallel and neither blocks the other. Do not wait for it.What must be asserted, not assumed
Carry these into the close as tested claims, alongside the criteria already on the ticket:
idss_idp_sessioncookie (any AID) is refused;Unlabelling
ready-for-human→ready-for-agent. Everything you listed as ready to build is now unblocked: the door's armed/bind/collect routes, the wallet-facing key-and-seal side, the golden's option-B section, and the transport rewrite that deleteshandoverPortClient'spu=/puaid=URL reading.Blocked — split under Ben's own ruling: the capability's mint-and-delivery is now #1967, and this ticket is blocked on it
Ben's ruling of 2026-09-28 (above) closed with an explicit escape hatch:
Building this ticket, the gate-hop proved wide. So I have taken that split.
What I verified (why the gate-hop is wide)
The capability must reach the panel over the OIDC channel (Ben's ruling; the AID-bearer cookie is rejected as forgeable, tracked separately as #1966). But:
admin.<apex>) is served behind the gate'sforward_auth(ADR 0074/0038). The SPA holds no OIDC access token — there is noaccess_token/id_token/token storage anywhere indashboard/src.GET /api/v1/me(internal/controlapi/me.go), resolved off the SSO cookie via aSessionResolver→ the tier's standing decider./mereads the cookie's subject, never a token, and no channel today carries a door-minted per-sign-in secret from the door through to the panel.So delivering the capability "over the OIDC channel" is not reachable from this ticket's declared seam (
internal/idp+dashboard/tests/unit). It requires a new carrier: the door mints the capability into the OIDC token exchange (internal/idp), the OIDC-client/gate that completes the hop and holds the token captures it (internal/controlapi), and a panel-readable surface exposes it (/meor a dedicated route). That spans a different package and the session substrate — exactly the "wide gate-hop" Ben's ruling anticipated.Everything else in this ticket — the door's
bind/collectroutes, the wallet-facing key-and-seal route, the panel transport rewrite that deleteshandoverPortClient'spu=/puaid=reading, and the golden's option-B section — authenticates against the capability. Ben rejected the forgeable AID cookie precisely so that bind/collect stand on the minted capability; building them against anything weaker would defeat the ruling. So the rest genuinely cannot land until the capability can be minted and read.The split
ready-for-agent, depends_on: []): the handover capability — the armed sign-in mints a single-use capability and delivers it to the panel over the OIDC channel. Includes thepresent-route armed signal that replaces #1933's eagersealed_passcode(the wallet arms at Approve, seals when asked — matou-app#674). This is the dependency. It can start immediately.bind/collectroutes, the wallet-facing seal route, the golden's option-B section, and the transport rewrite deletingpu=/puaid=.To re-arm
Land #1967, then re-add
ready-for-agenthere. No design decision is re-opened — Ben's mechanism (minted capability, delivered over OIDC; option B; one tap, no second scan) stands unchanged. This is only the two-way-door engineering split Ben's ruling authorized.Swapping
ready-for-agent→agent-blocked(an unavailable dependency, #1967, must land first, and one iteration works one ticket).Unblocked — both splits landed; clearing the stale
agent-blocked.1784e119): the armed sign-in mints the capability and delivers it over the OIDC channel. The mint is gated onarmed && panel; it rides ahandover_capabilityuserinfo claim the gate captures at the code exchange; the panel reads it back fromGET /api/v1/panel/handover, once.f60d942b): that read is bound to the sign-in that armed it, not the identity — the binding is the sha256 of the signed session cookie (whose claims now carry a minted-at-ns), so a second, older or concurrent session of the same member reads empty and does not spend the entry.So the thing this ticket presents to bind/collect now exists and is real: read the capability from
/api/v1/panel/handoverand present that — never the session cookie, never a URL.What remains here, unchanged from the ruling: the door’s armed / bind / collect routes, the wallet-facing key-and-seal route, the golden’s option-B section, and the transport rewrite that deletes
handoverPortClient’spu=/puaid=URL reading (AC8 — leaving it keeps a second, contradictory mechanism alive).The wallet half is already waiting: matou-app#674 landed its arming (
armedPasscode.tsonmain), andsealForRequestis built and tested with no caller — it answers the route this ticket defines.swarm-claim host=matou-dev-server-01 run=35148
(automated multi-host claim — lowest live claim id works this ticket)
close-report for #1961 — status
success✅ close-report gates passed — every claim verified against main; issue closed.
envelope