[federation] Remove manual Keycloak Route creation to fix SSL race condition#4074
Open
mauricioharley wants to merge 1 commit into
Open
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
The "Create Route for Keycloak" task creates a passthrough TLS Route that races with the RHSSO operator's own Route reconciliation. When the operator wins the race, it overwrites the Route with reencrypt and everything works. When Ansible wins, the Route stays as passthrough and OIDC authentication fails with SSL verification errors because the trust bundle only contains the ingress operator CA, which does not sign the Keycloak pod's self-signed certificate. The Keycloak CR already sets externalAccess.enabled=true, which tells the RHSSO operator to create and manage the Route itself as reencrypt with the correct destinationCACertificate. Removing the manual Route creation eliminates the race condition entirely. Signed-off-by: Mauricio Harley <mharley@redhat.com>
mauricioharley
force-pushed
the
remove-create-keycloak-route
branch
from
July 23, 2026 16:17
5835c3a to
cbfb76f
Compare
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.
Problem
The
crc-federationCI job started failing intermittently with:No code changes in the federation role between passing and failing builds.
Root cause
The task "Create Route for Keycloak" in
run_keycloak_setup.ymlcreates apassthroughTLS Route right after the Keycloak Service appears. The RHSSOoperator also creates/reconciles a Route for Keycloak (because
externalAccess.enabled: truein the Keycloak CR), but asreencrypt.This is a race condition:
reencrypt, ingress CA is the correcttrust anchor, SSL works.
passthrough, the Keycloak pod serves its ownself-signed cert,
full-ca-list.crt(which only has the ingress CA) cannotverify it, SSL fails.
Fix
Remove the manual Route creation entirely. The RHSSO operator handles it
correctly with
reencryptand the properdestinationCACertificate.Testing
Verified on a CRC environment:
reencryptopenstack token issueusing OIDC password grant through Keycloak