-
Notifications
You must be signed in to change notification settings - Fork 6k
SAML2 Provider SubjectConfirmation validation failure #7514
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
Comments
Thank you for the report. Give me some time to review the different use cases. I would like to get a feel for how common actual address validation is in the majority of scenarios. Using IP addresses in an environment where IP addresses are becoming very fluid (virtualized environments, cloud, container based) feels a bit like it doesn't apply as much. However, we shouldn't be failing, so what are our options? Do we provide an option to validate or disable that check? |
I agree that address validation isn't necessarily useful, but if you view the source code for The result = validateAddress(confirmation, assertion, context);
if (result != ValidationResult.VALID) {
return result;
} From there, OpenSamlAuthenticationProvider will throw a In summary, I think the provider should support validation of the address (which may be a hostname or IP) as well as the ability to disable (or ignore) specific #7517 Provides a solution to validate the address |
I totally agree that it should not fail. Let me digest whether we actually want to perform the check, or disable it. |
@fhanik - Have you had a chance to look into this yet? |
Hi @blucas Thanks for the ping. It's on my list for Monday. Right now I'm favoring bypassing the check in its entirety. With more and more systems going to a fluid cloud where addresses become irrelevant that check seems superfluous. The system already does the |
@fhanik - Thanks for the update. Let me know if there is anything I can do to help. |
Summary
When validating the assertion, if the IdP has provided a
SubjectConfirmation
which matches theBearer
method, the validation will fail. This is due to the fact that theOpenSamlAuthenticationProvider
does not set the necessary parameterThis parameter is used to obtain valid address and compare it to what has been provided in the assertion. But as this parameter is not set this code block fails.
Actual Behavior
SubjectConfirmation validation fails.
Expected Behavior
SubjectConfirmation validation should succeed.
Configuration
Version
spring-security-5.2.0
spring-boot-2.2.0-RC1
Sample
@fhanik FYI.
The text was updated successfully, but these errors were encountered: