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

Closed
opened 2026-09-28 14:50:06 +00:00 by matou-build-agent · 6 comments

Parent

  • Design: ADR 0282 d.2/d.6 + its armed-consent amendment, now carrying Ben's ruling of 2026-09-28: the panel asks after it lands (option B), and the obligations block that ruling is checked against.
  • Replaces the transport from: #1957, which shipped a client reading pu=/puaid= off the panel URL (option A, rejected).
  • The wallet half: matou-app#674 (arm at approve, seal when asked).

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:

  1. The door answers whether the sign-in armed a handover. An unarmed session (the unlock line was off) must be plain-locked — PU-M0 with no waiting screen — not a panel that sits waiting for something nobody promised.
  2. The door takes the panel's verkey against that sign-in, asks the armed wallet for the box, and hands it back once, then deletes it. A box on a sign-in that armed nothing is still refused, as today.
  3. The panel's transport is rewritten to do this, and #1957's URL-reading path is removed — leaving it would keep a second, contradictory mechanism alive in the code.

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

  • Given a sign-in approved with the unlock line on, when the panel lands and asks with a freshly minted verkey, then the wallet seals to that verkey, the door relays it once, and Members renders unlocked with nothing typed.
  • Given a sign-in with the line off, when the panel lands, then the door answers that nothing was armed, no keypair is minted, and PU-M0 renders plain-locked with no waiting screen.
  • Given an armed handover already collected, when a second tab asks, then it gets nothing and stays locked.
  • Given the wallet does not answer inside the window, when the panel gives up, then PU-M0x cause 1 renders and nothing holds the passcode.
  • Given the box opens but the agent is not the signed-in identity, then the passcode is discarded and PU-M0x cause 2 renders (d.6, unchanged).
  • Given the whole path, then no sealed box, seed or passcode appears in any URL, query string, fragment or history entry — asserted, not assumed.
  • Given the bridge, then it never holds plaintext, and a box on a sign-in that armed nothing is refused as today.
  • Given the change lands, then handoverPortClient's pu=/puaid= reading is gone, and no code path can complete a handover from a URL.
  • Proven at 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

task: sign-in-armed-handover
implements_flow: panel-unlock
implements_edge: "A2u -> M1 (approves with the unlock line on), A2u -> M0x (never arrived)"
wireframe:
  - docs/ux/wireframes/panel-unlock/pu-m1-members-unlocked.html
  - docs/ux/wireframes/panel-unlock/pu-m0-members-locked.html
  - docs/ux/wireframes/panel-unlock/pu-m0x-couldnt-unlock.html
