-
Notifications
You must be signed in to change notification settings - Fork 826
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
build(deps): bump opensaml2 from 2.6.6 to 4.0.1 #2908
base: develop
Are you sure you want to change the base?
Conversation
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/187710947 The labels on this github issue will be updated when the story is started. |
...ava/org/cloudfoundry/identity/uaa/provider/saml/SamlLegacyAliasResponseForwardingFilter.java
Fixed
Show fixed
Hide fixed
65b0d64
to
e67a40a
Compare
a761b67
to
7de27a1
Compare
0d3a595
to
f199f50
Compare
46248b9
to
290f89c
Compare
46248b9
to
b6cb65b
Compare
a97457f
to
745fff3
Compare
needed later for SLO
in case of decryption issue (wrong key) do not show class internals
Found in manual test with SAML SLO , POST Binding
…0-saml-session-index
…-index Store saml session index in UaaSamlPrincipal
* Cleanup libraries not needed anymore bound to old opensaml * Remove ESAPI finally this dependency is only there because of old saml * fix rebase
# Conflicts: # dependencies.gradle
Will add more coverage in Saml2Utils
Signed-off-by: Duane May <[email protected]>
} | ||
|
||
if (!identityProviderDefinitions.isEmpty()) { | ||
SamlIdentityProviderDefinition identityProviderDefinition = identityProviderDefinitions.get(0); |
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.
This is an unexpected behavior, because we use then first found trust material to verify the incoming SAML message.
|
||
for (SamlIdentityProviderDefinition identityProviderDefinition : identityProviderDefinitions) { | ||
if (identityProviderDefinition.getIdpEntityAlias().equals(registrationId)) { | ||
return createRelyingPartyRegistration(registrationId, identityProviderDefinition, currentZone); |
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.
This is a search by origin only. In case of SAML bearer we dont have the origin key in the token (SAML assertion) but only the issuer.
A loop is something I would like to omit because we now have an alternative , see #2825
<ds:KeyInfo xmlns:ds="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5+ucVCwGc5ogKNGzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBCwUAA4IBAQAvMS4EQeP/ipV4jOG5lO6/tYCb/iJeAduOnRhkJk0DbX329lDLZhTTL/x/w/9muCVcvLrzEp6PN+VWfw5E5FWtZN0yhGtP9R+vZnrV+oc2zGD+no1/ySFOe3EiJCO5dehxKjYEmBRv5sU/LZFKZpozKN/BMEa6CqLuxbzb7ykxVr7EVFXwltPxzE9TmL9OACNNyF5eJHWMRMllarUvkcXlh4pux4ks9e6zV9DQBy2zds9f1I3qxg0eX6JnGrXi/ZiCT+lJgVe3ZFXiejiLAiKB04sXW3ti0LW3lx13Y1YlQ4/tlpgTgfIJxKV6nyPiLoK0nywbMd+vpAirDt2Oc+hk |
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.
Can we omit the key (default key) in the production ?
I found identitfied this xml as part of test package... if the template is needed isnt a constant string (without key) a better approach ?
|
||
@Override | ||
public Authentication convert(HttpServletRequest request) throws AuthenticationException { | ||
RelyingPartyRegistration relyingPartyRegistration = relyingPartyRegistrationResolver.resolve(request, null); |
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.
This returns the dummy IdP registration.
boolean addNew; | ||
IdentityProvider<SamlIdentityProviderDefinition> idp; | ||
SamlIdentityProviderDefinition samlConfig; | ||
try { |
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.
a 2nd lookup in DB. right now dont have a better idea, but I would do it earlier, before signature validation
|
||
Assertion assertion = parseAssertion(assertionXml); | ||
Saml2AuthenticationToken authenticationToken = new Saml2AuthenticationToken(relyingPartyRegistration, assertionXml); | ||
process(authenticationToken, assertion); |
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.
here we validate signature, but we are not confident that we have the correct IdP
Did not found a security problem, but the error messages are misleading because then you see always signature error message
return Base64.getEncoder().encodeToString(b); | ||
} | ||
|
||
public static byte[] samlDecode(String s) { |
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.
missing methods for SAML bearer which needs UrlDecoder for Base64.
SAML2 bearer and IdP initated flows are similar and the IdP initiated flow still is not working. The resolver needs to be forked / implemented on Uaa side, I assume then we can resolve from issuer to idP . SAML2 bearer works now independent from amount of SAML2 trusts, #3132 |
Replacing the other feature branch #2862 for new SAML library replacement effort.
Sonar
https://sonarcloud.io/summary/new_code?id=cloudfoundry-identity-parent&pullRequest=2908