Repository navigation
Replies: 1 comment
That's certainly not intended. The code looks like: Such that the reload is only skipped if the newly loaded contents are exactly the same as the current instance.
Can you try at a debug level to confirm the "TLS certificates updated" message when expected? |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
We have a Keycloak deployment configured via a StatefulSet with two replicas. The environment variable
KC_HTTPS_CERTIFICATES_RELOAD_PERIODis set to 5 minutes to enable periodic reloading of HTTPS certificates. The keystore is provided through a Kubernetes Secret, which is mounted into the pod without using the subPath mechanism.Upon inspecting the Keycloak server, we confirmed that the configured certificate corresponds to the keystore mounted from the Secret.
To test the certificate reload functionality, we updated the keystore by modifying the Secret. This change was correctly reflected within the pod, and after the configured reload interval, Keycloak successfully reloaded the new keystore and updated the certificate accordingly.
In a subsequent test, we reverted the keystore by editing the Secret to restore the original keystore file. Although the updated keystore was correctly reflected within the pod, Keycloak did not reload the certificate after the specified interval. Additionally, no errors or warnings related to certificate reloading were observed in the Keycloak logs.
This behavior raises the question of whether Keycloak retains any internal state or metadata related to previously loaded keystores. It appears that if a previously used keystore is reintroduced, Keycloak does not trigger a reload, despite the file being updated on disk.
To further investigate, we repeated the test by updating the keystore three times, each time using a different certificate. In each of these cases, Keycloak successfully reloaded the new keystore and updated the certificate as expected.
Has anyone in the community encountered this behavior or have insights into what might be causing it?
The version of Keycloak used for this testing is 26.4.2.
All reactions