-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
OpenSaml4AuthenticationProvider should include secondary statusCode messages on error #11725
Comments
Thanks, @kha1989led, I think it makes sense to add this extra detail. Given that a top-level status code may have many secondary status codes, I think we should make sure to include each as an individual error message. Are you able to provide a PR to add this behavior? |
@jzheaux I can take stab at it. Is there a deadline for when I should provide the PR? |
Hi, @kha1989led, if you are still available, a PR would be most appreciated! |
Hi, can i try to resolve this? |
@jzheaux I have made a PR, can you check and merge please? |
Adjusted code styling to avoid nested ifs Closes gh-11725
- Use test objects - Ensure assertThat is checked Issue spring-projectsgh-11725
- Use test objects - Ensure assertThat is checked Issue gh-11725
Expected Behavior
Two cases:
When the
isPassive
flag is set totrue
, and the request is sent to an IdP that doesn't support passive mode, the expected statusCode isurn:oasis:names:tc:SAML:2.0:status:NoPassive
:Similarly, with the
isPassive
flag, is set totrue
, and the request is sent to an IdP that supports passive mode, but the user doesn't have a session yet with the IdP, the expected statusCode isurn:oasis:names:tc:SAML:2.0:status:NoPassive
Current Behavior
In the
createDefaultResponseValidator
method, when the request goes through case 1, the samlResponse looks like this:However, the
createDefaultResponseValidator
uses the outer statusCodeurn:oasis:names:tc:SAML:2.0:status:Responder
:Similarly, in case 2, the samlResponse looks like this:
and output from
createDefaultResponseValidator
isurn:oasis:names:tc:SAML:2.0:status:Requester
:Context
How has this issue affected you?
I can't tell if the source of the error is
NoPassive
or something else to decide how to proceed with the sign-in flow.What are you trying to accomplish?
I'm implementing a dynamic passive value for multi-tenants, and when the IdP doesn't support passive, or there's no session at the IdP, I'm detecting the error and using the
redirectStrategy
to send the user back to the main page. It's a public page that tries to passively log the user in if there's a session with the IdP.What other alternatives have you considered?
None.
Are you aware of any workarounds?
No.
The text was updated successfully, but these errors were encountered: