1

Hi I'm trying to test out the airflow API, and for that I'm trying to change the default configuration

[api]
auth_backend = airflow.api.auth.backend.deny_all

As guided at https://airflow.apache.org/docs/apache-airflow/stable/security/api.html#api-authentication

To test out the API calls y I'm trying to set the airflow.api.auth_backend to default, ej

[api]
auth_backend = airflow.api.auth.backend.default

But when I run my airflow docker, and enter to the airflow webserver container, I see that my changes are there on the configuration file. I see my file at /opt/airflow/airflow.cfg with my changes but when I run the command

airflow config get-value api auth_backend

or

airflow config list

I don't see this changes!!! As if they were not loaded.

I checked the environment and my airflow home is correct AIRFLOW_HOME=/opt/airflow

Jose Pato
  • 101
  • 8

1 Answers1

3

This is my second time I ran to this problem and I swear is the last one. There is a variable on the configuration file unit-test-mode that overwrites the configuration file. This is clearly indicated on the Configuration Reference docs at:

https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#unit-test-mode

unit_test_mode Turn unit test mode on (overwrites many configuration options with test values at runtime)

Check out that this variable is set to False

[core]
unit_test_mode = False
Jose Pato
  • 101
  • 8