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: more resilient checks in verify signed attachments #2609

Merged
merged 2 commits into from
Nov 18, 2023

Conversation

dbluhm
Copy link
Member

@dbluhm dbluhm commented Nov 17, 2023

Fixes #2608.

This PR makes the signed attachment verification a bit more resilient. According to RFC 7515, there's no reason for us to strictly expect a kid to be present in the jwk and we can verify that the jwk corresponds to the kid in the header trivially. In short, the previous rigidity was unnecessary. This corrects that.

Signed-off-by: Daniel Bluhm <dbluhm@pm.me>
@dbluhm
Copy link
Member Author

dbluhm commented Nov 17, 2023

@swcurran acknowledging that we're somewhere on the verge of 0.11.0, I have no preference for whether this ends up in this release or a follow up patch release (I'll have other bigger changes queued up for a patch for things like did:peer:2 anyways).

@usingtechnology
Copy link
Contributor

@dbluhm - in Thailand so will not be able to review. Back late November.

@dbluhm dbluhm requested review from esune and removed request for usingtechnology November 17, 2023 04:25
Copy link

sonarcloud bot commented Nov 17, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@swcurran
Copy link
Member

@andrewwhitehead — since @usingtechnology is not around, can you please take a look at this one? Looks pretty straight forward to me :-)

@swcurran
Copy link
Member

Looks like the only change is to add a check for the kid before using it, instead of just using it. Right?

@dbluhm
Copy link
Member Author

dbluhm commented Nov 18, 2023

@swcurran pretty much, yep

@swcurran swcurran merged commit a81c2c7 into hyperledger:main Nov 18, 2023
9 checks passed
@dbluhm dbluhm deleted the fix/signed-attach-resilience branch January 30, 2024 21:30
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.

ACA-Py - AFJ: ACA-Py fails on DID Exchange Request
3 participants