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 verification/validation to IdentityAndTrustService
#3528
feat: add verification/validation to IdentityAndTrustService
#3528
Conversation
8dfd6c2
to
64c501b
Compare
* @param format indicates whether the VP is present in JWT or JSON-LD format | ||
* @param credential the {@link VerifiablePresentation}, as it was deserialized from the raw VP string. Note that JSON-LD and JWT VCs | ||
* have to be deserialized differently | ||
* @param rawVp A String containing the VP in its raw format. This must be exactly how it was originally received by the holder. |
Check notice
Code scanning / CodeQL
Spurious Javadoc @param tags Note
...re/src/main/java/org/eclipse/edc/iam/identitytrust/core/service/JwtPresentationVerifier.java
Fixed
Show fixed
Hide fixed
...service/src/main/java/org/eclipse/edc/iam/identitytrust/service/IdentityAndTrustService.java
Fixed
Show fixed
Hide fixed
* @param credential the {@link VerifiablePresentation}, as it was deserialized from the raw VP string. Note that JSON-LD and JWT VCs | ||
* have to be deserialized differently | ||
* @param rawVp A String containing the VP in its raw format. This must be exactly how it was originally received by the holder. | ||
* @param format indicates whether the VP is present in JWT or JSON-LD format |
Check notice
Code scanning / CodeQL
Spurious Javadoc @param tags Note
...t-spi/src/main/java/org/eclipse/edc/identitytrust/model/VerifiablePresentationContainer.java
Dismissed
Show dismissed
Hide dismissed
Codecov ReportAttention:
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #3528 +/- ##
==========================================
+ Coverage 72.21% 72.24% +0.02%
==========================================
Files 853 863 +10
Lines 17162 17304 +142
Branches 965 985 +20
==========================================
+ Hits 12394 12501 +107
- Misses 4359 4392 +33
- Partials 409 411 +2
☔ View full report in Codecov by Sentry. |
...ce/src/main/java/org/eclipse/edc/iam/identitytrust/verification/JwtPresentationVerifier.java
Fixed
Show fixed
Hide fixed
return result.map(u -> extractClaimToken(credentials)); | ||
} | ||
|
||
private ClaimToken extractClaimToken(List<VerifiableCredential> credentials) { |
Check notice
Code scanning / CodeQL
Useless parameter Note
IdentityAndTrustService
8ea5962
to
3070fb8
Compare
...trust-spi/src/main/java/org/eclipse/edc/identitytrust/verification/PresentationVerifier.java
Show resolved
Hide resolved
.filter(vm -> DidConstants.ALLOWED_VERIFICATION_TYPES.contains(vm.getType())) | ||
.findFirst(); | ||
} | ||
} |
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.
As discussed this implementation is almost similar to the verifyJwtToken
of the DecentralizedIdentityService
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.
yes, there are many similarities, also regarding JWT validation and verification. I'd prefer to do the harmonization and clean up later, so that the PR doesn't get blown out of proportion.
What this PR changes/adds
This PR adds basic scaffolding and collaborator interfaces for performing the validation and verification of VerifiablePresentations and SI tokens in the following ways
DidResolverRegistry
Why it does that
IATP adoption.
Further notes
Much of the actual code has been stubbed, to keep the PR relatively small and focused.
The following things are not yet implemented (currently mocked) and will follow either later or in subsequent PRs:
SignatureSuite
implementations are there, but there are some open questions about the formats. So we need to connect the dots.credentialSubject
)Linked Issue(s)
Closes #3496
Please be sure to take a look at the contributing guidelines and our etiquette for pull requests.