[ 
https://issues.apache.org/jira/browse/AIRFLOW-2103?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kaxil Naik resolved AIRFLOW-2103.
---------------------------------
    Resolution: Fixed

> Authentication using password_auth backend prevents webserver from running
> --------------------------------------------------------------------------
>
>                 Key: AIRFLOW-2103
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-2103
>             Project: Apache Airflow
>          Issue Type: Bug
>            Reporter: Mark Ward
>            Assignee: Kaxil Naik
>            Priority: Critical
>
> airflow webserver fails to run with config
> {code:java}
> [webserver]
> authenticate = True
> auth_backend = airflow.contrib.auth.backends.password_auth
> {code}
> and errors out with following traceback
> {code:java}
> Traceback (most recent call last):
>   File "/usr/local/bin/airflow", line 4, in <module>
>     
> __import__('pkg_resources').run_script('apache-airflow==1.10.0.dev0+incubating',
>  'airflow')
>   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> line 750, in run_script
>     self.require(requires)[0].run_script(script_name, ns)
>   File "/usr/local/lib/python3.6/site-packages/pkg_resources/__init__.py", 
> line 1527, in run_script
>     exec(code, namespace, namespace)
>   File 
> "/usr/local/lib/python3.6/site-packages/apache_airflow-1.10.0.dev0+incubating-py3.6.egg/EGG-INFO/scripts/airflow",
>  line 27, in <module>
>     args.func(args)
>   File 
> "/usr/local/lib/python3.6/site-packages/apache_airflow-1.10.0.dev0+incubating-py3.6.egg/airflow/bin/cli.py",
>  line 696, in webserver
>     app = cached_app(conf)
>   File 
> "/usr/local/lib/python3.6/site-packages/apache_airflow-1.10.0.dev0+incubating-py3.6.egg/airflow/www/app.py",
>  line 176, in cached_app
>     app = create_app(config, testing)
>   File 
> "/usr/local/lib/python3.6/site-packages/apache_airflow-1.10.0.dev0+incubating-py3.6.egg/airflow/www/app.py",
>  line 63, in create_app
>     from airflow.www import views
>   File 
> "/usr/local/lib/python3.6/site-packages/apache_airflow-1.10.0.dev0+incubating-py3.6.egg/airflow/www/views.py",
>  line 97, in <module>
>     login_required = airflow.login.login_required
> AttributeError: module 'airflow.contrib.auth.backends.password_auth' has no 
> attribute 'login_required'
> {code}
> Broke at [https://github.com/apache/incubator-airflow/pull/2730] with the 
> changing of 
> {code:java}
> from flask_login import login_required, current_user, logout_user
> {code}
> to 
> {code:java}
> from flask_login import current_user
> {code}
>  



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

Reply via email to