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

SECRET_KEY is not generated when deployment is created #1040

Closed
dkliban opened this issue Aug 10, 2023 · 3 comments · Fixed by #1052
Closed

SECRET_KEY is not generated when deployment is created #1040

dkliban opened this issue Aug 10, 2023 · 3 comments · Fixed by #1052
Labels

Comments

@dkliban
Copy link
Member

dkliban commented Aug 10, 2023

THe operator should allow users to provide a pulp-secret-key secret. If it is not provided a random SECRET_KEY should be generated for settings.py secret.

@git-hyagi
Copy link
Collaborator

@git-hyagi
Copy link
Collaborator

Adding more context/information since not much was provided in the issue description:
From Django doc: "A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value."

  • We should provide a new field (string) in Pulp CR called PulpSecretKey (json:"pulp_secret_key").
  • The field should be immutable.
  • If PulpSecretKey field is not provided, the operator should create a new secret with a random string of length 50 from "abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)" chars.
  • The operator should have a watcher to identify Secret content updates (pending definition of procedure in case of secret change).
  • Update backup/restore controllers to handle this new Secret.

Pending definitions:

  • should we keep it in the settings.py file or can we set a SECRET_KEY env var?
  • which containers will need it? (api and content!?)
  • what is the procedure to rotate the secret?

@dkliban
Copy link
Member Author

dkliban commented Aug 15, 2023

Lets keep SECRET_KEY in /etc/pulp/settings.py

If it changes, all teh API nodes need to be restarted.

git-hyagi added a commit to git-hyagi/pulp-operator that referenced this issue Aug 21, 2023
git-hyagi added a commit that referenced this issue Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants