Skip to content

fix(step-up): signing in to a relying party enrolls it for its own step-ups - #456

Merged
stormer78 merged 1 commit into
mainfrom
fix/step-up-trusts-signed-in-rp
Nov 26, 2026
Merged

stormer78 merged 1 commit into
mainfrom
fix/step-up-trusts-signed-in-rp

Conversation

@stormer78

Copy link
Copy Markdown
Contributor

A holder signed in to a did-hosting control plane is refused on the first privileged change (e.g. saving an ACL entry):

step-up approve-request refused: signed by did:webvh:…:webvh.storm.ws, not an executor this wallet is enrolled with

The only way through was pasting the control plane's DID into Options → Enrolled executor DIDs, and nothing pointed there.

Why the requirement protected nothing here

Before the offscreen verifies anything, an RP session step-up has already passed these checks:

  • Sign-in pin: the background refuses unless the step-up's rpDid is the RP DID the page's origin was pinned to by a sign-in the human approved (pageStepUpBindingRefusal).
  • Signer: verifyRpStepUpRequest requires the approve-request to be signed by that rpDid.
  • Scope: the approve-response is addressed to that RP and bound to its own session's single-use challenge, so it can only elevate that RP's own session.

The human already confirmed this RP at the login prompt. Requiring it a second time in settings added a refusal the human couldn't act on.

Change

  • page-task-policy.ts: new rpStepUpExecutorDids(enrolled, pinnedRpDid, rpDid). It returns the enrolled set, plus the pinned RP only when it equals rpDid.
  • background.ts: after the binding check passes, passes the pin it read as signedInRpDid on OffscreenApproveSessionStepUpRequest. It is set by the background, never by the page.
  • offscreen.ts: doApproveSessionStepUp feeds rpStepUpExecutorDids(...) to performRpStepUp.
  • Unchanged: executor-initiated pushes (task consent, disclosure step-up) arrive from no origin and still use the enrolled set alone.
  • options.tsx: the help text says signed-in sites are enrolled automatically.
  • CLAUDE.md: records the rule and what would break it.

Tests

  • New: extension tests/page-rp-binding.test.mts adds 3 tests: pinned RP added when it matches, not added for another RP, unchanged with no pin.
  • Suite: full extension suite, 1603 pass.
  • Build: tsc -b and npm run build succeed, and the CI bundle guards (admin, key-material, persona, mediator URIs) pass locally.

Pre-merge checklist (vti-stack-development-guide §9)

  • No new reqwest::Client::new() / bare fetch(); all clients have finite timeouts (R1.2): no network code touched
  • No lock held across a network await (R1.3)
  • No local state committed before its remote effect, or the flow is resumable with an idempotency key (R2.1): no state written
  • Every retry is bounded + backed off; non-idempotent ops are not blind-retried (R1.4): n/a
  • Accept/poll/listen loops survive transient errors (R1.5): n/a
  • Acks/deletes happen only after durable handoff (R1.6): n/a
  • New/changed wire types: camelCase, deny_unknown_fields where security-relevant, schema registered, all consumers (incl. JS) updated (R3.*): internal background→offscreen message only (signedInRpDid, optional)
  • Config absence = most restrictive; fail-closed if enforcement can't start (R5.*): no pin means no widening
  • Logs/status claim only what was verified; background-job failures are surfaced (R6.*)
  • "Process dies on the next line" answered for every mutation touched (R2.1): no mutations
  • Deviations from this guide flagged explicitly with rule numbers: none

…ep-ups

A holder signed in to a did-hosting control plane was refused on the first
privileged change ("step-up approve-request refused: signed by <control
plane DID>, not an executor this wallet is enrolled with"). The only fix was
pasting that DID into Options → Enrolled executor DIDs, which nothing pointed
to.

The requirement protected nothing on this path. The background already
refuses a step-up unless its rpDid is the RP the origin was pinned to by an
approved sign-in (pageStepUpBindingRefusal); the approve-request must be
signed by that rpDid; and the approve-response is addressed to it and bound
to its own session's single-use challenge. So the background now passes the
pin it checked (signedInRpDid, never page-supplied) to the offscreen, and
rpStepUpExecutorDids adds it to the enrolled set when it equals the rpDid.

Executor-initiated pushes (task consent, disclosure step-up) arrive from no
origin and keep the enrolled set alone. The options help text and CLAUDE.md
say so.

Signed-off-by: Glenn Gore <glenn.g@affinidi.com>
@stormer78
stormer78 merged commit 2fd70c1 into main Nov 26, 2026
4 checks passed
@stormer78
stormer78 deleted the fix/step-up-trusts-signed-in-rp branch November 26, 2026 06:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant