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

fix: improve and standardize the DIF Presentation Exchange implementation #396

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

elribonazo
Copy link
Contributor

@elribonazo elribonazo commented Feb 28, 2025

Description:

This PR ensures compliance with the DIF Presentation exchange protocol V2

Added fixes to properly validate submissions recursively using descriptor_item format and nested_paths.
Presentation Submission can now contain jwt_vc only, combination of jwt_vp + jwt_vc and sd_jwt submissions.
Added test coverage for edge cases, invalid or missing signatures and attributes

Checklist:

  • My PR follows the contribution guidelines of this project
  • My PR is free of third-party dependencies that don't comply with the Allowlist
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked the PR title to follow the conventional commit specification

…rsive approach

fix: add sd_jwt standard as valid format recently added to the specs
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
@elribonazo elribonazo requested a review from a team as a code owner February 28, 2025 14:29
Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
@coveralls
Copy link

coveralls commented Feb 28, 2025

Pull Request Test Coverage Report for Build 13702759772

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 80 of 93 (86.02%) changed or added relevant lines in 5 files are covered.
  • 82 unchanged lines in 16 files lost coverage.
  • Overall coverage increased (+1.2%) to 74.996%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/pollux/utils/jwt/SDJWT.ts 10 12 83.33%
src/pollux/utils/jwt/CreateSDJWT.ts 13 18 72.22%
src/plugins/internal/dif/PresentationVerify.ts 42 48 87.5%
Files with Coverage Reduction New Missed Lines %
src/castor/Castor.ts 1 69.15%
src/edge-agent/didcomm/CreatePeerDID.ts 1 87.1%
src/edge-agent/didcomm/HandleOOBInvitation.ts 1 92.0%
src/edge-agent/helpers/RunProtocol.ts 1 86.67%
src/domain/models/Credential.ts 2 66.67%
src/edge-agent/protocols/issueCredential/IssueCredential.ts 2 61.54%
src/pluto/repositories/builders/BaseRepository.ts 2 74.19%
src/pluto/Pluto.ts 4 83.54%
src/pluto/rxdb/Store.ts 4 66.67%
src/edge-agent/protocols/pickup/PickupReceived.ts 5 12.5%
Totals Coverage Status
Change from base Build 13545200167: 1.2%
Covered Lines: 3395
Relevant Lines: 4324

💛 - Coveralls

Signed-off-by: Francisco Javier Ribo Labrador <[email protected]>
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