如何在Apache Airflow中激活身份验证 [英] How to activate authentication in Apache Airflow

查看:44
本文介绍了如何在Apache Airflow中激活身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

气流版本-1.9.0

Airflow version- 1.9.0

我已经安装了Apache气流并进行了后期配置,我能够使用顺序执行器来运行DAG示例.

I have installed apache airflow and post configuration i am able to run sample DAG's with sequential executor.

此外,创建了一个新的示例用户,该用户可以在管理员">用户"下看到.

Also, created new sample user which i can see under Admin > Users.

但是,当我们访问网址为:8080/的webserver地址时,无法获取登录窗口/屏幕,它将直接用管理员用户打开Airflow webserver.如果任何人都可以提供有关如何激活登录屏幕/页面的信息,以便可以将用户凭据用于登录网络服务器,将是非常有帮助的.

But unable to get the login window/screen when we visit webserver adress at :8080/ it directly opens up Airflow webserver with admin user. It will be great help if anyone can provide some info on how to activate login screen/page, so that user credentials can be used for logging into webserver.

遵循的步骤以启用网络用户身份验证: https://airflow.apache.org/security.html?highlight=authentication

推荐答案

airflow.cfg 文件中检查以下内容:

Check the following in your airflow.cfg file:

[webserver]
authenticate = True
auth_backend = airflow.contrib.auth.backends.password_auth

还请记住重新启动Airflow Web服务器,如果仍然无法运行,请运行 airflow initdb 并重新启动Web服务器.

And also remember to Restart Airflow Webserver, if it still doesn't work, run airflow initdb and restart the webserver.

此外,再次检查 airflow.cfg 文件,该文件不包含 authenticate auth_backend 的多个配置.如果发生不止一次,则可能会导致该问题.

Also, double-check in airflow.cfg file that it does not contain multiple configurations for authenticate or auth_backend. If there is more than one occurrence, than it can cause that issue.

如有必要,安装python2.x/3.x的flask_bcrpyt软件包例如,$ python3.7 -m pip安装flask_bcrypt

If necessary, install flask_bcrpyt package of python2.x/3.x For instance, $ python3.7 -m pip install flask_bcrypt

确保您已创建管理员用户,

Make sure you have an admin user created,

airflow create_user -r Admin -u admin -e admin@acme.com -f admin -l user -p *****

这篇关于如何在Apache Airflow中激活身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