Repository navigation
Conversation
… for unsupported methods Closes keycloak#54711 Signed-off-by: Pedro Igor <pigor.craveiro@gmail.com>
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The documentation incorrectly implies that unsupported subject-confirmation methods cause login failure even when a valid bearer confirmation is present.
What changed in this PR
This PR tightens SAML identity-broker validation to require a valid bearer subject confirmation, preventing holder-of-key-only assertions from being accepted without proof of key possession.
Changes:
- Reject assertions without a bearer confirmation while preserving acceptance of mixed-method assertions with a valid bearer confirmation.
- Add regression tests and helpers for unsupported methods and expired bearer data.
- Document the bearer-confirmation requirement in administrator and upgrade guides.
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/saml/SamlResponseDocument.java |
Adds helpers to modify subject confirmations and expire their data. |
tests/base/src/test/java/org/keycloak/tests/broker/saml/KcSamlBrokerTest.java |
Tests unsupported-only and mixed-method assertions. |
services/src/main/java/org/keycloak/broker/saml/SAMLEndpoint.java |
Rejects assertions with no bearer confirmation. |
docs/documentation/upgrading/topics/changes/changes-27_0_0.adoc |
Adds an upgrade note about unsupported confirmation methods. |
docs/documentation/server_admin/topics/identity-broker/saml.adoc |
Documents subject-confirmation support for SAML brokering. |
Review effort: Balanced
| {project_name} accepts the assertion only if a bearer confirmation is present and contains a `<SubjectConfirmationData>` element that validates, including the recipient, the `InResponseTo` value, and the validity window. | ||
|
|
||
| {project_name} does not support a subject confirmation method other than `bearer`. | ||
| Any other unsupported method is rejected and the login fails. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #54711