Skip to content

Validate SAML broker logout response against logout request - #55467

Draft
theohh0 wants to merge 6 commits into
keycloak:mainfrom
theohh0:validate-logout-response
Draft

theohh0 wants to merge 6 commits into
keycloak:mainfrom
theohh0:validate-logout-response

Conversation

@theohh0

@theohh0 theohh0 commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Closes #55070

Logout requests now add their request ID and issuer to the userSession notes hashmap to assist response validation. I've also done this for backchannel logout requests although i'm not sure that was strictly necessary.

Validates:

  • that SAML broker logout responses match their inResponseTo to the corresponding logout request ID
  • that the IDP that is handling the logout response owns the logout
  • that the logout response issuer matches the logout request issuer

Still to address:

The private issue mentioned that: "SamlSessionUtils.java line 46: SessionIndex is userSessionId::clientId, exposing the session ID to all participating SPs" - I don't know if this is something we want changed as well or if its fine leaving it as is as long as this validation is in place.

Also probably worth adding tests for this validation based on the issue.

Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
…quest - (not sure this is necessary)

Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
Signed-off-by: theohh0 <theo.hinton-hallows@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broker LogoutResponse uses RelayState as direct session ID without provider correlation

1 participant