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

feat: add support for openid4vp response encryption (JARM) #2046

Merged
merged 15 commits into from
Oct 8, 2024

Conversation

auer-martin
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Sep 27, 2024

🦋 Changeset detected

Latest commit: f9773c4

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

This PR includes changesets to release 14 packages
Name Type
@credo-ts/openid4vc Patch
@credo-ts/action-menu Patch
@credo-ts/anoncreds Patch
@credo-ts/askar Patch
@credo-ts/bbs-signatures Patch
@credo-ts/cheqd Patch
@credo-ts/core Patch
@credo-ts/drpc Patch
@credo-ts/indy-sdk-to-askar-migration Patch
@credo-ts/indy-vdr Patch
@credo-ts/node Patch
@credo-ts/question-answer Patch
@credo-ts/react-native Patch
@credo-ts/tenants Patch

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

Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

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

Nice!! Some small remarks

let jarmEncryptionJwk: (JwkJson & { kid: string; use: 'enc' }) | undefined

if (mode === SphereonResponseMode.DIRECT_POST_JWT) {
const key = await agentContext.wallet.createKey({ keyType: KeyType.P256 })
Copy link
Contributor

Choose a reason for hiding this comment

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

I think key type should match the key type being used to sign the request (it could even be the same key?!)

nonce: input.nonce,
})

const res = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const res = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt)
const req = await AuthorizationRequest.fromUriOrJwt(verificationSession.authorizationRequestJwt)

authorizationResponsePayload = request.body
}

verificationSession = await getVerificationSession(agentContext, {
Copy link
Contributor

Choose a reason for hiding this comment

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

We already fetch ot above. Can't we reuse that?

@@ -704,7 +708,7 @@ describe('OpenId4Vc', () => {
})
})

it('e2e flow with verifier endpoints verifying a sd-jwt-vc with selective disclosure', async () => {
it('e2e flow (jarm) with verifier endpoints verifying a sd-jwt-vc with selective disclosure', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also keep a non-jarm test?

@TimoGlastra
Copy link
Contributor

Oh also: should we add a simple check to make sure the jarm enc alg is supported etc? Also we don't add the required metadata params i think?

auer-martin and others added 4 commits September 29, 2024 18:25
Signed-off-by: Martin Auer <martin.auer97@gmail.com>
Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra TimoGlastra changed the title Jarm feat: add support for openid4vp response encryption (JARM) Oct 8, 2024
@TimoGlastra TimoGlastra marked this pull request as ready for review October 8, 2024 12:46
Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra TimoGlastra enabled auto-merge (squash) October 8, 2024 12:58
@TimoGlastra TimoGlastra disabled auto-merge October 8, 2024 13:02
@TimoGlastra TimoGlastra merged commit 1d83159 into openwallet-foundation:main Oct 8, 2024
12 of 14 checks passed
auer-martin added a commit to auer-martin/aries-framework-javascript that referenced this pull request Oct 15, 2024
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