-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Use POST binding for logout when REDIRECT url is not set and forced POST #40757
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
Conversation
Closes keycloak#40637 Signed-off-by: rmartinc <rmartinc@redhat.com>
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.
Unreported flaky test detected, please review
Sorry, something went wrong.
All reactions
Unreported flaky test detectedIf the flaky tests below are affected by the changes, please review and update the changes accordingly. Otherwise, a maintainer should report the flaky tests prior to merging the PR. org.keycloak.testsuite.cluster.ComponentInvalidationClusterTest#crudWithFailover
|
All reactions
Sorry, something went wrong.
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.
@rmartinc Thanks!
Sorry, something went wrong.
All reactions
@rmartinc While I agree, the the "default fallback" changed, which is fixed by your update, I am not sure if we still behave like users would expect. |
All reactions
Sorry, something went wrong.
@nxpthx Yes, the only important change is that if, and it is just executed in the last case when there is no redirect logout Url (only adminUrl). So I think we are good. It's a bit of a corner case when there is no specific logout URL configured. |
All reactions
Sorry, something went wrong.
keycloak-github-bot[bot]
mposolda
Successfully merging this pull request may close these issues.
Front logout channel broken in 26.2.5 for saml
Closes #40637
A little regression created in 26.2 for SAML by #32262. Previously if just the admin URL (master SAML processing URL) was set, POST was used for frontchannel logout (see this line in 26.1.5). After that issue the default is REDIRECT for that configuration, even if force POST is configured to ON in the client. I also changed that method to do a short-circuit evaluation (reversing the order and returning immediately). The meaningful change is
if (postUrlSet && !redirectUrlSet)
toif (!redirectUrlSet && (postUrlSet || samlClient.forcePostBinding()))
. Created one integration test and modified the unitary test too.Note that I didn't revert the functionality completely because IMHO it makes more sense like it is in the PR. The issue is only when there is only master saml processing URL, in that case previously it was always POST, currently is always REDIRECT, and with the PR its POST or REDIRECT depending the configuration of the
Force POST binding
switch. Normally the logout URLs are filled if you use a SP descriptor to create the client, and theForce POST binding
switch is by default set to true.