如何在Apache Airflow中激活身份验证

编程入门 行业动态 更新时间:2024-10-27 01:25:59
本文介绍了如何在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.

遵循的步骤以启用网络用户身份验证: airflow.apache/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 -f admin -l user -p *****

更多推荐

如何在Apache Airflow中激活身份验证

本文发布于:2023-11-24 08:27:19,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1624472.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:身份验证   如何在   Apache   Airflow

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!