Skip to content

feat: [SIW-2088] Update credentials data model to 0.9.1 #207

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

Conversation

RiccardoMolinari95
Copy link
Collaborator

@RiccardoMolinari95 RiccardoMolinari95 commented Mar 31, 2025

Warning

Superseded by #219

List of Changes

This PR updates the credential data model to version 0.9.1 of the technical rules(https://italia.github.io/eid-wallet-it-docs/v0.9.1/en/) :

  1. Updated the TypeMetadata of a digital credential (https://italia.github.io/eid-wallet-it-docs/v0.9.1/en/pid-eaa-data-model.html#digital-credential-metadata-type)
  2. Updated the issuing flow of a credential by presenting the PID and the WIA. (The WIA has been considered as a credential in the SD-JWTformat.)

Motivation and Context

Updated the credential issuing flow and the credential data model to comply with version 0.9.1 of the technical rules

How Has This Been Tested?

It is currently not possible to test the credential release flow to version 0.9.1 of the technical rules, as we need to wait for the issuer to update to version 0.9.1.

Screenshots (if appropriate):

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

gispada and others added 30 commits January 29, 2025 12:38
Base automatically changed from SIW-2106-remote-presentation-example to master March 31, 2025 12:31
@RiccardoMolinari95 RiccardoMolinari95 changed the base branch from master to SIW-2087-pid-0.9.x March 31, 2025 12:35
@RiccardoMolinari95 RiccardoMolinari95 changed the base branch from SIW-2087-pid-0.9.x to master March 31, 2025 12:39
@RiccardoMolinari95 RiccardoMolinari95 changed the base branch from master to SIW-2087-pid-0.9.x March 31, 2025 13:38
Copy link

dpulls bot commented Mar 31, 2025

⚠️ Dpulls not installed on repository pagopa/io-react-native-wallet. Checkout our quickstart for how to install.

@pagopa pagopa deleted a comment from dpulls bot Mar 31, 2025
@pagopa pagopa deleted a comment from dpulls bot Mar 31, 2025
@pagopa pagopa deleted a comment from dpulls bot Mar 31, 2025
@pagopa pagopa deleted a comment from dpulls bot Mar 31, 2025
@pagopa pagopa deleted a comment from dpulls bot Mar 31, 2025
@RiccardoMolinari95 RiccardoMolinari95 marked this pull request as ready for review March 31, 2025 14:35
Comment on lines +210 to +233
// The credentials to be presented will always include the PID and WIA
// in a credential issuance flow
const credentialsSdJwt = [
[pid.keyTag, pid.credential],
[WIA_KEYTAG, walletInstanceAttestation],
] as [string, string][];

if (!requestObject.dcql_query) {
throw new Error("Invalid request object");
}

// Assuming that WIA is a SD-JWT
const dcqlQueryResult = Credential.Presentation.evaluateDcqlQuery(
credentialsSdJwt,
requestObject.dcql_query as DcqlQuery
);

const credentialsToPresent = dcqlQueryResult.map(
({ requiredDisclosures, ...rest }) => ({
...rest,
requestedClaims: requiredDisclosures.map(([, claimName]) => claimName),
})
);

Copy link
Contributor

@grausof grausof Apr 2, 2025

Choose a reason for hiding this comment

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

I'd say wait before merging. There's some last minute news. See openid/OpenID4VP#318 (comment)

@gispada
Copy link
Collaborator

gispada commented Apr 15, 2025

See PR #219.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants