Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The existing Secret-watch test contradicts the new resourceVersion behavior and will fail, while controller-level tests are missing for OIDC hash safety and decoded credential propagation.
2 open issues
What changed in this PR
Addresses #55543 by replacing Secret-data-derived digests with resource-version-based hashes in the Keycloak Operator.
Changes:
- Tracks Secret changes using metadata rather than credential contents.
- Computes OIDC status hashes before inlining credentials.
- Adds hashing tests and documents metadata-triggered rollouts.
| File | Description |
|---|---|
operator/src/test/java/org/keycloak/operator/testsuite/unit/WatchedResourcesTest.java |
Tests Secret hash independence from data. |
operator/src/main/java/org/keycloak/operator/Utils.java |
Hashes Secret names and resource versions. |
operator/src/main/java/org/keycloak/operator/controllers/KeycloakSAMLClientController.java |
Adapts to the prepared-client result. |
operator/src/main/java/org/keycloak/operator/controllers/KeycloakOIDCClientController.java |
Hashes before inserting Secret values. |
operator/src/main/java/org/keycloak/operator/controllers/KeycloakClientBaseController.java |
Supports controller-provided status hashes. |
docs/guides/operator/advanced-configuration.adoc |
Documents rollouts on Secret metadata updates. |
Review effort: Balanced
closes: keycloak#55543 Signed-off-by: Steve Hawkins <shawkins@redhat.com>
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: #55543
This will trigger a rollout when the operator is upgraded, but that is not something we have added to the notes previously.
An upgrade note could be added about the potential for more frequent rollouts / application of oidc clients and / or For those that want to prevent those additional events, we could also consider adding support for a Secret annotation that directs the operator to use sha-256 instead - it's also possible to consider tls secrets safe to hash.
Other alternatives: