Do not create a default Airflow user in the chart - #72209
Open
potiuk wants to merge 2 commits into
Open
Conversation
potiuk
requested review from
Miretpl,
bugraoz93,
hussein-awala,
jedcunningham and
jscheffl
as code owners
August 28, 2026 16:25
potiuk
force-pushed
the
fix-chart-no-default-admin-user
branch
2 times, most recently
from
August 28, 2026 17:55
f971878 to
84737b9
Compare
The create-user job ran on every install and provisioned a FAB 'admin' account with the password 'admin'. Those credentials were the same on every installation, so anything able to reach the API server could sign in with the Admin role - by default any workload in the cluster, since networkPolicies are off. createUserJob is now disabled by default, and the chart ships no default username or password. Enabling the job without setting both fails the render with a message naming the two values, rather than falling back to an account whose credentials are public knowledge. NOTES.txt no longer prints the password after install; it prints the username when the job ran, and the 'airflow users create' invocation when it did not. Tests that cover the job opt in the way a deployment would. The job's own test module renders through a wrapper that supplies admin/admin and lets each test's values win over it; the other four files carry the credentials in their existing createUserJob values. Adds a production-guide section on creating the first user, and a significant newsfragment for the behaviour change.
The chart no longer creates a user, but the Kubernetes system tests still authenticate as admin/admin and skaffold dev-mode still expects a UI login, so both deployments now ask for that account explicitly instead of relying on a chart default that is gone. The schema's username and password defaults were left behind at the old values and disagreed with values.yaml.
potiuk
force-pushed
the
fix-chart-no-default-admin-user
branch
from
August 28, 2026 18:10
84737b9 to
cfa0468
Compare
potiuk
requested review from
amoghrajesh,
ashb,
choo121600,
ephraimbuddy,
gopidesupavan,
jason810496 and
vatsrahul1001
as code owners
August 28, 2026 18:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The chart ran a create-user job on every install and provisioned a FAB account with a username and password that were the same on every installation:
Anything able to reach the API server could sign in with the Admin role. That is not narrow by default:
networkPolicies.enabledisfalse, so every workload in the cluster can reach the service, and the documented ingress path widens it further.What changed
createUserJobis now disabled by default, and the chart ships no default username or password.Enabling the job without setting both fails the render, naming the two values and the alternative, rather than falling back to an account whose credentials are public knowledge:
Generating a random password instead was considered and rejected: it keeps a default account in existence and only makes its credential harder to guess. Not creating the account removes the class of problem, and matches how the chart already treats other opt-in components.
NOTES.txtno longer prints the password after install. It prints the username when the job ran, and theairflow users createinvocation when it did not — advertising the credential was part of the same problem.Behaviour
--set createUserJob.enabled=trueenabled=true+ password onlyenabled=true+ username and passwordhelm lintclean; Celery, Kubernetes and Local executors all render.Tests
Tests covering the job opt in the way a deployment would. The job's own test module renders through a wrapper that supplies
admin/adminand lets each test's own values win over it, so the opt-in is stated once and is self-explanatory. The other four affected files carry the credentials inside their existingcreateUserJobvalues.Worth noting for review: adding a second
"createUserJob"key to those dicts is not equivalent — Python keeps the last one, which silently discards the test's ownserviceAccountsetup and leaves the test passing while no longer testing what it was written to test. The credentials are merged into the existing keys for that reason.Docs
production-guide.rstgains a Creating the first user section covering both routes, and recommends supplying the password from a Kubernetes Secret rather thanvalues.yaml, since values files are frequently committed.significantnewsfragment records the behaviour change and the migration path.values.schema.jsondefault forenabledcorrected tofalse.🤖 Generated with Claude Code