Skip to content

Commit 5f75a86

Browse files
committed
feat: add apache-airflow-providers-fab for user management
1 parent 1969636 commit 5f75a86

File tree

4 files changed

+312
-136
lines changed

4 files changed

+312
-136
lines changed

airflow.cfg

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ fernet_key = $FERNET_KEY
1818
# How long before timing out a python file import
1919
dagbag_import_timeout = 600
2020

21+
auth_manager = airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager
22+
2123
[dag_processor]
2224
# How long before timing out a DagFileProcessor, which processes a dag file
2325
dag_file_processor_timeout = 600
@@ -27,6 +29,8 @@ dag_file_processor_timeout = 600
2729
# SqlAlchemy supports many different database engine, more information
2830
# their website
2931
sql_alchemy_conn = sqlite:////opt/airflow/sqlite/airflow.db
32+
external_db_managers = airflow.providers.fab.auth_manager.models.db.FABDBManager
33+
3034

3135
[api]
3236
# Number of workers to run the Gunicorn web server
@@ -47,10 +51,7 @@ secret_key = l\xba,\xc3\x023\xca\x04\xdb\xf2\xf7\xfa\xb8#\xee>
4751
jwt_secret = $JWT_SECRET
4852

4953
[fab]
50-
51-
# Minutes of non-activity before logged out from UI
52-
# 0 means never get forcibly logged out
53-
session_lifetime_minutes = 0
54+
auth_backends = airflow.providers.fab.auth_manager.api.auth.backend.session
5455

5556
# TODO: check whether we need it. I don't think we're using celery
5657
[celery]

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ dependencies = [
88
# Please use pip to manage airflow dependencies.
99
"apache-airflow==3.0.2",
1010
# Editable install with no version specified.
11+
"apache-airflow-providers-fab",
1112
"apache-airflow-providers-http",
1213
"google-cloud-bigquery",
1314
"pandas",

0 commit comments

Comments
 (0)