interface: |
  door: "did this session's sign-in arm a handover?" -> bool
  door: take the panel's verkey for that sign-in -> the sealed box, ONCE, then deleted
  panel: mint in tab memory, ask, open in the bundle, assert the agent AID
  REMOVED: reading pu=/puaid= from the panel URL (#1957's transport, option A)
seam: internal/idp/appdoor_seam_test.go + dashboard/tests/unit
acceptance:
  - given: a sign-in approved with the unlock line on
    when: the panel lands and asks with a fresh verkey
    then: the wallet seals to that key and Members renders unlocked with nothing typed
  - given: a sign-in with the line off
    when: the panel lands
    then: PU-M0 renders plain-locked with no waiting screen
  - given: the whole path
    when: it is inspected
    then: no box, seed or passcode appears in any URL, fragment or history entry
depends_on: []
out_of_scope: [the wallet's arming (matou-app#674), the fresh-unlock route (#1959, landed)]
needs_human_decision: []

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

## Parent - **Design:** ADR 0282 d.2/d.6 + its armed-consent amendment, now carrying **Ben's ruling of 2026-09-28: the panel asks after it lands** (option B), and the obligations block that ruling is checked against. - **Replaces the transport from:** #1957, which shipped a client reading `pu=`/`puaid=` off the panel URL (option A, rejected). - **The wallet half:** matou-app#674 (arm at approve, seal when asked). ## 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: 1. **The door answers whether the sign-in armed a handover.** An unarmed session (the unlock line was off) must be *plain-locked* — PU-M0 with no waiting screen — not a panel that sits waiting for something nobody promised. 2. **The door takes the panel's verkey against that sign-in**, asks the armed wallet for the box, and hands it back **once**, then deletes it. A box on a sign-in that armed nothing is still refused, as today. 3. **The panel's transport is rewritten** to do this, and **#1957's URL-reading path is removed** — leaving it would keep a second, contradictory mechanism alive in the code. ### 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 - [ ] **Given** a sign-in approved with the unlock line **on**, **when** the panel lands and asks with a freshly minted verkey, **then** the wallet seals to **that** verkey, the door relays it once, and Members renders unlocked with nothing typed. - [ ] **Given** a sign-in with the line **off**, **when** the panel lands, **then** the door answers that nothing was armed, no keypair is minted, and PU-M0 renders plain-locked with **no** waiting screen. - [ ] **Given** an armed handover already collected, **when** a second tab asks, **then** it gets nothing and stays locked. - [ ] **Given** the wallet does not answer inside the window, **when** the panel gives up, **then** **PU-M0x cause 1** renders and nothing holds the passcode. - [ ] **Given** the box opens but the agent is not the signed-in identity, **then** the passcode is discarded and PU-M0x cause 2 renders (d.6, unchanged). - [ ] **Given** the whole path, **then** no sealed box, seed or passcode appears in any URL, query string, fragment or history entry — asserted, not assumed. - [ ] **Given** the bridge, **then** it never holds plaintext, and a box on a sign-in that armed nothing is refused as today. - [ ] **Given** the change lands, **then** `handoverPortClient`'s `pu=`/`puaid=` reading is **gone**, and no code path can complete a handover from a URL. - [ ] Proven at `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 ```yaml task: sign-in-armed-handover implements_flow: panel-unlock implements_edge: "A2u -> M1 (approves with the unlock line on), A2u -> M0x (never arrived)" wireframe: - docs/ux/wireframes/panel-unlock/pu-m1-members-unlocked.html - docs/ux/wireframes/panel-unlock/pu-m0-members-locked.html - docs/ux/wireframes/panel-unlock/pu-m0x-couldnt-unlock.html interface: | door: "did this session's sign-in arm a handover?" -> bool door: take the panel's verkey for that sign-in -> the sealed box, ONCE, then deleted panel: mint in tab memory, ask, open in the bundle, assert the agent AID REMOVED: reading pu=/puaid= from the panel URL (#1957's transport, option A) seam: internal/idp/appdoor_seam_test.go + dashboard/tests/unit acceptance: - given: a sign-in approved with the unlock line on when: the panel lands and asks with a fresh verkey then: the wallet seals to that key and Members renders unlocked with nothing typed - given: a sign-in with the line off when: the panel lands then: PU-M0 renders plain-locked with no waiting screen - given: the whole path when: it is inspected then: no box, seed or passcode appears in any URL, fragment or history entry depends_on: [] out_of_scope: [the wallet's arming (matou-app#674), the fresh-unlock route (#1959, landed)] needs_human_decision: [] ``` --- *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.com/claude-code) https://claude.ai/code/session_015es4bpK4qRqZhrRYQBWCiY
Author
Member

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 cookie idss_idp_session, whose value is the bare AID — a public, forgeable identifier looked up in held[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?

  • (A) Accept the AID-bearer cookie as the binding (matches ADR 0196's existing SSO posture; explicitly risks passcode theft by anyone knowing a live steward's AID — I judge this too weak for a whole-identity passcode).
  • (B) Mint a high-entropy, single-use handover capability server-side at sign-in and deliver it to the panel via an OIDC ID-token claim / userinfo (never a URL), required on bind + collect. Bigger — touches token minting and the gate hop; may warrant a split.
  • (C) Some other panel↔sign-in continuity mechanism.

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's pu=/puaid= URL reading (AC8). signingSession.ts is already transport-agnostic (signInArmed() + requestHandover({mode:'sign-in'})), so only handoverPortClient.ts changes 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.

## 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 cookie `idss_idp_session`, whose **value is the bare AID** — a public, forgeable identifier looked up in `held[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?** - **(A)** Accept the AID-bearer cookie as the binding (matches ADR 0196's existing SSO posture; explicitly risks passcode theft by anyone knowing a live steward's AID — I judge this too weak for a whole-identity passcode). - **(B)** Mint a high-entropy, single-use handover capability server-side at sign-in and deliver it to the panel via an OIDC ID-token claim / userinfo (never a URL), required on bind + collect. Bigger — touches token minting and the gate hop; may warrant a split. - **(C)** Some other panel↔sign-in continuity mechanism. 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`'s `pu=`/`puaid=` URL reading (AC8). `signingSession.ts` is already transport-agnostic (`signInArmed()` + `requestHandover({mode:'sign-in'})`), so only `handoverPortClient.ts` changes 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.
Author
Member

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: setSessionCookie writes Value: aid with nothing signing it, and completeFromSession accepts it on nothing but held[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:

  • high-entropy and single-use, bound to that one sign-in, dying with the challenge — not a session, not an identity, not a credential, and never accepted as authentication for anything else;
  • delivered to the panel over the OIDC channel — never a URL, never a fragment, never a cookie, never derived from the AID;
  • required on bind (the panel registers the verkey it has just minted) and required on collect (the panel takes the sealed box). Each exactly once.

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.

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:

  • a bind or collect presenting no capability, a wrong one, a spent one, or an expired one is refused — each its own case;
  • a bind or collect that presents only a forged idss_idp_session cookie (any AID) is refused;
  • the capability appears in no URL, query string, fragment, history entry or log — asserted, not assumed (this is AC8's sibling, and the reason #1957's shipped transport is being removed);
  • an unarmed sign-in still answers not armed, so the seat is plain-locked (PU-M0) with no waiting screen.

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 deletes handoverPortClient's pu=/puaid= URL reading.

## 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: `setSessionCookie` writes `Value: aid` with nothing signing it, and `completeFromSession` accepts it on nothing but `held[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**: - **high-entropy and single-use**, bound to that one sign-in, dying with the challenge — not a session, not an identity, not a credential, and never accepted as authentication for anything else; - delivered to the panel **over the OIDC channel** — never a URL, never a fragment, never a cookie, never derived from the AID; - **required on bind** (the panel registers the verkey it has just minted) and **required on collect** (the panel takes the sealed box). Each exactly once. 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: - a bind or collect presenting **no** capability, a **wrong** one, a **spent** one, or an **expired** one is refused — each its own case; - a bind or collect that presents only a forged `idss_idp_session` cookie (any AID) is refused; - the capability appears in **no** URL, query string, fragment, history entry or log — asserted, not assumed (this is AC8's sibling, and the reason #1957's shipped transport is being removed); - an unarmed sign-in still answers *not armed*, so the seat is plain-locked (PU-M0) with no waiting screen. 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 deletes `handoverPortClient`'s `pu=`/`puaid=` URL reading.
Author
Member

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:

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.

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:

  • The control panel (admin.<apex>) is served behind the gate's forward_auth (ADR 0074/0038). The SPA holds no OIDC access token — there is no access_token/id_token/token storage anywhere in dashboard/src.
  • It learns its identity from GET /api/v1/me (internal/controlapi/me.go), resolved off the SSO cookie via a SessionResolver → the tier's standing decider. /me reads 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 (/me or 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/collect routes, the wallet-facing key-and-seal route, the panel transport rewrite that deletes handoverPortClient's pu=/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

  • #1967 (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 the present-route armed signal that replaces #1933's eager sealed_passcode (the wallet arms at Approve, seals when asked — matou-app#674). This is the dependency. It can start immediately.
  • This ticket (#1961) is blocked on #1967. Once the panel can read the capability, the ready-to-build remainder Ben listed lands: the door's bind/collect routes, the wallet-facing seal route, the golden's option-B section, and the transport rewrite deleting pu=/puaid=.

To re-arm

Land #1967, then re-add ready-for-agent here. 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).

## 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: > **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. 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: - The control panel (`admin.<apex>`) is served **behind the gate's `forward_auth`** (ADR 0074/0038). The SPA holds **no OIDC access token** — there is no `access_token`/`id_token`/token storage anywhere in `dashboard/src`. - It learns its identity from **`GET /api/v1/me`** (`internal/controlapi/me.go`), resolved off the **SSO cookie** via a `SessionResolver` → the tier's standing decider. `/me` reads 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 (`/me` or 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`/`collect` routes, the wallet-facing key-and-seal route, the panel transport rewrite that deletes `handoverPortClient`'s `pu=`/`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 - **#1967** (`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 the `present`-route **armed** signal that replaces #1933's eager `sealed_passcode` (the wallet arms at Approve, seals when asked — matou-app#674). This is the dependency. It can start immediately. - **This ticket (#1961)** is blocked on #1967. Once the panel can read the capability, the ready-to-build remainder Ben listed lands: the door's `bind`/`collect` routes, the wallet-facing seal route, the golden's option-B section, and the transport rewrite deleting `pu=`/`puaid=`. ### To re-arm Land #1967, then re-add `ready-for-agent` here. 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).
Author
Member

Unblocked — both splits landed; clearing the stale agent-blocked.

  • #1967 (1784e119): the armed sign-in mints the capability and delivers it over the OIDC channel. The mint is gated on armed && panel; it rides a handover_capability userinfo claim the gate captures at the code exchange; the panel reads it back from GET /api/v1/panel/handover, once.
  • #1969 (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/handover and 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’s pu=/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.ts on main), and sealForRequest is built and tested with no caller — it answers the route this ticket defines.

**Unblocked — both splits landed; clearing the stale `agent-blocked`.** - **#1967** (`1784e119`): the armed sign-in mints the capability and delivers it over the OIDC channel. The mint is gated on `armed && panel`; it rides a `handover_capability` userinfo claim the gate captures at the code exchange; the panel reads it back from **`GET /api/v1/panel/handover`**, once. - **#1969** (`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/handover` and 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`’s `pu=`/`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.ts` on `main`), and `sealForRequest` is built and tested with no caller — it answers the route this ticket defines.
Author
Member

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

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

close-report for #1961 — status success

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

envelope
{
  "issue": 1961,
  "status": "success",
  "commits": [
    "be126a6bc713421d32c92702d899952663130050"
  ],
  "changed_files": [
    "STATUS.md",
    "dashboard/src/lib/api/handoverPortClient.ts",
    "dashboard/src/lib/mountRegistry.ts",
    "dashboard/tests/unit/handoverPortClient.test.ts",
    "internal/idp/appdoor.go",
    "internal/idp/appdoor_handover.go",
    "internal/idp/appdoor_seam_test.go",
    "internal/idp/testdata/app-door-golden.json"
  ],
  "tests": [
    {
      "command": "go test ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "go build ./...",
      "exit_code": 0
    },
    {
      "command": "go vet ./internal/idp/",
      "exit_code": 0
    },
    {
      "command": "golangci-lint run ./internal/idp/ (via nix .#go-ci)",
      "exit_code": 0
    },
    {
      "command": "npx vitest run tests/unit/handoverPortClient.test.ts tests/unit/signingSession.test.ts tests/unit/panelHandover.test.ts",
      "exit_code": 0
    },
    {
      "command": "npx vue-tsc --noEmit -p tsconfig.json (dashboard)",
      "exit_code": 0
    },
    {
      "command": "npx eslint src/lib/api/handoverPortClient.ts src/lib/mountRegistry.ts tests/unit/handoverPortClient.test.ts",
      "exit_code": 0
    }
  ],
  "criteria": {
    "armed sign-in + panel binds a fresh verkey -> wallet seals to that verkey, door relays once, Members unlocked with nothing typed": "internal/idp/appdoor_seam_test.go TestSeam_AppDoor_SignInArmedHandover_BindReadSealCollectOnce (bind waiting -> wallet reads verkey -> seal -> collect answered with box + signed-in AID once); dashboard handoverPortClient.test.ts binds+polls POST /login/app/handover and returns the box; signingSession (unchanged) unlocks from the box",
    "line off -> door answers nothing armed, no keypair minted, PU-M0 plain-locked with no waiting screen": "handoverPortClient signInArmed() returns false on an empty capability read BEFORE any keypair is minted (handoverPortClient.test.ts 'not armed' + 'does not bind or poll when the line was off'); #1967 already proves an unarmed sign-in mints no capability",
    "armed handover already collected -> a second tab gets nothing and stays locked": "TestSeam_AppDoor_SignInArmedHandover_SecondTabGetsNothing (second collect = 409 refused/spent, no box)",
    "wallet does not answer inside the window -> PU-M0x cause 1, nothing holds the passcode": "TestSeam_AppDoor_SignInArmedHandover_DiesWithTheChallenge (collect/key/seal after the two-minute life -> expired/empty); handoverPortClient.test.ts rests kind:none on expired; signingSession (unchanged) maps none -> no-handover",
    "box opens but agent is not the signed-in identity -> passcode discarded, PU-M0x cause 2 (d.6, unchanged)": "the collect route returns the door-recorded signed-in AID (TestSeam ...BindReadSealCollectOnce asserts st.AID == id.AID); the bundle's unlockFromSealedBox agent-mismatch check in signingSession.ts is unchanged and still fails closed to cause 2",
    "no sealed box, seed or passcode in any URL, query string, fragment or history entry -- asserted": "the capability and verkey ride POST bodies, the box rides POST/response bodies; handoverPortClient.test.ts asserts JSON.parse(body[0]) carries capability+sealing_key and each URL !contains the capability; door routes read capability/box from the body (seam)",
    "bridge never holds plaintext, and a box on a sign-in that armed nothing is refused as today": "the door stores only ciphertext (handoverBox); TestSeam_AppDoor_SignInArmedHandover_SealRefusedWhenNothingArmed (a box for a sign-in with no capability -> 400 not-armed)",
    "handoverPortClient's pu=/puaid= reading is gone, and no code path can complete a handover from a URL": "handoverPortClient.ts rewritten -- locationSignInHandoff/SignInHandoff deleted; grep across dashboard/src+tests finds no remaining references; the sign-in leg reads the capability over the OIDC channel, not the URL",
    "proven at internal/idp's app-door seam and the dashboard's unit seam; the app-door golden gains the new routes": "6 new seam tests in appdoor_seam_test.go; 15 tests in handoverPortClient.test.ts; app-door-golden.json gains a sign_in_armed_handover section (panel bind+collect, wallet key, wallet seal)"
  },
  "cross_repo": [
    {
      "trigger": "internal/idp/testdata/app-door-golden.json",
      "issue": "Matou/matou-app#674"
    }
  ],
  "summary": "The freshly-landed panel binds its verkey and collects the sealed box against the single-use capability its armed sign-in minted; #1957's URL-reading path removed.",
  "blockers": []
}
**close-report** for #1961 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1961, "status": "success", "commits": [ "be126a6bc713421d32c92702d899952663130050" ], "changed_files": [ "STATUS.md", "dashboard/src/lib/api/handoverPortClient.ts", "dashboard/src/lib/mountRegistry.ts", "dashboard/tests/unit/handoverPortClient.test.ts", "internal/idp/appdoor.go", "internal/idp/appdoor_handover.go", "internal/idp/appdoor_seam_test.go", "internal/idp/testdata/app-door-golden.json" ], "tests": [ { "command": "go test ./internal/idp/", "exit_code": 0 }, { "command": "go test ./internal/controlapi/", "exit_code": 0 }, { "command": "go build ./...", "exit_code": 0 }, { "command": "go vet ./internal/idp/", "exit_code": 0 }, { "command": "golangci-lint run ./internal/idp/ (via nix .#go-ci)", "exit_code": 0 }, { "command": "npx vitest run tests/unit/handoverPortClient.test.ts tests/unit/signingSession.test.ts tests/unit/panelHandover.test.ts", "exit_code": 0 }, { "command": "npx vue-tsc --noEmit -p tsconfig.json (dashboard)", "exit_code": 0 }, { "command": "npx eslint src/lib/api/handoverPortClient.ts src/lib/mountRegistry.ts tests/unit/handoverPortClient.test.ts", "exit_code": 0 } ], "criteria": { "armed sign-in + panel binds a fresh verkey -> wallet seals to that verkey, door relays once, Members unlocked with nothing typed": "internal/idp/appdoor_seam_test.go TestSeam_AppDoor_SignInArmedHandover_BindReadSealCollectOnce (bind waiting -> wallet reads verkey -> seal -> collect answered with box + signed-in AID once); dashboard handoverPortClient.test.ts binds+polls POST /login/app/handover and returns the box; signingSession (unchanged) unlocks from the box", "line off -> door answers nothing armed, no keypair minted, PU-M0 plain-locked with no waiting screen": "handoverPortClient signInArmed() returns false on an empty capability read BEFORE any keypair is minted (handoverPortClient.test.ts 'not armed' + 'does not bind or poll when the line was off'); #1967 already proves an unarmed sign-in mints no capability", "armed handover already collected -> a second tab gets nothing and stays locked": "TestSeam_AppDoor_SignInArmedHandover_SecondTabGetsNothing (second collect = 409 refused/spent, no box)", "wallet does not answer inside the window -> PU-M0x cause 1, nothing holds the passcode": "TestSeam_AppDoor_SignInArmedHandover_DiesWithTheChallenge (collect/key/seal after the two-minute life -> expired/empty); handoverPortClient.test.ts rests kind:none on expired; signingSession (unchanged) maps none -> no-handover", "box opens but agent is not the signed-in identity -> passcode discarded, PU-M0x cause 2 (d.6, unchanged)": "the collect route returns the door-recorded signed-in AID (TestSeam ...BindReadSealCollectOnce asserts st.AID == id.AID); the bundle's unlockFromSealedBox agent-mismatch check in signingSession.ts is unchanged and still fails closed to cause 2", "no sealed box, seed or passcode in any URL, query string, fragment or history entry -- asserted": "the capability and verkey ride POST bodies, the box rides POST/response bodies; handoverPortClient.test.ts asserts JSON.parse(body[0]) carries capability+sealing_key and each URL !contains the capability; door routes read capability/box from the body (seam)", "bridge never holds plaintext, and a box on a sign-in that armed nothing is refused as today": "the door stores only ciphertext (handoverBox); TestSeam_AppDoor_SignInArmedHandover_SealRefusedWhenNothingArmed (a box for a sign-in with no capability -> 400 not-armed)", "handoverPortClient's pu=/puaid= reading is gone, and no code path can complete a handover from a URL": "handoverPortClient.ts rewritten -- locationSignInHandoff/SignInHandoff deleted; grep across dashboard/src+tests finds no remaining references; the sign-in leg reads the capability over the OIDC channel, not the URL", "proven at internal/idp's app-door seam and the dashboard's unit seam; the app-door golden gains the new routes": "6 new seam tests in appdoor_seam_test.go; 15 tests in handoverPortClient.test.ts; app-door-golden.json gains a sign_in_armed_handover section (panel bind+collect, wallet key, wallet seal)" }, "cross_repo": [ { "trigger": "internal/idp/testdata/app-door-golden.json", "issue": "Matou/matou-app#674" } ], "summary": "The freshly-landed panel binds its verkey and collects the sealed box against the single-use capability its armed sign-in minted; #1957's URL-reading path removed.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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#1961
No description provided.