Add EncryptedElementType key resolver to SAML plugin#7268
Conversation
Codecov Report
@@ Coverage Diff @@
## main #7268 +/- ##
============================================
+ Coverage 10.38% 12.67% +2.29%
- Complexity 6651 8641 +1990
============================================
Files 2453 2716 +263
Lines 242444 256114 +13670
Branches 37941 39926 +1985
============================================
+ Hits 25168 32461 +7293
- Misses 214159 219524 +5365
- Partials 3117 4129 +1012
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
Kudos, SonarCloud Quality Gate passed! |
|
I'm not sure what's going on with that Jenkins build. I can see that it is looking for |
|
Ok looks like I'm not the only PR failing in the same way... |
|
That looks like a warning as it's trying to download/fetch opensaml dependency from a maven repo which doesn't have it. Ignorable as build works. @blueorangutan package |
|
@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
yadvr
left a comment
There was a problem hiding this comment.
code lgtm, this would need manual regression testing with a known SAML provide such as https://samltest.id etc.
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5642 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-6232)
|
|
@blueorangutan package |
|
@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5739 |
|
@blueorangutan package |
|
@rohityadavcloud a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
@blueorangutan test keepEnv |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Packaging result: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 5824 |
|
@blueorangutan test keepEnv |
|
@borisstoyanov a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-6353)
|
borisstoyanov
left a comment
There was a problem hiding this comment.
LGTM,
Managed to manually regression test it with a simple saml server, didn't had any issues.
|
Considering smoketests from #7268 (comment) and manual QA, LGTM, merging. |
There are multiple ways in which a SAML response can be formatted, especially when encryption is enabled. This PR removes the hardcoding of EncryptedKeyResolver= InlineEncryptedKeyResolver in favor of using a ChainingEncryptedKeyResolver which will try multiple resolvers. It preserves the InlineEncryptedKeyResolver as the first option but adds EncryptedElementTypeEncryptedKeyResolver to the chain of resolvers to try. ChainingEncryptedKeyResolver is a bit finicky in that you can't provide it a list of resolvers, you can only fetch its internal list and add to it. Theoretically we could add all of the resolver types to the chain, but for now just preserving the ones known to be in use. Co-authored-by: Marcus Sorensen <mls@apple.com>








Description
There are multiple ways in which a SAML response can be formatted, especially when encryption is enabled. This PR removes the hardcoding of
EncryptedKeyResolver=InlineEncryptedKeyResolverin favor of using aChainingEncryptedKeyResolverwhich will try multiple resolvers. It preserves theInlineEncryptedKeyResolveras the first option but addsEncryptedElementTypeEncryptedKeyResolverto the chain of resolvers to try.ChainingEncryptedKeyResolveris a bit finicky in that you can't provide it a list of resolvers, you can only fetch its internal list and add to it.Theoretically we could add all of the resolver types to the chain, but for now just preserving the ones known to be in use.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
How Has This Been Tested?
Tested locally against an installed IDP that provides the
EncryptedElementTypeof XML response.