Repository navigation
Handle missing Single Logout Service URL during SAML IdP-initiated logout (closes #53242) - #53281
Conversation
…loak#53242) Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The integration test does not verify session removal or successful logout-event delivery.
Review effort: Balanced
Findings: 2
Open (2)
What changed in this PR
Handles SAML IdP-initiated logout when no Single Logout Service URL is configured.
Changes:
- Returns a successful logout page instead of constructing an invalid response.
- Records logout success and avoids transaction rollback.
- Adds integration coverage for the missing-URL scenario.
| File | Description |
|---|---|
services/src/main/java/org/keycloak/broker/saml/SAMLEndpoint.java |
Handles blank logout service URLs safely. |
testsuite/integration-arquillian/tests/base/src/test/java/org/keycloak/testsuite/broker/KcSamlLogoutTest.java |
Tests the missing-URL logout flow. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
|
The SAML broker logout test coverage currently resides in KcSamlLogoutTest within the Arquillian testsuite (consistent with recent SAML logout changes such as #52592). Once SAML broker logout tests are migrated to the new test framework, this will follow along. |
|
Thanks, @atiqur-rahman-pro. |
…shold Signed-off-by: Atiqur Rahman <rahman.atiqur.pro@gmail.com>
Head branch was pushed to by a user without write access
|
Hi @pedroigor, all CI checks have completed successfully. The PR is clean and ready to merge. Thank you! |
|
Thanks, @atiqur-rahman-pro. |


Description
When an Identity Provider initiates SAML logout by sending a
LogoutRequestto Keycloak's broker endpoint, Keycloak completes the backchannel logout for the session, but then attempts to construct and send aLogoutResponse. If the SAML Identity Provider configuration has an empty or blankSingle Logout Service URL, Keycloak throws an uncaught HTTP 500 error (IllegalArgumentException: uri parameter is null).This PR:
singleLogoutServiceUrlis blank inSAMLEndpoint.LogoutResponse, records a success event, and returns the successful logout info page.KcSamlLogoutTest.Closes #53242