Berislav Lopac created AIRFLOW-2209:

             Summary: AttributeError: module 
'airflow.contrib.auth.backends.password_auth' has no attribute 'login_required'
                 Key: AIRFLOW-2209
             Project: Apache Airflow
          Issue Type: Bug
          Components: authentication
            Reporter: Berislav Lopac

After updating to the latest {{master}}, the following error shows the error in 
the title in {{airflow-webserver}} logs. Apparently, ~AIRFLOW-1760 has removed 
`login_required` from the `password_auth` module, so the webserver fails.

h3. Steps to repeat:

1. Set in configuration

authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth

2. Run:

{code}AIRFLOW_HOME=/path/to/config airflow webserver{code}

The webserver fails with the error message:

Traceback (most recent call last):
  File "/usr/local/bin/airflow", line 6, in <module>
    exec(compile(open(__file__).read(), __file__, 'exec'))
  File "/opt/airflow/src/apache-airflow/airflow/bin/airflow", line 27, in 
  File "/opt/airflow/src/apache-airflow/airflow/bin/", line 697, in 
    app = cached_app(conf)
  File "/opt/airflow/src/apache-airflow/airflow/www/", line 177, in 
    app = create_app(config, testing)
  File "/opt/airflow/src/apache-airflow/airflow/www/", line 63, in 
    from airflow.www import views
  File "/opt/airflow/src/apache-airflow/airflow/www/", line 98, in 
    login_required = airflow.login.login_required
AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no 
attribute 'login_required'

h3. Proposed solution

Restore import of `login_required` in 

This message was sent by Atlassian JIRA

Reply via email to