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: allow optional field, add extra alg types #173

Merged

Conversation

TimoGlastra
Copy link
Contributor

This PR does three things:

  • Allow optional in the v2 schema (per @cykoder's comment)
  • Add extra alg values ( i don't think we should be matching these at all, now evertime a new value is used it will break)
  • Return the errors from the PD validation, as it's now very hard to know what is wrong about the PD (i always add this code manually in node_modules build)

Discovered when trying to handle a presentation request with PD from DanubeTech universal verifier (https://oid4vp.univerifier.io/)

Signed-off-by: Timo Glastra <timo@animo.id>
Signed-off-by: Timo Glastra <timo@animo.id>
@TimoGlastra
Copy link
Contributor Author

@nklomp should we just remove the alg value validation? i think this will be more flexible

Signed-off-by: Timo Glastra <timo@animo.id>
Copy link

codecov bot commented Oct 24, 2024

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 89.95%. Comparing base (64ac85e) to head (23137eb).
Report is 4 commits behind head on develop.

Files with missing lines Patch % Lines
lib/utils/VCUtils.ts 33.33% 2 Missing ⚠️
lib/types/SSITypesBuilder.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #173      +/-   ##
===========================================
- Coverage    92.81%   89.95%   -2.87%     
===========================================
  Files           66       66              
  Lines         2715     2718       +3     
  Branches       705      705              
===========================================
- Hits          2520     2445      -75     
- Misses         194      255      +61     
- Partials         1       18      +17     
Flag Coverage Δ
unittest 89.95% <40.00%> (-2.87%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@nklomp
Copy link
Contributor

nklomp commented Oct 25, 2024

@nklomp should we just remove the alg value validation? i think this will be more flexible

I rather not. We can always add it. If formats are present they are required If I remember correctly.

@nklomp nklomp requested a review from sanderPostma October 25, 2024 12:03
@nklomp
Copy link
Contributor

nklomp commented Oct 25, 2024

@sanderPostma could you review please?

Copy link
Contributor

@sanderPostma sanderPostma left a comment

Choose a reason for hiding this comment

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

Mostly LGTM
But I have to talk to Niels about the pnpm version, so will put it on hold for now

.github/workflows/main.yml Show resolved Hide resolved
lib/utils/VCUtils.ts Show resolved Hide resolved
@sanderPostma sanderPostma merged commit be27cde into Sphereon-Opensource:develop Oct 25, 2024
1 of 3 checks passed
@TimoGlastra
Copy link
Contributor Author

I rather not. We can always add it. If formats are present they are required If I remember correctly.

I think it is a list of allowed/supported formats by the verifier. Not a requirement to support it in the wallet AFAIK?

Hmm okay. It just means that every new alg requires a new release. I think just interpretating it as string, especially because pex doesn't handle the actual crypto makes sense.

So to uodate we need to go pex -> oid4vp -> credo -> paradym. And that's not even for a crypto suite we want to support, but just to parse the presentation definition

Maybe it should at least be configurable from the outside?

@TimoGlastra TimoGlastra mentioned this pull request Oct 27, 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.

3 participants