gpt4 book ai didi

使用 Airflow 进行 Azure AD 身份验证

转载 作者:行者123 更新时间:2023-12-03 03:44:27 28 4
gpt4 key购买 nike

TLDR:在哪里可以找到 Flask App Builder 的日志来查看出了什么问题?

我正在尝试配置 Azure AD Oauth2 以允许用户在使用 Airflow 之前登录。我的 webserver_config 中有以下配置:

tenant_id = "id"
OAUTH_PROVIDERS = [
{
"name": "azure",
"icon": "fa-windows",
"token_key": "access_token",
"remote_app": {
"client_id": "id",
"client_secret": "secret",
"base_url": "https://login.microsoftonline.com/oauth2",
"scope": "User.Read",
"request_token_url": None,
"access_token_url": "https://login.microsoftonline.com/oauth2/token",
"authorize_url": f"https://login.microsoftonline.com/{tenant_id}/oauth2/v2.0/authorize",
},
},
]

在airflow.cfg中,我设置了rbac = True[webserver]authenticate = True。当我启动 Web 服务器时,我可以登录,但随后我会被重定向到 Airflow 调试页面,该页面会给出 500 响应。在哪里可以找到 Flask App Builder 的日志来查看出了什么问题?

最佳答案

您需要通过将此配置参数 - AIRFLOW__LOGGING__FAB_LOGGING_LEVEL 设置为适当的日志级别来启用 Flask App Builder 的日志。

请参阅此处的文档 https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#fab-logging-level

关于使用 Airflow 进行 Azure AD 身份验证,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69750485/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com