Repository navigation
Follow-up to #52391: fix stale provider client lookup in KcSamlSignedDocumentOnlyBrokerTest - #52457
Merged
pedroigor merged 1 commit intoSep 4, 2026
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The focused change correctly aligns the lookup with the client ID assigned by superclass setup.
Pull request overview
Updates the SAML broker test to resolve the provider client using the consumer realm’s runtime base URL.
Changes:
- Replaces the hardcoded localhost client ID with
consumerRealm.getBaseUrl(). - Documents the superclass setup ordering and client rename.
File summaries
| File | Description |
|---|---|
tests/base/src/test/java/org/keycloak/tests/broker/saml/KcSamlSignedDocumentOnlyBrokerTest.java |
Uses the runtime SAML entity ID for provider-client lookup. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
configureSamlBrokerEndpoints() (AbstractKcSamlBrokerTest's @beforeeach, which runs before this subclass's own @beforeeach) already renames the provider-side client from its seeded placeholder entity id to the consumer realm's actual base URL. This test's @beforeeach was still looking the client up by the old placeholder literal, which only worked because the test framework currently always binds to http://localhost:8080 by default. Look it up by the same value configureSamlBrokerEndpoints() renamed it to instead. Signed-off-by: Stefan Guilhen <sguilhen@redhat.com>
pedroigor
force-pushed
the
fix-saml-signed-document-clientid
branch
from
September 4, 2026 18:22
f4e0243 to
f0b1385
Compare
pedroigor
approved these changes
Sep 4, 2026
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.
Summary
Follow-up fix for #52391 (already merged), found while auditing the broker test migration epic (#51955) for the same class of bug Copilot flagged in #52376.
KcSamlSignedDocumentOnlyBrokerTest.configureSignedDocumentOnly()(added by Migrate KcSamlSignedDocumentOnlyBrokerTest and SAML package reorg #52391) looks up the provider-side client by a hardcodedhttp://localhost:8080/realms/<consumer>literal.AbstractKcSamlBrokerTest.configureSamlBrokerEndpoints()(superclass@BeforeEach, which JUnit 5 runs before this subclass's own@BeforeEach) already renames that same client from its seeded placeholder entity id to the consumer realm's real base URL.http://localhost:8080- under any other base URL it would return an empty list and throwIndexOutOfBoundsException.consumerRealm.getBaseUrl(), the value it was actually renamed to.Not caught during #52391's review because it currently passes CI by coincidence (default base URL matches the hardcoded literal); this closes that gap.
Test plan
KcSamlSignedDocumentOnlyBrokerTestpasses locally