You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/modules/airflow/pages/troubleshooting/index.adoc
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,28 @@ Found 3 errors.
181
181
[*] 1 fixable with the `--fix` option.
182
182
----
183
183
184
+
== LDAP login fails after upgrading to Airflow 3.x+ ("No LDAP object found")
185
+
186
+
After upgrading from Airflow 2 to Airflow 3, LDAP logins that previously worked may start failing.
187
+
The API server logs a line like the following (note it is logged at `info` level, not as an error, so filtering for errors will miss it):
188
+
189
+
[source,text]
190
+
----
191
+
[info ] No LDAP object found for: john.smith [airflow.providers.fab.auth_manager.security_manager.override] loc=override.py:1840
192
+
----
193
+
194
+
This can happen if you were side-loading your own `webserver_config.py` and pointing Airflow at it with the `+AIRFLOW__WEBSERVER__CONFIG_FILE+` environment variable (for example via `envOverrides` plus a mounted ConfigMap).
195
+
196
+
In Airflow 3 the setting that selects the FAB config file https://github.com/apache/airflow/pull/50774[moved into the FAB provider]: it is now read from `+AIRFLOW__FAB__CONFIG_FILE+` (config key `[fab] config_file`, default `$AIRFLOW_HOME/webserver_config.py`) and the old `+AIRFLOW__WEBSERVER__CONFIG_FILE+` is no longer read.
197
+
The operator generates `webserver_config.py` from your xref:usage-guide/security.adoc#_ldap[AuthenticationClass] and places it at that default path, so on Airflow 3 your custom file is silently ignored and the operator-generated LDAP configuration is used instead.
198
+
If that generated configuration does not match your directory (for example a wrong `ldapFieldNames.uid`), the LDAP search returns no user and login fails.
199
+
200
+
Mounting your own file and overriding the config-file location was never a supported setup and now breaks silently.
201
+
To customize `webserver_config.py`, use `configOverrides` together with `FILE_HEADER` and `FILE_FOOTER` as described in xref:usage-guide/overrides.adoc#_configuration_properties[Configuration & Environment Overrides].
202
+
All LDAP connection details themselves belong in the xref:usage-guide/security.adoc#_ldap[AuthenticationClass].
203
+
204
+
TIP: You can confirm which file Airflow actually loads by running `airflow config get-value fab config_file` inside the pod.
205
+
184
206
== PYTHONPATH with custom DAGs folder using python modules
185
207
186
208
When a custom DAG folder (e.g. `/dags`) is defined with `envOverrides` and some DAGs contain a python module structure, then the variable `PYTHONPATH` should be explicitly defined to contain both this folder and the log config location that is set by the operator. This setting is done automatically by the operator when the default DAGs folder or gitsync are used, but is not done when this is set by the user directly.
Copy file name to clipboardExpand all lines: docs/modules/airflow/pages/usage-guide/overrides.adoc
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,10 @@ Note that `configOverrides` is specifically supported for customizing `webserver
42
42
To override standard Airflow configuration properties (listed in the Configuration Reference), use `envOverrides` with the `AIRFLOW__SECTION__KEY` format, as the operator injects these via environment variables rather than modifying a static config file.
43
43
This is described in the following section.
44
44
45
+
NOTE: Do not supply your own `webserver_config.py` via a mounted file and `+AIRFLOW__WEBSERVER__CONFIG_FILE+`.
46
+
On Airflow 3 that environment variable is no longer read (see xref:troubleshooting/index.adoc[Troubleshooting]).
47
+
Use `configOverrides` with `FILE_HEADER`/`FILE_FOOTER` instead.
48
+
45
49
== Environment Variables
46
50
47
51
These can be set -- or overwritten -- at either the role level:
0 commit comments