Skip to content
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

Allow user password to be auto-generated or set from secret #15

Open
nuwang opened this issue May 3, 2023 · 0 comments
Open

Allow user password to be auto-generated or set from secret #15

nuwang opened this issue May 3, 2023 · 0 comments

Comments

@nuwang
Copy link

nuwang commented May 3, 2023

Description

This issue is being ported over from a previously reported one here: keycloak#499, as it affects the realm operator as well. Apart from the usual issues with storing secrets in an unencrypted CR, It is particularly problematic to manage the password safely in a gitops environment.

Currently as mentioned keycloak#409 although creating a user resource leads to a secrets file being generated with the user credentials in it, we are required to explicitly set the password in the user resource.

Storing credentials in non-secrets is poor practice especially in this case, where an admin user could be created and exposed to the outside world.

Better would be either (or both)

  1. Automatically generate a password if it is not provided, and store it in the secret
  2. If the secret is changed externally, use that to update the user password"

Discussion

Setting

    requiredActions:
      - "UPDATE_PASSWORD"

as a means of forcing ab initial password change, also does not work as the operator continuously syncs the user CR, causing the action to be permanently required.

Motivation

Encourage good practices in storing secrets
Facilitate credential rotation

Details

references:

  1. Allow user password to be auto-generated or set from secret keycloak-operator#499
  2. Missing password on user credentials keycloak-operator#409
  3. KeycloakUser CR - password portion is not stored in secret #6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant