You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Apache Spark (JIRA)" <ji...@apache.org> on 2018/09/02 18:04:02 UTC

[jira] [Commented] (AIRFLOW-2209) AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no attribute 'login_required'

    [ https://issues.apache.org/jira/browse/AIRFLOW-2209?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16601509#comment-16601509 ] 

Apache Spark commented on AIRFLOW-2209:
---------------------------------------

User 'berislavlopac' has created a pull request for this issue:
https://github.com/apache/incubator-airflow/pull/3124

> AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no attribute 'login_required'
> ------------------------------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2209
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2209
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: authentication
>            Reporter: Berislav Lopac
>            Priority: Major
>             Fix For: 2.0.0
>
>
> 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
> {code}
> authenticate = True
> auth_backend = airflow.contrib.auth.backends.password_auth
> {code}
> 2. Run:
> {code}AIRFLOW_HOME=/path/to/config airflow webserver{code}
> The webserver fails with the error message:
> {code:python}
> 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 <module>
>     args.func(args)
>   File "/opt/airflow/src/apache-airflow/airflow/bin/cli.py", line 697, in webserver
>     app = cached_app(conf)
>   File "/opt/airflow/src/apache-airflow/airflow/www/app.py", line 177, in cached_app
>     app = create_app(config, testing)
>   File "/opt/airflow/src/apache-airflow/airflow/www/app.py", line 63, in create_app
>     from airflow.www import views
>   File "/opt/airflow/src/apache-airflow/airflow/www/views.py", line 98, in <module>
>     login_required = airflow.login.login_required
> AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no attribute 'login_required'
> {code}
> h3. Proposed solution
> Restore import of {{login_required}} in {{airflow.contrib.auth.backends.password_auth}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)