-
Notifications
You must be signed in to change notification settings - Fork 253
feat: add support for iso 18013-7 dc api #2922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
TimoGlastra
wants to merge
11
commits into
main
Choose a base branch
from
feat/iso-18013-7-dc-api
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
51ed367
feat: add support for iso 18013-7 dc api
TimoGlastra 8f1e31b
Merge remote-tracking branch 'origin/main' into feat/iso-18013-7-dc-api
TimoGlastra 17bfcc9
chore: formatting
TimoGlastra bf0689c
fix: tests
TimoGlastra 7166bee
fix: rework askar
TimoGlastra 54ee767
fix: update to canonniczalize 3
TimoGlastra 2b82238
fix: use legacy trusted certificates callback
TimoGlastra 1357c63
fix(openid4vp): use the KMS supported algorithms for encryption
TimoGlastra fd95698
feat: update @owf libs and match DC API responses against the device …
TimoGlastra 9611e3b
Merge remote-tracking branch 'origin/main' into feat/iso-18013-7-dc-api
TimoGlastra 18cff53
chore: address feedback
TimoGlastra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| '@credo-ts/core': patch | ||
| --- | ||
|
|
||
| Update `@owf/mdoc`, `@owf/cose` and `@owf/token-status-list`, which add ISO/IEC 18013-5 conformance checks to mdoc verification: | ||
|
|
||
| - Device signed elements must be authorized by the `keyAuthorizations` in the MSO (9.1.3.4). Creating a device response with `deviceNameSpaces` the mdoc does not authorize now throws. `Mdoc.sign` accepts a new `keyAuthorizations` option to authorize namespaces or individual data elements. | ||
| - A CWT status list referenced by an mdoc must have an expiration time (12.3.6.3), and its `sub` must equal the URI it is referenced by. Pass `expiresAt` when creating a CWT token status list for mdocs. | ||
| - A device response with a status other than `0` must not contain documents, and a document must not contain the same element identifier twice in a namespace. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| --- | ||
| '@credo-ts/drizzle-storage': patch | ||
| '@credo-ts/askar': patch | ||
| '@credo-ts/core': patch | ||
| '@credo-ts/node': patch | ||
| --- | ||
|
|
||
| Add support for the ISO/IEC TS 18013-7:2025 Annex C (`org-iso-mdoc`) Digital Credentials API. | ||
|
|
||
| - KMS: HPKE (RFC 9180) key agreement algorithms `HPKE-0`, `HPKE-3` and `HPKE-7`, following the | ||
| naming of draft-ietf-jose-hpke-encrypt. These are integrated-encryption algorithms, so | ||
| `encryption`/`decryption` must be omitted and `encrypt` returns an `encapsulatedKey`. Implemented | ||
| in the askar backend (the recipient private key stays inside askar; only the Diffie-Hellman output | ||
| leaves it) and in the node backend. | ||
| - Mdoc module: `createDcApiVerificationSession` / `verifyDcApiResponse` for verifiers and | ||
| `resolveDcApiRequest` / `createDcApiResponse` for wallets, backed by a new | ||
| `MdocVerificationSessionRecord`. | ||
| - `verifyDcApiResponse` matches the response against the device request of the session and throws | ||
| a `MdocDeviceRequestNotSatisfiedError` when a doc request is not satisfied. By default every | ||
| requested element must be disclosed and issuer signed; pass `deviceRequestElements` to | ||
| `createDcApiVerificationSession` to mark elements as optional or as device signed. The match is | ||
| returned as `deviceRequestMatch`. | ||
| - Reader authentication on an incoming request is resolved through the same trust layers as | ||
| credential verification: the certificates passed to `resolveDcApiRequest`, then the global | ||
| `getTrustedIssuersForVerification` callback (with the new `mdocReaderAuth` verification type, | ||
| called per doc request), then the deprecated `getTrustedCertificatesForVerification` callback, | ||
| then the statically configured trusted certificates. Resolving a reader authenticated request | ||
| throws when none of these are configured. Return the leaf certificate from the callback to trust | ||
| a reader on the certificate it presented itself. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| "@credo-ts/openid4vc": patch | ||
| "@credo-ts/askar": patch | ||
| "@credo-ts/node": patch | ||
| --- | ||
|
|
||
| Only pick a response encryption key from `client_metadata.jwks` that the key management backends of the agent can actually perform the `ECDH-ES` key agreement with. Previously the first recognized `enc` key was used, which failed later on if e.g. a verifier included a `P-521` key and the configured KMS backend (such as Askar) does not support that curve. The Askar and Node key management backends now also take the curve of the external public key into account in `isOperationSupported`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the other changelog entries don't do line wrapping, this one does.