如何在airflow 2.0.1上禁用默认身份验证



我们正在将我们的气流服务升级到部署在AWS上的2.0.1,但升级后,它有默认的身份验证页面。气流2

正如其他在线帖子所建议的那样,我们已经在为我们的ansible部署配置文件中将authenticate和rbac设置为false,但这并没有解决问题。

[webserver]
...
# Set to true to turn on authentication:
# https://airflow.incubator.apache.org/security.html#web-authentication
authenticate = False
# Filter the list of dags by owner name (requires authentication to be enabled)
filter_by_owner = False
# Filtering mode. Choices include user (default) and ldapgroup.
# Ldap group filtering requires using the ldap backend
#
# Note that the ldap server needs the "memberOf" overlay to be set up
# in order to user the ldapgroup mode.
owner_mode = user
# Default DAG view.  Valid values are:
# tree, graph, duration, gantt, landing_times
dag_default_view = tree
# Default DAG orientation. Valid values are:
# LR (Left->Right), TB (Top->Bottom), RL (Right->Left), BT (Bottom->Top)
dag_orientation = LR
# Puts the webserver in demonstration mode; blurs the names of Operators for
# privacy.
demo_mode = False
# The amount of time (in secs) webserver will wait for initial handshake
# while fetching logs from other worker machine
log_fetch_timeout_sec = 5
# By default, the webserver shows paused DAGs. Flip this to hide paused
# DAGs by default
hide_paused_dags_by_default = False
# Consistent page size across all listing views in the UI
page_size = 100
# Use FAB-based webserver with RBAC feature
rbac = False

从文档

要停用身份验证并允许将用户标识为匿名用户,$AIRFLOW_HOME/webserver_config.py中的以下条目需要设置为匿名用户默认拥有的所需角色:

AUTH_ROLE_PUBLIC = 'Admin'

最新更新