Fix SAML artifact binding failing to validate signed nested samlp:Response#50862
Conversation
cc6ac67 to
54bc5e4
Compare
There was a problem hiding this comment.
Pull request overview
Adds support for validating signed SAML responses nested inside artifact responses.
Changes:
- Registers ID attributes on signable nested protocol elements.
- Recognizes valid nested protocol signatures.
- Adds regression tests for nested and root signatures.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
JBossSAMLConstants.java |
Defines signable protocol elements. |
SAML2Signature.java |
Registers nested protocol IDs. |
XMLSignatureUtil.java |
Accepts nested protocol signatures. |
SAML2SignatureTest.java |
Tests artifact-response signatures. |
54bc5e4 to
53d0031
Compare
53d0031 to
b1f1bdf
Compare
b1f1bdf to
87eb7ab
Compare
87eb7ab to
21e7b98
Compare
| public static final Set<JBossSAMLConstants> SIGNED_PROTOCOL_ELEMENTS = Set.of( | ||
| RESPONSE__PROTOCOL, | ||
| LOGOUT_REQUEST, | ||
| LOGOUT_RESPONSE | ||
| ); |
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.cluster.RealmInvalidationClusterTest#crudWithFailoverKeycloak CI - Store IT (oracle) |
rmartinc
left a comment
There was a problem hiding this comment.
Thanks @jimmychakkalakal! LGTM in general, just a few suggestion to make it more readable. Just for your consideration, they are more nitpicks than real issues.
validate signed nested samlp:Response Closes keycloak#50684 Signed-off-by: Jimmy Chakkalakal <jimmy.chakkalakal@ibm.com>
…re readable Closes keycloak#50342 Signed-off-by: Jimmy Chakkalakal <jimmy.chakkalakal@ibm.com>
66e00d7 to
582cb62
Compare
|
@rmartinc Thanks for the nitpick suggestions. I have implemented those. The code is now more readable and clean. Please review when you have time. Thanks in advance! |
rmartinc
left a comment
There was a problem hiding this comment.
Thanks @jimmychakkalakal! LGTM!
…ponse (keycloak#50862) * Fix SAML artifact binding failing to validate signed nested samlp:Response Closes keycloak#50684 Signed-off-by: Jimmy Chakkalakal <jimmy.chakkalakal@ibm.com> * Worked on reviewers nitpicks suggestions, that made code clean and more readable Closes keycloak#50342 Signed-off-by: Jimmy Chakkalakal <jimmy.chakkalakal@ibm.com> --------- Signed-off-by: Jimmy Chakkalakal <jimmy.chakkalakal@ibm.com>
Fix SAML artifact binding failing to validate signed nested samlp:Response
Closes #50684