Who gets into Airflow
and with which password.
Five scenarios: changing the default passwords, login through LDAP, login through Active Directory, a TLS-protected connection to the directory, and the chart's internal secrets. Each one covers: the chart default, what changes in the cluster, and the values file commented line by line.
The tdp-airflow chart starts Airflow with an admin user and temporary passwords, without LDAP. Security is turned on in the values file: your own passwords, login through the company directory (LDAP or Active Directory) with the bind password kept in a Secret, and TLS on the connection to the directory. The chart creates Airflow's internal secrets, such as the Fernet key, on its own.
Your environment
If you fill in your environment details here, the examples and commands on the page use what you entered. The namespace, the release name and the values file are your choices, not the chart's.
Scenarios
- 1 · Initial credentials
- 2 · Login through LDAP
- 3 · Active Directory
- 4 · TLS with the directory
- 5 · Internal secrets
The admin user's password and the embedded PostgreSQL's, before any real use.
The chart creates two accounts with the same temporary password, which is also the default password of the TDP charts: the admin user of the Airflow UI and the postgres superuser of the embedded PostgreSQL. This password is for testing only. Before using Airflow for anything else, you set your own passwords in a private values file.
admin user, ChangeMe!T3c password, in webserver.defaultUser.password. It only applies when the user is first created. After that, the password is changed in the Airflow UI.
postgres user, ChangeMe!T3c password, in postgresql.auth.postgresPassword, kept equal to data.metadataConnection.pass.
The two accounts with a temporary password
- Who logs in. Only the admin user, created by the chart at installation, with the password from webserver.defaultUser.password. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against Airflow's own users. Chart default:
LDAP off. (tdp-airflow.webserver.defaultUser.password) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword)
1tdp-airflow:2webserver:3 defaultUser:4 password: "<PASSWORD>"5postgresql:6 auth:7 postgresPassword: "<PASSWORD>"8data:9 metadataConnection:10 pass: "<PASSWORD>"
Password of the UI admin user. It only applies when the user is created, on the first installation.
- Admin password (linha 4). Password of the UI admin user. It only applies when the user is created, on the first installation.
- Embedded PostgreSQL password (linha 7). Password of the postgres superuser of the embedded metadata database.
- Connection password (linha 10). The same as line 7: it is what Airflow uses to connect to the embedded database.
Write the passwords in a private values file
The secrets do not go into a versioned file.
If you prefer not to keep the passwords in a file, pass them with --set in the command or through an external secrets tool.
Install with the file
The passwords apply when the accounts are created.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-airflow \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace --timeout 10m \
-f <VALUES_FILE>
It worked when
admin user with the password you set.If Airflow was already installed
The admin password only applies when the user is first created. On an Airflow that is already installed, change it in the UI.
The bind password in a Secret and the block that says where the directory is and who can log in.
LDAP login makes the Airflow UI validate the username and password against the company directory. By default, LDAP is off and only the chart's admin user can log in. You want each person to log in with their own directory account, and only those who belong to the authorized group.
The chart does this with Flask-AppBuilder's LDAP, the module that handles the Airflow UI login. Turning it on means writing two things: a Secret with the bind password, the account Airflow uses to query the directory, created before the installation. And the ldap block, with the server address, the search base, the group filter and the rule that creates the user in Airflow on first login. The bind password does not go in the file: it reaches the API Server as an environment variable, read from the Secret.
LDAP off (ldap.enabled), extraEnv empty. Login only with the admin user.
The ldap.apiServerConfig block goes to the API Server; the bind password comes from the tdp-airflow-ldap-bind Secret, through extraEnv; the user is created in Airflow on first login, with the User role.
The login path, with and without LDAP
Who gets into the interface
- Who logs in. Only the admin user, created by the chart at installation, with the password from webserver.defaultUser.password. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against Airflow's own users. Chart default:
LDAP off. (tdp-airflow.webserver.defaultUser.password) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword)
Who gets into the interface: Only the chart's admin (default)
- Who logs in. Only the admin user, created by the chart at installation, with the password from webserver.defaultUser.password. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against Airflow's own users. Chart default:
LDAP off. (tdp-airflow.webserver.defaultUser.password) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword)
Who gets into the interface: LDAP users
- Who logs in. Each person logs in with their own directory account, on the form at /auth/login/. On first login, Airflow creates their user. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against the directory, using the ldap.apiServerConfig block. Chart default:
LDAP off. (tdp-airflow.ldap.enabled: true) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword) - Bind password Secret. Created by you before the installation. The password reaches the API Server as the LDAP_BIND_PASSWORD variable, through extraEnv. Chart default:
does not exist. (tdp-airflow.extraEnv) - LDAP server. The company directory. The API Server binds with the service account, looks up the user and checks the password. Chart default:
none. (AUTH_LDAP_SERVER · AUTH_LDAP_USE_TLS)
Admin only. This is the state in which the chart starts: the login uses Airflow's own users, and the only one the chart creates is admin.
Admin only: Best suited when Airflow is still in testing, or you prefer to create the users in Airflow itself.
1tdp-airflow:2extraEnv: ""3ldap:4 enabled: false5webserver:6 defaultUser:7 password: "ChangeMe!T3c"
The login uses Airflow's own users. For the company directory, toggle above to LDAP users.
- LDAP off (linha 4). The login uses Airflow's own users. For the company directory, toggle above to LDAP users.
- Admin (linha 7). The only user created by the chart. Change the password in scenario 1.
LDAP users. The API Server validates the username and password against the directory and, on first login, creates the user in Airflow with the role set in the block.
LDAP users: Best suited when the team already has accounts in the company directory and access to Airflow should follow a group in that directory.
1tdp-airflow:2ldap:3 enabled: true4 apiServerConfig: |5 import os6 from flask_appbuilder.security.manager import AUTH_LDAP78 AUTH_TYPE = AUTH_LDAP9 AUTH_LDAP_SERVER = "ldap://<LDAP_HOST>:389"10 AUTH_LDAP_USE_TLS = False11 AUTH_LDAP_TLS_CACERTFILE = os.environ.get("LDAP_TLS_CACERTFILE", "/etc/ssl/certs/ca-certificates.crt")12 AUTH_LDAP_BIND_USER = "uid=<LDAP_BIND_USER>,cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com"13 AUTH_LDAP_BIND_PASSWORD = os.environ.get("LDAP_BIND_PASSWORD", "")14 AUTH_LDAP_SEARCH = "cn=users,cn=accounts,dc=<LDAP_DOMAIN>,dc=com"15 AUTH_LDAP_SEARCH_FILTER = "(memberOf=cn=<AIRFLOW_USERS_GROUP>,cn=groups,cn=accounts,dc=<LDAP_DOMAIN>,dc=com)"16 AUTH_LDAP_UID_FIELD = "uid"17 AUTH_LDAP_FIRSTNAME_FIELD = "givenName"18 AUTH_LDAP_LASTNAME_FIELD = "sn"19 AUTH_LDAP_EMAIL_FIELD = "mail"20 # Create LDAP users in Airflow on their first login21 AUTH_USER_REGISTRATION = True22 AUTH_USER_REGISTRATION_ROLE = "User"2324extraEnv: |25 - name: LDAP_BIND_PASSWORD26 valueFrom:27 secretKeyRef:28 name: tdp-airflow-ldap-bind29 key: password
The chart passes the block below to the API Server.
- LDAP on (linha 3). The chart passes the block below to the API Server.
- Replaces the whole default (linha 4). apiServerConfig is not merged with the chart's block: it replaces it. That is why it must carry all the lines, including the name and email fields and AUTH_USER_REGISTRATION.
- Server (linha 9). Directory address as seen from inside the cluster. For TLS, see scenario 4.
- TLS CA (linha 11). Keep this line: with LDAPS or STARTTLS, without it the bind fails with SERVER_DOWN even with a valid certificate. Details in scenario 4.
- Bind account (linha 12). The service account Airflow uses to connect to the directory and look up users.
- Bind password (linha 13). Read from the LDAP_BIND_PASSWORD variable, which the extraEnv below fills from the Secret.
- Search base (linha 14). Where the users sit in the directory.
- Who can log in (linha 15). Only entries that match the filter can log in. Without it, every account under the search base authenticates and gets an Airflow user. memberOf is maintained by FreeIPA and AD. In OpenLDAP, it requires the memberof overlay.
- Username (linha 16). The directory attribute used as the login name.
- Name and email (linha 17). At least one of these three attributes must have a value in the directory, otherwise the user is not created and the login is rejected. If your directory does not fill in mail, see scenario 3.
- Creation on first login (linha 21). Without this line, a user who binds successfully is never created in Airflow, and the login is rejected. With False, you create the users in Airflow beforehand.
- Role (linha 22). The Airflow role given to each user created on first login.
- extraEnv (linha 24). Injects the bind password from the tdp-airflow-ldap-bind Secret, key password. The Secret must exist before the installation.
Create the Secret with the bind password
The extraEnv reads the password from this Secret, so it exists before the installation.
kubectl create secret generic tdp-airflow-ldap-bind \
--from-literal=password=<LDAP_BIND_PASSWORD> \
-n <NAMESPACE>
Add the LDAP block to the values file
Replace the server, the bind account, the domain and the group with yours.
<LDAP_HOST> is the directory address as seen from inside the cluster; <LDAP_BIND_USER>, the bind service account; <LDAP_DOMAIN>, the domain component of the DN; <AIRFLOW_USERS_GROUP>, the group authorized to use Airflow.
Apply it to the release
The API Server restarts with login through LDAP.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-airflow \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
It worked when
kubectl -n <NAMESPACE> port-forward svc/<RELEASE_NAME>-api-server 8080:8080
A user in the authorized group logs in through the form at http://localhost:8080/auth/login/ and starts to exist in Airflow, with the User role.
If the login fails
Login rejected with the bind working, SERVER_DOWN and a missing Secret are in When something goes wrong.
In Airflow 3, the API Server login form is at /auth/login/, not at the root of the UI, which is a React application. It is the same Flask-AppBuilder mechanism used by tdp-superset. The REST API (/api/v2/*) requires a separate Bearer token, obtained by visiting /auth/ with a valid session. The POST /auth/token endpoint also exists, but it authenticates only local Airflow users (AUTH_DB), never LDAP users.
The same login, with the CN-based tree and the fields AD fills in.
The company directory is an Active Directory (AD). The configuration starts from the LDAP one (scenario 2) and requires three adjustments in apiServerConfig. Without them, the login does not work.
- Login name. AD identifies each person by
sAMAccountName. SetAUTH_LDAP_UID_FIELD = "sAMAccountName". - Where the accounts are. In AD, the service account and the users are in the domain's
CN=Users, not in anou=usersfolder. Point the service account there, inAUTH_LDAP_BIND_USER = "CN=<BIND_USER>,CN=Users,DC=<DOMAIN>,DC=<TLD>", and the search, inAUTH_LDAP_SEARCH = "CN=Users,DC=<DOMAIN>,DC=<TLD>". - Email. A standard AD account does not fill in the
mailfield, but fills inuserPrincipalName. SetAUTH_LDAP_EMAIL_FIELD = "userPrincipalName".
On first login, Airflow creates the user with the name and email read from AD. If none of these fields has a value, the login is refused without showing an error, even with the right password. Adjustment 3 avoids this.
The Secret with the service account password and the procedure are the same as in scenario 2. The complete file is right below, with each line explained.
Login through Active Directory
- Who logs in. Each person logs in with their own directory account, on the form at /auth/login/. On first login, Airflow creates their user. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against the directory, using the ldap.apiServerConfig block. Chart default:
LDAP off. (tdp-airflow.ldap.enabled: true) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword) - Bind password Secret. Created by you before the installation. The password reaches the API Server as the LDAP_BIND_PASSWORD variable, through extraEnv. Chart default:
does not exist. (tdp-airflow.extraEnv) - Active Directory. The domain controller. The user logs in by sAMAccountName, in a CN-based tree. Chart default:
none. (AUTH_LDAP_SERVER · AUTH_LDAP_USE_TLS)
1tdp-airflow:2ldap:3 enabled: true4 apiServerConfig: |5 import os6 from flask_appbuilder.security.manager import AUTH_LDAP78 AUTH_TYPE = AUTH_LDAP9 AUTH_LDAP_SERVER = "ldap://<AD_HOST>:389"10 AUTH_LDAP_USE_TLS = False11 AUTH_LDAP_TLS_CACERTFILE = os.environ.get("LDAP_TLS_CACERTFILE", "/etc/ssl/certs/ca-certificates.crt")12 AUTH_LDAP_BIND_USER = "CN=<BIND_USER>,CN=Users,DC=<DOMAIN>,DC=<TLD>"13 AUTH_LDAP_BIND_PASSWORD = os.environ.get("LDAP_BIND_PASSWORD", "")14 AUTH_LDAP_SEARCH = "CN=Users,DC=<DOMAIN>,DC=<TLD>"15 AUTH_LDAP_SEARCH_FILTER = "(memberOf=CN=<AIRFLOW_USERS_GROUP>,CN=Users,DC=<DOMAIN>,DC=<TLD>)"16 AUTH_LDAP_UID_FIELD = "sAMAccountName"17 AUTH_LDAP_FIRSTNAME_FIELD = "givenName"18 AUTH_LDAP_LASTNAME_FIELD = "sn"19 AUTH_LDAP_EMAIL_FIELD = "userPrincipalName"20 AUTH_USER_REGISTRATION = True21 AUTH_USER_REGISTRATION_ROLE = "User"2223extraEnv: |24 - name: LDAP_BIND_PASSWORD25 valueFrom:26 secretKeyRef:27 name: tdp-airflow-ldap-bind28 key: password
AD address as seen from inside the cluster. For TLS, see scenario 4.
- Domain controller (linha 9). AD address as seen from inside the cluster. For TLS, see scenario 4.
- Bind account (linha 12). The service account, in AD's CN-based tree.
- Search base (linha 14). The domain's CN=Users container.
- Who can log in (linha 15). Only members of the given group. Replace it with the group authorized to use Airflow.
- sAMAccountName (linha 16). The login name of AD accounts.
- userPrincipalName (linha 19). A standard AD account does not fill in mail, but fills in userPrincipalName. With an empty value in all three name and email attributes, the user is never created and the login is silently rejected.
- Creation on first login (linha 20). Required for the AD user to start existing in Airflow.
Create the Secret with the bind password
The same Secret as in scenario 2, with the AD service account password.
kubectl create secret generic tdp-airflow-ldap-bind \
--from-literal=password=<LDAP_BIND_PASSWORD> \
-n <NAMESPACE>
Apply it to the release
The API Server restarts with login through AD.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-airflow \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
It worked when
/auth/login/ with their AD sAMAccountName and password.LDAPS or STARTTLS, and the company's internal CA.
By default, Airflow talks to the directory without TLS: an ldap:// address and AUTH_LDAP_USE_TLS = False. When the directory accepts connections protected by TLS, you want Airflow to connect to it that way. There are two forms, and the choice changes two lines of apiServerConfig: LDAPS, where the ldaps:// address itself negotiates TLS. Or STARTTLS, where the connection starts on an ldap:// address and switches to TLS.
In both, Airflow verifies the server's certificate against the CA bundle in AUTH_LDAP_TLS_CACERTFILE. That line cannot be missing: the image has no /etc/ldap/ldap.conf, and without it the bind fails with SERVER_DOWN even with a valid certificate.
ldap:// without TLS (AUTH_LDAP_USE_TLS = False). The CA line points to the image's own bundle, /etc/ssl/certs/ca-certificates.crt, unless the LDAP_TLS_CACERTFILE variable indicates another.
If the directory certificate was issued by an internal company CA, mount its bundle in the pod, with volumes and volumeMounts, and point LDAP_TLS_CACERTFILE to it.
The protected connection to the directory
How the connection to the directory is protected
- Who logs in. Each person logs in with their own directory account, on the form at /auth/login/. On first login, Airflow creates their user. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against the directory, using the ldap.apiServerConfig block. Chart default:
LDAP off. (tdp-airflow.ldap.enabled: true) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword) - Bind password Secret. Created by you before the installation. The password reaches the API Server as the LDAP_BIND_PASSWORD variable, through extraEnv. Chart default:
does not exist. (tdp-airflow.extraEnv) - LDAP server. The company directory. The API Server binds with the service account, looks up the user and checks the password. Chart default:
none. (AUTH_LDAP_SERVER · AUTH_LDAP_USE_TLS) - Internal CA bundle. Mounted in the pod with volumes and volumeMounts; the LDAP_TLS_CACERTFILE variable points to it. Chart default:
the image's own bundle. (tdp-airflow.volumes · tdp-airflow.volumeMounts)
How the connection to the directory is protected: LDAPS
- Who logs in. Each person logs in with their own directory account, on the form at /auth/login/. On first login, Airflow creates their user. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against the directory, using the ldap.apiServerConfig block. Chart default:
LDAP off. (tdp-airflow.ldap.enabled: true) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword) - Bind password Secret. Created by you before the installation. The password reaches the API Server as the LDAP_BIND_PASSWORD variable, through extraEnv. Chart default:
does not exist. (tdp-airflow.extraEnv) - LDAP server. The company directory. The API Server binds with the service account, looks up the user and checks the password. The connection is protected by TLS and the server certificate is verified against the AUTH_LDAP_TLS_CACERTFILE bundle. Chart default:
none. (AUTH_LDAP_SERVER · AUTH_LDAP_USE_TLS) - Internal CA bundle. Mounted in the pod with volumes and volumeMounts; the LDAP_TLS_CACERTFILE variable points to it. Chart default:
the image's own bundle. (tdp-airflow.volumes · tdp-airflow.volumeMounts)
How the connection to the directory is protected: STARTTLS
- Who logs in. Each person logs in with their own directory account, on the form at /auth/login/. On first login, Airflow creates their user. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against the directory, using the ldap.apiServerConfig block. Chart default:
LDAP off. (tdp-airflow.ldap.enabled: true) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword) - Bind password Secret. Created by you before the installation. The password reaches the API Server as the LDAP_BIND_PASSWORD variable, through extraEnv. Chart default:
does not exist. (tdp-airflow.extraEnv) - LDAP server. The company directory. The API Server binds with the service account, looks up the user and checks the password. The connection is protected by TLS and the server certificate is verified against the AUTH_LDAP_TLS_CACERTFILE bundle. Chart default:
none. (AUTH_LDAP_SERVER · AUTH_LDAP_USE_TLS) - Internal CA bundle. Mounted in the pod with volumes and volumeMounts; the LDAP_TLS_CACERTFILE variable points to it. Chart default:
the image's own bundle. (tdp-airflow.volumes · tdp-airflow.volumeMounts)
LDAPS. TLS is negotiated from the start of the connection, by the ldaps:// scheme of the address; AUTH_LDAP_USE_TLS stays False.
LDAPS: Best suited when the directory serves ldaps:// connections.
1AUTH_LDAP_SERVER = "ldaps://<LDAP_HOST>:636"2AUTH_LDAP_USE_TLS = False3AUTH_LDAP_TLS_CACERTFILE = os.environ.get("LDAP_TLS_CACERTFILE", "/etc/ssl/certs/ca-certificates.crt")
The address scheme already negotiates TLS.
- ldaps:// (linha 1). The address scheme already negotiates TLS.
- USE_TLS off (linha 2). It stays False with ldaps://: True is only for STARTTLS.
- CA (linha 3). Keep this line. For an internal CA, the LDAP_TLS_CACERTFILE variable points to the mounted bundle.
STARTTLS. The connection starts without TLS, on an ldap:// address, and switches to TLS before the bind, with AUTH_LDAP_USE_TLS = True.
STARTTLS: Best suited when the directory offers STARTTLS on the ldap:// address.
1AUTH_LDAP_SERVER = "ldap://<LDAP_HOST>:389"2AUTH_LDAP_USE_TLS = True3AUTH_LDAP_TLS_CACERTFILE = os.environ.get("LDAP_TLS_CACERTFILE", "/etc/ssl/certs/ca-certificates.crt")
The connection starts without TLS, on the ldap:// address.
- ldap:// (linha 1). The connection starts without TLS, on the ldap:// address.
- STARTTLS (linha 2). True switches the connection to TLS before the bind.
- CA (linha 3). Keep this line. For an internal CA, the LDAP_TLS_CACERTFILE variable points to the mounted bundle.
Internal CA
If the directory certificate was issued by an internal CA, mount that CA's bundle in the pod and point the LDAP_TLS_CACERTFILE variable to it, which the AUTH_LDAP_TLS_CACERTFILE line of the block above reads. Without that variable, the image's own bundle applies.
Mount the internal CA bundleOpcional
Only if the directory certificate was issued by an internal CA.
Mount the bundle in the pod with tdp-airflow.volumes and tdp-airflow.volumeMounts, and set the LDAP_TLS_CACERTFILE variable to the mounted path, in extraEnv, in the same block as the bind password.
Adjust apiServerConfig and extraEnv
The lines of the form chosen above, in the complete block from scenario 2 or 3.
Change AUTH_LDAP_SERVER and AUTH_LDAP_USE_TLS and keep the AUTH_LDAP_TLS_CACERTFILE line.
Apply it to the release
The API Server restarts and starts talking to the directory over TLS.
helm upgrade --install <RELEASE_NAME> oci://registry.tecnisys.com.br/tdp/charts/tdp-airflow \
--version 3.0.3 \
-n <NAMESPACE> --create-namespace \
-f <VALUES_FILE>
It worked when
/auth/login/.If the login fails with SERVER_DOWN
The AUTH_LDAP_TLS_CACERTFILE line is missing from apiServerConfig, or the bundle it points to does not recognize the directory's CA.
Fernet key, API and JWT keys and the Redis password, created by the chart.
Besides the passwords you set, Airflow uses internal secrets: the Fernet key, which encrypts the passwords of connections and variables, the API and JWT keys, the webserver key, and the Redis password and URL. The chart creates them on its own and does not leave them in the values file. A Job runs before every install and upgrade and creates each of these Secrets only if it does not exist yet. A Secret that already exists is preserved.
The API, JWT and webserver keys carry the release name and live outside the release, so they do not change between upgrades: helm uninstall does not delete them, and a new installation with the same name reuses them. The Fernet key, the Redis password and the broker URL have a fixed name, the same for any release. That is why two Airflow releases in the same namespace share those three Secrets.
Six internal Secrets, created by the Job before the installation. Nothing to configure.
Each release in its own namespace, so they do not share the three fixed-name Secrets.
The API, JWT and webserver keys stay in the namespace and are used again in a new installation. To start from scratch, delete them too.
The six internal Secrets
- Who logs in. Only the admin user, created by the chart at installation, with the password from webserver.defaultUser.password. Chart default:
admin user with a temporary password. - API Server. Receives the login in the UI and validates the password against Airflow's own users. Chart default:
LDAP off. (tdp-airflow.webserver.defaultUser.password) - Embedded PostgreSQL. The embedded metadata database. The postgres superuser password is in postgresql.auth.postgresPassword, kept equal to the metadata connection password. Chart default:
temporary password. (tdp-airflow.postgresql.auth.postgresPassword) - Job that ensures the Secrets. Runs before every install and upgrade and creates each internal Secret only if it does not exist yet. Chart default:
always on. - tdp-airflow-fernet-key. Internal Secret with a fixed name: the same for any release name.
- <RELEASE_NAME>-api-secret-key. Internal Secret named after the release. It stays in the namespace after helm uninstall.
- <RELEASE_NAME>-jwt-secret. Internal Secret named after the release. It stays in the namespace after helm uninstall.
- <RELEASE_NAME>-webserver-secret-key. Internal Secret named after the release. It stays in the namespace after helm uninstall.
- tdp-airflow-redis-password. Internal Secret with a fixed name: the same for any release name.
- tdp-airflow-broker-url. Internal Secret with a fixed name: the same for any release name.
1tdp-airflow:2fernetKeySecretName: tdp-airflow-fernet-key3apiSecretKeySecretName: <RELEASE_NAME>-api-secret-key4jwtSecretName: <RELEASE_NAME>-jwt-secret5webserverSecretKeySecretName: <RELEASE_NAME>-webserver-secret-key6redis:7 passwordSecretName: tdp-airflow-redis-password8data:9 brokerUrlSecretName: tdp-airflow-broker-url
Airflow's Fernet key, generated by the Job, under the fernet-key key of the Secret.
- Fernet key (linha 2). Airflow's Fernet key, generated by the Job, under the fernet-key key of the Secret.
- API key (linha 3). The Flask secret key for the Airflow 3 API ([api] secret_key).
- JWT (linha 4). The key used to encode and decode the JWTs ([api_auth] jwt_secret).
- Webserver key (linha 5). The webserver's Flask secret key from versions prior to Airflow 3, kept for compatibility.
- Redis (linha 7). The Redis password, generated by the Job. Pointing to this Secret avoids a new random password being generated on every sync.
- Broker URL (linha 9). The Redis URL, built by the Job from the password on line 7.
Check the Secrets
All six exist in the namespace after the installation.
kubectl -n <NAMESPACE> get secret tdp-airflow-fernet-key <RELEASE_NAME>-api-secret-key \
<RELEASE_NAME>-jwt-secret <RELEASE_NAME>-webserver-secret-key \
tdp-airflow-redis-password tdp-airflow-broker-url
It worked when
To reinstall from scratch, delete the keys that stayed behindOpcional
Only after helm uninstall, when the new installation should not reuse the old keys.
kubectl -n <NAMESPACE> delete secret <RELEASE_NAME>-api-secret-key <RELEASE_NAME>-jwt-secret <RELEASE_NAME>-webserver-secret-key
When something goes wrong
Troubleshooting
Paste the error message or choose the symptom. The answer comes with the cause, what to do and the command.
- API Server does not start after turning on LDAP. Cause: The Secret referenced in extraEnv (tdp-airflow-ldap-bind) does not exist in the namespace. What to do: Create the Secret with the bind password before helm upgrade --install.
- The bind works, but the login is rejected. Cause: apiServerConfig replaces the whole default block: AUTH_USER_REGISTRATION = True is missing, or none of the name and email fields has a value in the directory. What to do: Include AUTH_USER_REGISTRATION = True and the name and email fields. In Active Directory, use userPrincipalName in AUTH_LDAP_EMAIL_FIELD (scenario 3).
- SERVER_DOWN on the TLS connection to the directory. Cause: The AUTH_LDAP_TLS_CACERTFILE line is not in apiServerConfig. The image has no /etc/ldap/ldap.conf, and without that line the TLS bind fails even with a valid certificate. What to do: Keep the AUTH_LDAP_TLS_CACERTFILE line in apiServerConfig (scenario 4).
- Any directory account can log in. Cause: Without AUTH_LDAP_SEARCH_FILTER, every account under AUTH_LDAP_SEARCH authenticates and, with AUTH_USER_REGISTRATION = True, gets an Airflow user on first login. What to do: Point the filter at the group authorized to use Airflow, or turn off AUTH_USER_REGISTRATION and create the users in Airflow beforehand. In OpenLDAP, memberOf requires the memberof overlay.
- POST /auth/token rejects an LDAP user. Cause: POST /auth/token authenticates only local Airflow users, never LDAP users. What to do: For the REST API (/api/v2), get the Bearer token by visiting /auth/ with a valid session.
- The new admin password does not work. Cause: webserver.defaultUser.password only applies when the admin user is first created. What to do: Change the admin password in the Airflow UI.
- Two Airflow releases in the same namespace interfere with each other. Cause: Three internal Secrets, the ones for the Fernet key, the Redis password and the broker URL, have fixed names and are shared by the releases in the same namespace (scenario 5). What to do: Install each Airflow in its own namespace.
Best practices
- Set your own passwords in a private values file before using Airflow for anything beyond testing.
- Keep secrets in Kubernetes Secrets, or pass them with
--setor through an external tool, instead of leaving them in a versioned values file. - With LDAP, limit the login to the authorized group with
AUTH_LDAP_SEARCH_FILTER, or turn offAUTH_USER_REGISTRATIONand create the users in Airflow beforehand.
All parameters
The chart prefix is already filled in.
14 of 14 parameters
| Parameter | Description | Chart default |
|---|---|---|
tdp-airflow.webserver.defaultUser.passwordPasswords | Password of the UI admin user. Only applies when the user is first created | ChangeMe!T3c |
tdp-airflow.postgresql.auth.postgresPasswordPasswords | Password of the postgres superuser of the embedded PostgreSQL | ChangeMe!T3c |
tdp-airflow.data.metadataConnection.passPasswords | Metadata connection password. Equal to postgresql.auth.postgresPassword with the embedded PostgreSQL | ChangeMe!T3c |
tdp-airflow.ldap.enabledLDAP | Enables LDAP authentication | false |
tdp-airflow.ldap.apiServerConfigLDAP | Flask-AppBuilder Python block (AUTH_LDAP and the other lines). Replaces the whole default | example with ldap://<LDAP_HOST>:389 |
tdp-airflow.extraEnvLDAP | Extra environment variables, for example Secret references. Used to inject LDAP_BIND_PASSWORD | "" |
tdp-airflow.volumesLDAP | Extra volumes for the Airflow containers | [] |
tdp-airflow.volumeMountsLDAP | Mount points of the extra volumes | [] |
tdp-airflow.fernetKeySecretNameInternal secrets | Fernet key Secret | tdp-airflow-fernet-key |
tdp-airflow.apiSecretKeySecretNameInternal secrets | API key Secret | <RELEASE_NAME>-api-secret-key |
tdp-airflow.jwtSecretNameInternal secrets | JWT key Secret | <RELEASE_NAME>-jwt-secret |
tdp-airflow.webserverSecretKeySecretNameInternal secrets | Webserver key Secret (compatibility) | <RELEASE_NAME>-webserver-secret-key |
tdp-airflow.redis.passwordSecretNameInternal secrets | Redis password Secret | tdp-airflow-redis-password |
tdp-airflow.data.brokerUrlSecretNameInternal secrets | Broker URL Secret | tdp-airflow-broker-url |
Next steps
Configuration
Airflow Configuration
First contact, external database, volumes and publishing at a URL.