Skip to main content
Version 3.0

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.

ChartVersion3.0.3TypeapplicationAppVersion3.0.2
CompatibilityKubernetes1.32+OpenShift4.19+Rancher2.10.x+
Feature SupportLDAPsupported

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​

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.

UI admin

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.

Embedded PostgreSQL

postgres user, ChangeMe!T3c password, in postgresql.auth.postgresPassword, kept equal to data.metadataConnection.pass.

The two accounts with a temporary password

namespace <NAMESPACE>Who logs inadmin userAPI Serverlocal loginEmbedded PostgreSQLpostgres superuser
  1. 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.
  2. 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)
  3. 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)
The two accounts with a temporary password: the admin, on the UI login, and the metadata database superuser.

Click the markers to understand each line. Keep this file out of version control.

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.

  1. Admin password (linha 4). Password of the UI admin user. It only applies when the user is created, on the first installation.
  2. Embedded PostgreSQL password (linha 7). Password of the postgres superuser of the embedded metadata database.
  3. Connection password (linha 10). The same as line 7: it is what Airflow uses to connect to the embedded database.
Your own passwords

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.

Terminal input
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

The UI accepts the 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.

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.

  1. 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.
  2. 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).
  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).
  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.
  5. 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.
  6. 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.
  7. 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 --set or 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 off AUTH_USER_REGISTRATION and create the users in Airflow beforehand.

All parameters​

The chart prefix is already filled in.

14 of 14 parameters

ParameterDescriptionChart default
tdp-airflow.webserver.defaultUser.passwordPasswordsPassword of the UI admin user. Only applies when the user is first createdChangeMe!T3c
tdp-airflow.postgresql.auth.postgresPasswordPasswordsPassword of the postgres superuser of the embedded PostgreSQLChangeMe!T3c
tdp-airflow.data.metadataConnection.passPasswordsMetadata connection password. Equal to postgresql.auth.postgresPassword with the embedded PostgreSQLChangeMe!T3c
tdp-airflow.ldap.enabledLDAPEnables LDAP authenticationfalse
tdp-airflow.ldap.apiServerConfigLDAPFlask-AppBuilder Python block (AUTH_LDAP and the other lines). Replaces the whole defaultexample with ldap://<LDAP_HOST>:389
tdp-airflow.extraEnvLDAPExtra environment variables, for example Secret references. Used to inject LDAP_BIND_PASSWORD""
tdp-airflow.volumesLDAPExtra volumes for the Airflow containers[]
tdp-airflow.volumeMountsLDAPMount points of the extra volumes[]
tdp-airflow.fernetKeySecretNameInternal secretsFernet key Secrettdp-airflow-fernet-key
tdp-airflow.apiSecretKeySecretNameInternal secretsAPI key Secret<RELEASE_NAME>-api-secret-key
tdp-airflow.jwtSecretNameInternal secretsJWT key Secret<RELEASE_NAME>-jwt-secret
tdp-airflow.webserverSecretKeySecretNameInternal secretsWebserver key Secret (compatibility)<RELEASE_NAME>-webserver-secret-key
tdp-airflow.redis.passwordSecretNameInternal secretsRedis password Secrettdp-airflow-redis-password
tdp-airflow.data.brokerUrlSecretNameInternal secretsBroker URL Secrettdp-airflow-broker-url

Next steps​