Skip to content

feat(oid4vp): display the fronted RP's identity from the verifier_info members - #468

Open
leifj wants to merge 3 commits into
release/sirosidfrom
feat/verifier-info-display
Open

leifj wants to merge 3 commits into
release/sirosidfrom
feat/verifier-info-display

Conversation

@leifj

@leifj leifj commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

What

An intermediary-signed request carries the ETSI TS 119 472-2 §6.3.2.2 verifier_info members — the registrar dataset (B.2) with the fronted relying party's srvDescription, purpose, policyURI, and NTR identifier. The wallet displayed the raw x509_hash client ID because the members were parsed away.

The change — both transport paths

DC-API companion path (the QR link's callback page):

  • The request parse carries the verifier_info members through (Zod schema + JWT parse)
  • frontedRpDisplay extracts the fronted RP's identity: srvDescription localized to the user's language (then English, then the first entry), falling back to the NTR identifier
  • The consent screen's verifierInfo.name uses the fronted RP's name

WS transport path (the main app):

  • Depends on go-wallet-backend PR #556 — the engine relays the verifier_info members in the credential_selection progress payload. #556 is merged and released in go-wallet-backend v0.25.3; this PR's WS path activates when the environment's engine is at that version or later.
  • The WS transport's mapVerifierInfo picks them up and overrides the display name with the same frontedRpDisplay extraction

A verifier-signed request omits the members and the display name is the trust result's name, unchanged.

Tests

4 new tests for frontedRpDisplay: the localized extraction, the language fallback chain, the NTR identifier fallback, and the null cases. 430 tests total, typecheck and lint clean.

Found live in the WRPAC drill: the presentation completed end to end but the wallet showed the x509_hash client ID instead of 'WRPAC-drillens frontade part'.

…o members

An intermediary-signed request carries the ETSI TS 119 472-2 §6.3.2.2
verifier_info members — the registrar dataset (B.2) with the fronted
relying party's srvDescription, purpose, policyURI, and NTR identifier.
The wallet displayed the raw x509_hash client_id because the
verifier_info members were parsed away: the DCAPIRequest schema dropped
them and the consent screen's name came only from the trust
evaluation's result.

The request parse now carries the verifier_info members through, and
the consent screen shows the fronted RP's srvDescription (localized to
the user's language, falling back to English then the first entry) or
the NTR identifier when no description exists — exactly as the 472-2
profile intends: the party the user consents to is the fronted RP, not
the intermediary that signed the request.

A verifier-signed request omits the members and the display name is
the trust result's name, unchanged. The WS transport path requires
the go-wallet-backend to relay the members in its flow payload (the
engine currently sends only the trust result) — a separate change.
@leifj
leifj requested a review from a team as a code owner November 17, 2026 21:33
@changeset-bot

changeset-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 3ca99fe

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
wallet-frontend Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

…engine's relayed verifier_info

The go-wallet-backend now relays the 472-2 §6.3.2.2 verifier_info
members in the credential_selection progress payload (the
feat/relay-verifier-info branch). The WS transport picks them up and
overrides the consent screen's display name with the fronted RP's
srvDescription, the same localized extraction the DC-API companion
path uses.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unauthenticated verifier information can alter the consent-screen name for trusted kid-only requests, while malformed localization data can abort presentation and wallet language preferences are ignored.

3 open issues
What changed in this PR

Adds fronted relying-party identity display to the wallet’s DC API presentation flow using ETSI verifier_info, instead of showing the intermediary’s identifier. WebSocket support depends on separate backend relay work.

Changes:

  • Preserves verifier_info through signed-request parsing.
  • Adds localized identity extraction with English, first-entry, and identifier fallbacks.
  • Uses extracted identity in presentation results and adds four helper tests.
File Description
src/​lib/​openid-flow/​platforms/​dc-api/​verifierInfoDisplay.ts Extracts localized RP identity and related registrar metadata.
src/​lib/​openid-flow/​platforms/​dc-api/​verifierInfoDisplay.test.ts Tests extraction, language fallbacks, identifier fallback, and absent data.
src/​lib/​openid-flow/​platforms/​dc-api/​resources.ts Allows optional verifier information in signed requests.
src/​lib/​openid-flow/​platforms/​dc-api/​DCAPIRequest.ts Retains JWT verifier information and exposes an accessor.
src/​hooks/​useOID4VPFlow.ts Prefers fronted RP name and purpose in DC API flow results.

Review effort: Balanced

// omits the members and the trust result's name is the display
// name, exactly as before.
const fronted = frontedRpDisplay(
request.verifierInfoMembers,
// name, exactly as before.
const fronted = frontedRpDisplay(
request.verifierInfoMembers,
navigator.language || 'en',

@smncd smncd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the comments, the PR needs a changeset

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems to be used not just for DC API, so it should live somewhere else, for example in src/lib/openid-flow/utils/fronted-relying-party.ts

* null when the request carries none (a verifier-signed request, or the
* members don't have usable display data).
*/
export function frontedRpDisplay(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this function would benefit from a zod schema that is validated rather than writing it's own validation logic

- fronted-relying-party.ts lives in utils/ (not dc-api/ — it's used
  by both transport paths)
- The registrar dataset validates through a zod schema instead of
  hand-written shape checks
- The changeset added
@leifj
leifj requested review from smncd and a balanced review from Copilot November 18, 2026 10:40
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
54.5% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A kid-only signed request can override the relying-party display name without signature verification while retaining trusted status, allowing an unauthenticated identity to appear on the consent screen.

4 open issues
1 resolved since last review

Review effort: Balanced

if (payload?.verifier_info && result.verifierInfo) {
const fronted = frontedRpDisplay(
payload.verifier_info as VerifierInfoElement[],
navigator.language || 'en',
Comment on lines +48 to +49
if (!members?.length) return null;
const dataset = members.find((m) => m.format === 'registrar_dataset');
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.

3 participants