-
Notifications
You must be signed in to change notification settings - Fork 0
Review UVFMetadata compliance. #216
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
base: main
Are you sure you want to change the base?
Conversation
hub/src/main/java/cloud/katta/crypto/uvf/UvfMetadataPayload.java
Outdated
Show resolved
Hide resolved
3cea6e3 to
c981056
Compare
|
|
||
| @Test | ||
| void decryptWithRecoveryKey() throws ParseException, JOSEException, NoSuchAlgorithmException, InvalidKeySpecException, NotECKeyException, JsonProcessingException { | ||
| @Disabled("TODO uvf.spec.version missing in protected.") |
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.
Resolve.
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.
a1f129d to
7160037
Compare
| final Object uvfSpecVersion = jweObject.getHeader().getCustomParams().get(UVF_SPEC_VERSION_KEY_PARAM); | ||
| if(!"1".equals(uvfSpecVersion)) { | ||
| throw new SecurityFailure(String.format("Unexpected value for critical header %s: found %s, expected \"1\"", UVF_SPEC_VERSION_KEY_PARAM, uvfSpecVersion)); | ||
| } |
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.
@overheadhunter do we need/want to verify the spec version? Same then web.
https://datatracker.ietf.org/doc/html/rfc7515#section-4.1.11
Recipients MAY consider the JWS to be invalid if the critical
list contains any Header Parameter names defined by this
specification or [JWA] for use with JWS or if any other constraints on its use are violated.
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, needs to be checked. Also it needs to be an integer, not a String!
Resolves #209