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

VCR: JWT support for credentials and presentations #2520

Merged
merged 10 commits into from
Oct 20, 2023
Merged

Conversation

reinkrul
Copy link
Member

@reinkrul reinkrul commented Sep 29, 2023

This PR adds support for creating and verifying VCs and VPs in JWT format.

TODO:

Requires nuts-foundation/go-did#87

Part of #2451

Note on VC/VP-JWT

The VC data model v1 specification of JWTs makes implementations complex:

  • Key discovery is out of scope
  • Where to put values (JWT headers or claims) is unspecified: could be both
  • When VC properties are present as claim, they may be omitted from the VC (e.g. iss v.s. vc.issuer), this leads to unspecified behavior when both are present.

This leads to interpretation of individual software vendors or the creation of profiles (https://identity.foundation/jwt-vc-presentation-profile/). However, given the current capabilities and target use of the Nuts node, we can safely address these:

  • Key discovery: require kid header for did:nuts and did:web. Make an exception for did:jwk: it holds a single key, so it can be derived from the iss JWT claim (appending #0).
  • Claims vs headers: the industry tends to favor JWT claims, so we just use these (proof: see example VC-JWT examples, all use claims)
  • When a VC/VP property is present as JWT claim, omit it from the VC/VP.

VC data model v2

VC data model v2 (which is in draft) reworks JWT encoding through https://w3c.github.io/vc-jose-cose/. Although this specification is more explicit and thus should be easier to implement, it is still in draft. So we should stick with VC data model v1 JWT of things (we also don't support VCs in v2 format).

Compatibility

Regarding compatibility: it Sphereon produces JWT VCs that seem compatible with both v1 and v2 (for v1 it includes the vc claim, and for v2 it puts the VC properties directly inside the JWT claims (duplication)).

@reinkrul reinkrul mentioned this pull request Sep 29, 2023
10 tasks
@reinkrul
Copy link
Member Author

Weirdness; with a VP from the Sphereon Wallet, the signer of the VP is a did:key, but the holder of the contained credential is a did:jwt. So the presenter is not the holder. Weird?

JWT VP:

eyJraWQiOiJkaWQ6a2V5Ono2TWtzRXl4NmQ1cEIxZWtvYVZtYUdzaWJiY1lIRTlWeHg3VjEzUFNxUHd4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VXV2xNUTBvMFNXcHZhVlpGWTNsVFJFbzBUVzFTV0ZkRk5IcGtWVTU0VjI1Q2VGSnFSalZqTUVaUlZWWmFSVk5yVms5WU1HZDBVVEF4TUZsdFpIRlphVEZQV25sSmMwbHVhMmxQYVVrMVZGUm9UMlZIVVhkVlJUUjVUV3N3TldKR1FrVmxSMUozVWtoQ2RsWkZlRFpOVkZZeldtNXNZVk51VFRKWGJXaE1VMVpXUzAxNlRUUkpiakFpZlEud2RodExYRTRqVTFDLTNZQkJwUDktcUUteWgxeE9aNmxCTEotMGU1X1NhN2ZuclVIY0FhVTFuM2tOMkNlQ3lUVmp0bTFVeTNUbDZSelVPTTZNalAzdlEiXX0sInByZXNlbnRhdGlvbl9zdWJtaXNzaW9uIjp7ImlkIjoidG9DdGp5Y0V3QlZCWVBsbktBQTZGIiwiZGVmaW5pdGlvbl9pZCI6InNwaGVyZW9uIiwiZGVzY3JpcHRvcl9tYXAiOlt7ImlkIjoiNGNlN2FmZjEtMDIzNC00ZjM1LTlkMjEtMjUxNjY4YTYwOTUwIiwiZm9ybWF0Ijoiand0X3ZjIiwicGF0aCI6IiQudmVyaWZpYWJsZUNyZWRlbnRpYWxbMF0ifV19LCJuYmYiOjE2OTU5OTU2MzYsImlzcyI6ImRpZDprZXk6ejZNa3NFeXg2ZDVwQjFla29hVm1hR3NpYmJjWUhFOVZ4eDdWMTNQU3FQd3hZUnpMIn0.w3guHX-pmxJGGn5dGSSIKSba9xywnOutDk-l3tc_bpgHEOSbcR1mmmCqX5sSlZM_G0hgAbgpIv_YYI5iQNIfCw

@reinkrul reinkrul requested review from woutslakhorst, stevenvegt and gerardsn and removed request for woutslakhorst and stevenvegt September 29, 2023 14:20
@woutslakhorst
Copy link
Member

Weirdness; with a VP from the Sphereon Wallet, the signer of the VP is a did:key, but the holder of the contained credential is a did:jwt. So the presenter is not the holder. Weird?

JWT VP:

eyJraWQiOiJkaWQ6a2V5Ono2TWtzRXl4NmQ1cEIxZWtvYVZtYUdza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2wzYVZrelNqSkphbTlwVlVNd2VVNVVXV2xNUTBvMFNXcHZhVlpGWTNsVFJFbzBUVzFTV0ZkRk5IcGtWVTU0VjI1Q2VGSnFSalZqTUVaUlZWWmFSVk5yVms5WU1HZDBVVEF4TUZsdFpIRlphVEZQV25sSmMwbHVhMmxQYVVrMVZGUm9UMlZIVVhkVlJUUjVUV3N3TldKR1FrVmxSMUozVWtoQ2RsWkZlRFpOVkZZeldtNXNZVk51VFRKWGJXaE1VMVpXUzAxNlRUUkpiakFpZlEud2RodExYRTRqVTFDLTNZQkJwUDktcUUteWgxeE9aNmxCTEotMGU1X1NhN2ZuclVIY0FhVTFuM2tOMkNlQ3lUVmp0bTFVeTNUbDZSelVPTTZNalAzdlEiXX0sInByZXNlbnRhdGlvbl9zdWJtaXNzaW9uIjp7ImlkIjoidG9DdGp5Y0V3QlZCWVBsbktBQTZGIiwiZGVmaW5pdGlvbl9pZCI6InNwaGVyZW9uIiwiZGVzY3JpcHRvcl9tYXAiOlt7ImlkIjoiNGNlN2FmZjEtMDIzNC00ZjM1LTlkMjEtMjUxNjY4YTYwOTUwIiwiZm9ybWF0Ijoiand0X3ZjIiwicGF0aCI6IiQudmVyaWZpYWJsZUNyZWRlbnRpYWxbMF0ifV19LCJuYmYiOjE2OTU5OTU2MzYsImlzcyI6ImRpZDprZXk6ejZNa3NFeXg2ZDVwQjFla29hVm1hR3NpYmJjWUhFOVZ4eDdWMTNQU3FQd3hZUnpMIn0.w3guHX-pmxJGGn5dGSSIKSba9xywnOutDk-l3tc_bpgHEOSbcR1mmmCqX5sSlZM_G0hgAbgpIv_YYI5iQNIfCw

did:key and did:jwk are both a did representation of a public key, so they could refer to the same public key.

Copy link
Member

@woutslakhorst woutslakhorst left a comment

Choose a reason for hiding this comment

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

@gerardsn mentioned that it's still unclear if the jwt formats are called jwt_vc or jwt_vc_json. Maybe we should be able to accept both?

crypto/jwx.go Show resolved Hide resolved
go.mod Outdated Show resolved Hide resolved
vcr/holder/wallet.go Show resolved Hide resolved
vcr/issuer/issuer.go Show resolved Hide resolved
vcr/verifier/verifier.go Show resolved Hide resolved
Comment on lines +166 to +176
if keyID != "" && strings.Split(keyID, "#")[0] != credential.Issuer.String() {
return errVerificationMethodNotOfIssuer
}
Copy link
Member

Choose a reason for hiding this comment

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

Is this the only validation that needs to be done according to spec?

Copy link
Member Author

Choose a reason for hiding this comment

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

The spec does not even state this (it vaguely hints it could do something like this), but we do it for JSON-LD, do we should do the same for JWT to avoid confusion (leading to vulnerabilities)

@reinkrul
Copy link
Member Author

reinkrul commented Oct 2, 2023

Weirdness; with a VP from the Sphereon Wallet, the signer of the VP is a did:key, but the holder of the contained credential is a did:jwt. So the presenter is not the holder. Weird?
JWT VP:

eyJraWQiOiJkaWQ6a2V5Ono2TWtzRXl4NmQ1cEIxZWtvYVZtYUdzaWJiY1lIRTlWeHg3VjEzUFNxUHd4WVJ6TCN6Nk1rc0V5eDZkNXBCMWVrb2FWbWFHc2liYmNZSEU5Vnh4N1YxM1BTcVB3eFlSekwiLCJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9.eyJ2cCI6eyJAY29udGV4dCI6WyJodHRwczovL3d3dy53My5vcmcvMjAxOC9jcmVkZW50aWFscy92MSIsImh0dHBzOi8vaWRlbnRpdHkuZm91bmRhdGlvbi9wcmVzZW50YXRpb24tZXhjaGFuZ2Uvc3VibWlzc2lvbi92MSJdLCJ0eXBlIjpbIlZlcmlmaWFibGVQcmVzZW50YXRpb24iLCJQcmVzZW50YXRpb25TdWJtaXNzaW9uIl0sInZlcmlmaWFibGVDcmVkZW50aWFsIjpbImV5SmhiR2NpT2lKRlV6STFOaUlzSW5SNWNDSTZJa3BYVkNKOS5leUpsZUhBaU9qRTJPVFl6TURFM01EZ3NJblpqSWpwN0lrQmpiMjUwWlhoMElqcGJJbWgwZEhCek9pOHZkM2QzTG5jekxtO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ZjEtMDIzNC00ZjM1LTlkMjEtMjUxNjY4YTYwOTUwIiwiZm9ybWF0Ijoiand0X3ZjIiwicGF0aCI6IiQudmVyaWZpYWJsZUNyZWRlbnRpYWxbMF0ifV19LCJuYmYiOjE2OTU5OTU2MzYsImlzcyI6ImRpZDprZXk6ejZNa3NFeXg2ZDVwQjFla29hVm1hR3NpYmJjWUhFOVZ4eDdWMTNQU3FQd3hZUnpMIn0.w3guHX-pmxJGGn5dGSSIKSba9xywnOutDk-l3tc_bpgHEOSbcR1mmmCqX5sSlZM_G0hgAbgpIv_YYI5iQNIfCw

did:key and did:jwk are both a did representation of a public key, so they could refer to the same public key.

I decoded and compared both, the did:key DID is a ed25591 key, the did:jwk a sec256k1 key

@reinkrul reinkrul requested a review from woutslakhorst October 9, 2023 06:23
Copy link
Member

@woutslakhorst woutslakhorst left a comment

Choose a reason for hiding this comment

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

LGTM

@woutslakhorst
Copy link
Member

Tests are failing though

@reinkrul reinkrul merged commit 0a369f7 into master Oct 20, 2023
6 checks passed
@reinkrul reinkrul deleted the vcr/jwt-support branch October 20, 2023 09:46
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