-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Propagate saml authentication exception gh-7375 #7432
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
Propagate saml authentication exception gh-7375 #7432
Conversation
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...org/springframework/security/saml2/provider/service/authentication/Saml2ValidationError.java
Outdated
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
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.
Thanks, @fhanik, for the PR. I've left some feedback inline.
final SAML20AssertionValidator validator = getAssertionValidator(token); | ||
Map<String, Object> validationParams = new HashMap<>(); | ||
validationParams.put(SAML2AssertionValidationParameters.SIGNATURE_REQUIRED, false); | ||
validationParams.put( | ||
SAML2AssertionValidationParameters.CLOCK_SKEW, | ||
this.responseTimeValidationSkew | ||
this.responseTimeValidationSkew.toMillis() |
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 should probably be in a separate commit so that it can either be tied to a new issue or to the original SAML support issue.
The main reason for this is that it's not about error propagation, which is the theme of this PR.
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Show resolved
Hide resolved
...org/springframework/security/saml2/provider/service/authentication/Saml2ValidationError.java
Outdated
Show resolved
Hide resolved
...c/integration-test/java/org/springframework/security/samples/Saml2LoginIntegrationTests.java
Outdated
Show resolved
Hide resolved
e0030fb
to
f3f1e95
Compare
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.
Thanks for the updates, @fhanik! I've left a bit more feedback inline.
...main/java/org/springframework/security/saml2/provider/service/authentication/Saml2Error.java
Outdated
Show resolved
Hide resolved
...java/org/springframework/security/saml2/provider/service/authentication/Saml2ErrorCodes.java
Show resolved
Hide resolved
...framework/security/saml2/provider/service/authentication/OpenSamlAuthenticationProvider.java
Outdated
Show resolved
Hide resolved
...ngframework/security/saml2/provider/service/authentication/Saml2AuthenticationException.java
Show resolved
Hide resolved
...ngframework/security/saml2/provider/service/authentication/Saml2AuthenticationException.java
Outdated
Show resolved
Hide resolved
...c/integration-test/java/org/springframework/security/samples/Saml2LoginIntegrationTests.java
Outdated
Show resolved
Hide resolved
edf140a
to
d472e99
Compare
SAML Assertion validation should propagate errors: #7375