-
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
Remove administrator credentials from files once keycloak is bootstrapped #197
Remove administrator credentials from files once keycloak is bootstrapped #197
Conversation
bc12f44
to
0c99f6d
Compare
I like the general mechanic of the changeset; let me review it thru |
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.
I left my comments; the general gist is that I'd prefer not to have a default true
parameter, but just do your implemented behaviour by default. Using a custom fact (being bootstrapped or not), we can tell users to delete it on the target node to execute the false
behaviour (adding the credentials to sysconfig).
mind I am not requesting changes, just discussing!
pushed an update with custom ansible facts; @guidograzioli please review it once more; I'd squash the commits then |
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
@@ -142,6 +143,15 @@ Role Variables | |||
|`keycloak_quarkus_admin_url`| Base URL for accessing the administration console, including scheme, host, port and path | `no` | | |||
|
|||
|
|||
Role custom facts |
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.
👍 👍
89d8366
to
f523bfd
Compare
…nce keycloak is bootstrapped
f523bfd
to
289b476
Compare
thx; linter issues resolved too -> all done |
keycloak_quarkus_admin_user[_pass]
once keycloak is bootstrapped
Nice work! |
Since administrator credentials are only set at the very first time keycloak is started, it is not useful nor secure to have them in the
/etc/sysconfig/keycloak
environment vars file. This changeset modifies the behaviour during the first execution of the deployment, so that administrative credentials are applied, then purges them from configuration files and restarts the service.To force the credentials again, delete the
/etc/ansible/facts.d/keycloak
file and re-execute the playbook.Fix #190
=== original PR notes
@guidograzioli this is my take on #190:
This approach could be troublesome when the state file (
/etc/sysconfig/keycloak
) contains the bootstrapped mnemonicer already, but we are switching DBs where the new DB is completely empty.But I guess this edge case would be ok favoring hiding these sensitive credentials on the long term, worst case one needs to set
keycloak_quarkus_purge_admin_credentials_after_bootstrapping=True
and then run the playbook once more.Wdyt?