Skip to content
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

Add support for presentment of SD-JWT VCs via the W3C DC API. #890

Merged
merged 1 commit into from
Feb 25, 2025
Merged

Conversation

davidz25
Copy link
Contributor

This is a complicated change with several steps

  • Rename Claim, MdocClaim, VcClaim to in the .request package to RequestedClaim, RequestedMdocClaim, RequestedVcClaim to better reflect it's used for a request (no value is provided) and to free up these names.

  • Introduce Claim, MdocClaim, VcClaim which is used to model the claims / data elements in a credential.

  • Add new Credential.getClaims() method to get all the claims in a credential. This involves requiring each concrete Credential subclass to specify how issuer-provided data is formatted b/c getClaims() now depends on it. We already have this for SD-JWT, add this for ISO mdoc and make it so it's the same format as used in OpenID4VCI: IssuerSigned CBOR according to ISO/IEC 18013-5:2021. This makes Credential and SecureAreaBoundCredential abstract so update unit tests for this.

  • To make it easier to work with IssuerSigned CBOR, introduce new class IssuerNamespaces, IssuerNamespacesBuilder, and IssuerSignedItem classes and add support for this in DocumentGenerator and MobileSecurityObjectGenerator.

  • Extend DocumentType.addAttribute() to take different values for ISO mdoc and VC sample values.

  • This allows us to now remove nameSpacedData from DocumentMetadata.

  • Add new RenderClaimValue() composable to render a MdocClaim / VcClaim

  • Add new screens in testapp (DocumentViewerScreen, CredentialViewerScreen, CredentialClaimsViewerScreen) to show docouments, credentials, and claims.

  • Use this new machinery for presentment and exporting to the W3C DC API for both ISO mdoc and IETF SD-JWT credentials.

  • Update Credman matcher to support IETF SD-JWT credentials.

  • Update EUPersonalID to latest ARF (version 1.5)

  • Make DrivingLicense mdoc-only (according to ARF it should only be a mdoc)

  • Update JsonWebEncryption.encrypt to take APU and APV as strings.

Test: Manually tested (both samples/testapp and wallet module)
Test: New unit tests and all unit tests pass.

@davidz25 davidz25 requested a review from sorotokin February 25, 2025 16:46
@davidz25 davidz25 force-pushed the claims branch 2 times, most recently from c7b42b1 to d0a0b48 Compare February 25, 2025 18:21
This is a complicated change with several steps:

- Rename Claim, MdocClaim, VcClaim in the request package to RequestedClaim,
  RequestedMdocClaim, RequestedVcClaim to better reflect it's used for a
  request (no value is provided) and to free up these names.

- Introduce Claim, MdocClaim, VcClaim which is used to model the claims /
  data elements in a credential.

- Add new Credential.getClaims() method to get all the claims in a credential.
  This involves requiring each concrete Credential subclass to specify how
  issuer-provided data is formatted b/c getClaims() now depends on it. We
  already have this for SD-JWT, add this for ISO mdoc and make it so it's the
  same format as used in OpenID4VCI: IssuerSigned CBOR according to ISO/IEC
  18013-5:2021. This makes Credential and SecureAreaBoundCredential abstract
  so update unit tests for this.

- To make it easier to work with IssuerSigned CBOR, introduce new class
  IssuerNamespaces, IssuerNamespacesBuilder, and IssuerSignedItem classes
  and add support for this in DocumentGenerator and
  MobileSecurityObjectGenerator.

- Extend DocumentType.addAttribute() to take different values for ISO mdoc
  and VC sample values.

- This allows us to now remove nameSpacedData from DocumentMetadata.

- Add new RenderClaimValue() composable to render a MdocClaim / VcClaim

- Add new screens in testapp (DocumentViewerScreen, CredentialViewerScreen,
  CredentialClaimsViewerScreen) to show docouments, credentials, and claims.

- Use this new machinery for presentment and exporting to the W3C DC API
  for both ISO mdoc and IETF SD-JWT credentials.

- Update Credman matcher to support IETF SD-JWT credentials.

- Update EUPersonalID to latest ARF (version 1.5)

- Make DrivingLicense mdoc-only (according to ARF it should only be a mdoc)

- Update JsonWebEncryption.encrypt to take APU and APV as strings.

Test: Manually tested (both samples/testapp and wallet module)
Test: New unit tests and all unit tests pass.
Signed-off-by: David Zeuthen <[email protected]>
@davidz25 davidz25 merged commit 73cf970 into main Feb 25, 2025
5 checks passed
@davidz25 davidz25 deleted the claims branch February 25, 2025 20:45
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.

2 participants