-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support java keystore for configuration of sensitive options #189
Support java keystore for configuration of sensitive options #189
Conversation
2375142
to
bbc649e
Compare
I am thinking writing a general keytool module for the middleware common collection, but for the time being this is cool. |
@@ -0,0 +1,64 @@ | |||
--- | |||
- name: "Check if keytool exists in path" | |||
block: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block happen quite late in the deployment; would you mind moving it to the prereq tasks, so that we fail fast? change_when below can safely be set to false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check now happens after having installed JVM in fastpackages.yml
, so keytool should definitely be there, but a check never hurts either ;)
ea203ef
to
8b9dd2a
Compare
I've added this, probably a bit too compliced but it might serve as a base for other roles. |
Brilliant, I was just implying a line or two in the docs to mention the deprecation, but this is perfect |
a6a4013
to
d0e916d
Compare
new linter rules on ahub driving me crazy, please rebase on main (again); sorry bout that |
d0e916d
to
43cd306
Compare
…tions" using a Java KeyStore file ansible-middleware#188
43cd306
to
e991bd3
Compare
no worries -> done. |
OK; i'll release .2 as final 2.1 (with all the linter ****); then I'll merge and we can eventually start 2.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New parameters allow to set sensitive options using a Java KeyStore file:
keycloak_quarkus_key_store_file
keycloak_quarkus_https_key_store_file
instead.keycloak_quarkus_key_store_password
""
keycloak_quarkus_https_trust_store_enabled
False
keycloak_quarkus_trust_store_file
{{ keycloak.home }}/conf/trust_store.p12
keycloak_quarkus_trust_store_password
""
keycloak_quarkus_proxy_headers
forwarded
orxforwardedPassword
)""
keycloak_quarkus_https_trust_store_password
""
keycloak_quarkus_proxy_headers
forwarded
orxforwarded
)""
keycloak_quarkus_config_key_store_file
keycloak_quarkus_keystore_password
is not empty{{ keycloak.home }}/conf/conf_store.p12
if keycloak_quarkus_keystore_password != '', else''
keycloak_quarkus_config_key_store_password
keycloak_quarkus_db_pass
will be saved to the key store atkeycloak_quarkus_config_key_store_file
(instead of being written to the configuration file in clear text""
For additional details, refer to: https://www.keycloak.org/server/configuration#_setting_sensitive_options_using_a_java_keystore_file
Fix #188
=== original PR notes
keytool
might not be the best tool for this, but I didn't find any better:openssl
does support PKCS12 stores, but does not allow for creating PBEs (password-based entries);Note that this has a breaking change since variables had to be renamed to reduce confusion.
Open for any improvements, but I didn't find a more ansiblish way to do it since keytool doesn't allow for reading the actual secret values, only whether it exists or not.
Moreover let me know if you see more variables from
keycloak.conf
that would fit into this key store, thanks.