Replies: 3 comments 1 reply
-
|
Hey @ISaxvik! 👋 I just traced through the codebase and found the issue - looks like the docs are out of date. There was a pretty major refactor back in PR #1833 (Aug 2023) that completely changed how secret handling works, but the documentation wasn't fully updated. The old pattern (which the docs still reference) used to work like: security:
keycloak:
initial_root_password: NEBARI_SECRET_my_passwordexport my_password="actual_password"But that code was removed during the refactor of the extension mechanism. The current implementation works differently - it doesn't look for placeholder strings in the YAML at all. Can you try this instead? Option 1: Omit the field entirely from your config export NEBARI_SECRET__security__keycloak__initial_root_password="your_actual_current_keycloak_password"
nebari deploy -c nebari-config.yamlOption 2: Set it to an empty string security:
keycloak:
initial_root_password: ""Then use the same env var as above. Can you give that a shot and let me know if it picks up the env var correctly? If it works, I'll get the docs updated to reflect the current approach. |
Beta Was this translation helpful? Give feedback.
-
|
Great, that worked! Thank you 😄 For both options, the deploy completes successfully. However, at the end of the deploy logs, the initial root password is printed in clear text so that the last few lines look like this: Is there also a way to avoid this? :) 🙂 |
Beta Was this translation helpful? Give feedback.
-
|
I was trying out Tested again and for me, the logs display the secret in cleartext for both options |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Nebari version: 2026.3.1rc1
Hello!
We are trying to redeploy nebari from wsl, running on azure. I have troubles with security.keycloak.initial_root_password in nebari config, and am unsure about the best way to handle it :) Help is greatly appreciated!
Scenario 1:
I set
security.keycloak.initial_root_password: NEBARI_SECRET_initial_root_passwordin my config and set the environment variable before runningnebari deploy.As per Omitting sensitive values, I expected secret substitution.
However, the rendered config and deployment pass the literal string
"NEBARI_SECRET_initial_root_password"as the password, causing Keycloak login to fail:Scenario 2:
If I omit
security.keycloak.initial_root_passwordfrom the config, Nebari generates a new password each deploy, which is not the current root password, so Keycloak login fails:Both scenarios result in:
The only way I have managed to get the deployment to succeed is by having security.keycloak.initial_root_password in clear text (and then resetting it in keycloakx manually afterwards).
Expected:
Either
Question:
What is the recommended way to manage the Keycloak root password securely across redeploys?
Beta Was this translation helpful? Give feedback.
All reactions