Skip to content

feat: pre-flight CS-007 — Credential Presentation via the Digital Credentials API - #246

Open
leifj wants to merge 5 commits into
mainfrom
feat/cs-07-dc-api
Open

feat: pre-flight CS-007 — Credential Presentation via the Digital Credentials API#246
leifj wants to merge 5 commits into
mainfrom
feat/cs-07-dc-api

Conversation

@leifj

@leifj leifj commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Pre-flight conformance specification for credential presentation using the W3C Digital Credentials API (navigator.credentials.get() with OpenID4VP).

Summary

This adds CS-007 as a pre-flight CS (per the ADR in PR #245) that defines how OpenID4VP credential presentation works when the browser's DC API serves as the invocation and transport layer.

Contents

  • CS-007 document (conformance-specs/cs-07-credential-presentation-dc-api.md)

    • Complements CS-002 by defining DC API as the invocation/transport mechanism
    • Same-device presentation via navigator.credentials.get() (§6.1)
    • Cross-device presentation via CTAP2 hybrid transport (§6.2)
    • Normative requirements for wallet units (WU-DC-01–06) and verifiers (VP-DC-01–07)
    • Requires protocol: "openid4vp-v1-signed" for signed authorization requests with verifier X.509 authentication
    • Requires response_type: dc_api.jwt for encrypted, integrity-protected responses (VP-DC-07)
    • Feature detection via DigitalCredential.userAgentAllowsProtocol()
    • Platform support considerations: two polyfill strategies for environments lacking DC API support
      • Browser extension polyfill (wallet-side): enables web wallets to participate via a credential provider proxy
      • Verifier-side polyfill (JS library or WASM): unified API with fallback to openid4vp:// or cross-device QR
  • README update: CS-007 added to the under-development table

API surface (aligned with W3C Editor's Draft, 9 July 2026)

const credential = await navigator.credentials.get({
  digital: {
    requests: [{
      protocol: "openid4vp-v1-signed",
      data: signedOpenid4vpRequest
    }]
  }
});

Dependencies

References

Pre-flight conformance specification for credential presentation using
the W3C Digital Credentials API (navigator.identity.get with OpenID4VP).

- Complements CS-002 by defining DC API as invocation/transport layer
- Normative requirements for wallet units and verifiers
- Platform support considerations: browser extension polyfill (wallet-side)
  and verifier-side polyfill (JS/WASM) for fallback to direct OpenID4VP
- References W3C DC API, OpenID4VP, and OpenID4VP-over-DC-API specs
- Updates README with CS-007 in the under-development table
@leifj
leifj requested review from a team, Saramandus and lalc July 4, 2026 21:44
@Saramandus

Copy link
Copy Markdown
Contributor

This is in regards to #209

@Saramandus
Saramandus requested a review from stefan-kauhaus July 6, 2026 09:08
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
@stefan-kauhaus stefan-kauhaus mentioned this pull request Jul 7, 2026
@leifj

leifj commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

I updated the spec to cover CTAP+hybrid ... but this doesn't really affect the invocation or testing, its just informational.

Address review feedback: cross-device via CTAP2 hybrid transport is
architecturally distinct from CS-002's QR-direct-submission flow and
warrants its own section.

- Add §6.2 describing cross-device flow via hybrid transport
- Add WU-DC-06 and VP-DC-06 requirements (SHOULD-level)
- Refine scope: clarify which cross-device pattern is out of scope
- Update issuance exclusion wording (not yet mature)
- Add CTAP 2.2 hybrid transport reference [7]
- Update Chrome version to 141+ per ecosystem support matrix
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
@filip-hladky

Copy link
Copy Markdown
Collaborator

@leifj Hi Leif, I have left some comments in text since there was update to API and data in spec so we are up to date

@leifj

leifj commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

good catch - I was looking at an older version of the spec. Will fix.

Address review comments from @filip-hladky:

- navigator.identity.get() → navigator.credentials.get() (deprecated API)
- providers[] → requests[] (deprecated field name)
- protocol "openid4vp" → "openid4vp-v1-signed" (signed requests required
  for verifier authentication via X.509)
- request: JSON.stringify(...) → data: <object> (data member takes object)
- Add VP-DC-07: require response_type dc_api.jwt for encrypted responses
- Update feature detection to DigitalCredential.userAgentAllowsProtocol()
- Update W3C spec reference URL to current Editor's Draft location
@leifj

leifj commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Turns out my polyfill implementation at https://github.com/sirosfoundation/dc-api (@sirosfoundation/dc-api on npmjs) already used the right injection points.

@georgepadayatti georgepadayatti left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for this PR. I have reviewed and suggested some changes.

Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
@sander sander linked an issue Jul 15, 2026 that may be closed by this pull request
Per review feedback from @stefan-kauhaus: the DC API's role in issuance
is lightweight (carries the credential offer, then OID4VCI takes over)
but too thin for a separate CS. Include it here.

Adds:
- §6.3: Issuance flow via navigator.credentials.create() with openid4vci-v1
- §7.3: Issuer requirements (IS-DC-01–05)
- WU-DC-07/08: Wallet issuance requirements
- Updated title, scope, roles, and conformance section
- Reference [8]: OID4VCI specification

@endimion endimion left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

really good thanks @leifj my main concern is that section 8 while useful is IMO out of scope for an interop CS...

Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md
Comment thread conformance-specs/cs-07-credential-presentation-dc-api.md Outdated
1. Remove 'Wallet Companion' from §4 Roles table (implementation detail)
2. Fix code example: data must wrap JWT in { request: ... } object
3. Clarify §6.1.2: data.request is JWS Compact Serialization per [4] §A.3.2.1
4. Rewrite VP-DC-07: response_mode=dc_api.jwt, response_type=vp_token
5. Add VP-DC-08: expected_origins MUST be in signed DC API requests
6. Add WU-DC-09: wallet MUST validate origin against expected_origins
7. Mark §8 as informative (non-normative implementation guidance)
8. Pin [1] to dated W3C Working Draft (2026-07-15)
9. Remove dead [5] (404 URL) — DC API profile is OID4VP Appendix A [4]
10. Renumber references [5]=[ecosystem], [6]=[CTAP], [7]=[OID4VCI]
@endimion

Copy link
Copy Markdown
Collaborator

looks good from me as well! Thanks @leifj already tooke the liberty of adding support for CS07 in ITB+ https://dev-i4mlab.aegean.gr/itb/app#/admin/domains/1/specifications/2/testsuites/21/testcases/124 with an optional VP case... will add an issuance one as well

@lalc

lalc commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Good to merge in my mind. Great job @leifj

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.

CS-007 DC API

9 participants