apache-airflow-providers-fab 2.0.0rc1__tar.gz → 2.0.0rc2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2}/PKG-INFO +24 -34
  2. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2}/README.rst +13 -28
  3. apache_airflow_providers_fab-2.0.0rc2/pyproject.toml +129 -0
  4. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/LICENSE +0 -52
  5. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api/auth/backend/basic_auth.py +3 -4
  6. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api/auth/backend/kerberos_auth.py +4 -4
  7. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api/auth/backend/session.py +1 -1
  8. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api_endpoints/role_and_permission_endpoint.py +14 -14
  9. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api_endpoints/user_endpoint.py +12 -13
  10. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/datamodels/login.py +32 -0
  11. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v1-generated.yaml +153 -0
  12. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/routes/login.py +51 -0
  13. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/services/login.py +58 -0
  14. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/db_command.py +2 -4
  15. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/user_command.py +2 -2
  16. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/utils.py +17 -4
  17. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/fab_auth_manager.py +222 -119
  18. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/models/__init__.py +1 -1
  19. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/models/anonymous_user.py +1 -1
  20. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/models/db.py +22 -5
  21. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/openapi/v1.yaml +9 -0
  22. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/schemas/__init__.py +16 -0
  23. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/schemas/user_schema.py +1 -1
  24. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/security_manager/override.py +89 -561
  25. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/views/__init__.py +16 -0
  26. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/views/permissions.py +1 -1
  27. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/views/roles_list.py +1 -1
  28. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/views/user.py +1 -1
  29. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/views/user_edit.py +1 -1
  30. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/views/user_stats.py +1 -1
  31. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/get_provider_info.py +26 -15
  32. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/migrations/__init__.py +16 -0
  33. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/migrations/versions/__init__.py +16 -0
  34. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/airflow_flask_app.py +31 -0
  35. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/api_connexion/exceptions.py +197 -0
  36. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/api_connexion/parameters.py +131 -0
  37. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/api_connexion/security.py +84 -0
  38. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/api_connexion/types.py +30 -0
  39. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/app.py +34 -9
  40. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/auth.py +350 -0
  41. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/constants.py +28 -0
  42. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/extensions/__init__.py +16 -0
  43. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/extensions/init_appbuilder.py +54 -9
  44. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/extensions/init_jinja_globals.py +5 -3
  45. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/extensions/init_security.py +19 -0
  46. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/extensions/init_session.py +64 -0
  47. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/extensions/init_views.py +177 -0
  48. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/package-lock.json +9651 -0
  49. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/package.json +77 -0
  50. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/security/__init__.py +17 -0
  51. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/security/permissions.py +126 -0
  52. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/security_appless.py +44 -0
  53. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/security_manager.py +122 -0
  54. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/session.py +41 -0
  55. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/css/flash.css +57 -0
  56. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/48f0ea180c40270a5b05.png +1 -0
  57. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/649c0b07771e68fafdeb.png +1 -0
  58. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/airflowDefaultTheme.feec4a4075c2f3d6ae01.css +33 -0
  59. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/airflowDefaultTheme.feec4a4075c2f3d6ae01.js +1 -0
  60. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/f7490d556a6c42e49ba4.png +1 -0
  61. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/flash.137b30cff85b5588e661.css +18 -0
  62. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/flash.137b30cff85b5588e661.js +1 -0
  63. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/jquery-ui.min.css +5 -0
  64. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/jquery-ui.min.js +2 -0
  65. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/jquery-ui.min.js.LICENSE.txt +4 -0
  66. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/loadingDots.48ab7d5b04e66f2686b0.css +18 -0
  67. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/loadingDots.48ab7d5b04e66f2686b0.js +1 -0
  68. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/main.edb2d40dfbbc537916e3.css +18 -0
  69. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/main.edb2d40dfbbc537916e3.js +2 -0
  70. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/main.edb2d40dfbbc537916e3.js.LICENSE.txt +18 -0
  71. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/manifest.json +20 -0
  72. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/materialIcons.57390fa60d8f61175334.css +18 -0
  73. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/materialIcons.57390fa60d8f61175334.js +1 -0
  74. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/moment.624b1f00ba723d39ce06.js +2 -0
  75. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/moment.624b1f00ba723d39ce06.js.LICENSE.txt +11 -0
  76. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/static/dist/oss-licenses.json +20 -0
  77. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/airflow/main.html +10 -11
  78. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/airflow/traceback.html +1 -5
  79. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/templates/appbuilder/flash.html +34 -0
  80. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/appbuilder/navbar.html +7 -0
  81. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/templates/appbuilder/navbar_right.html +64 -0
  82. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/utils.py +272 -0
  83. apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/views.py +129 -0
  84. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/webpack.config.js +5 -40
  85. apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/auth_manager/decorators/auth.py +0 -127
  86. apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/www/extensions/init_views.py +0 -67
  87. apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/www/package-lock.json +0 -21201
  88. apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/www/package.json +0 -156
  89. apache_airflow_providers_fab-2.0.0rc1/pyproject.toml +0 -83
  90. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/__init__.py +0 -0
  91. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/alembic.ini +0 -0
  92. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/__init__.py +0 -0
  93. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api/__init__.py +0 -0
  94. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api/auth/__init__.py +0 -0
  95. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api/auth/backend/__init__.py +0 -0
  96. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/api_endpoints/__init__.py +0 -0
  97. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/auth_manager/openapi → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi}/__init__.py +0 -0
  98. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/auth_manager/schemas → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/datamodels}/__init__.py +0 -0
  99. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/auth_manager/views → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/openapi}/__init__.py +0 -0
  100. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/migrations → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/routes}/__init__.py +0 -0
  101. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/migrations/versions → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/api_fastapi/services}/__init__.py +0 -0
  102. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/__init__.py +0 -0
  103. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/definition.py +0 -0
  104. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/role_command.py +0 -0
  105. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/cli_commands/sync_perm_command.py +0 -0
  106. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/www/extensions → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/openapi}/__init__.py +0 -0
  107. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py +0 -0
  108. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/auth_manager/decorators → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/auth_manager/security_manager}/__init__.py +0 -0
  109. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/auth_manager/security_manager/constants.py +0 -0
  110. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/migrations/README +0 -0
  111. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/migrations/env.py +0 -0
  112. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/migrations/script.py.mako +0 -0
  113. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/migrations/versions/0001_1_4_0_placeholder_migration.py +0 -0
  114. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/auth_manager/security_manager → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www}/__init__.py +0 -0
  115. {apache_airflow_providers_fab-2.0.0rc1/airflow/providers/fab/www → apache_airflow_providers_fab-2.0.0rc2/src/airflow/providers/fab/www/api_connexion}/__init__.py +0 -0
  116. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/extensions/init_manifest_files.py +0 -0
  117. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/css/bootstrap-theme.css +0 -0
  118. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/css/loading-dots.css +0 -0
  119. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/css/main.css +0 -0
  120. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/css/material-icons.css +0 -0
  121. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/js/datetime_utils.js +0 -0
  122. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/js/main.js +0 -0
  123. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/sort_asc.png +0 -0
  124. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/sort_both.png +0 -0
  125. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/static/sort_desc.png +0 -0
  126. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/airflow/_messages.html +0 -0
  127. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/airflow/error.html +0 -0
  128. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/appbuilder/index.html +0 -0
  129. {apache_airflow_providers_fab-2.0.0rc1 → apache_airflow_providers_fab-2.0.0rc2/src}/airflow/providers/fab/www/templates/appbuilder/navbar_menu.html +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-fab
3
- Version: 2.0.0rc1
3
+ Version: 2.0.0rc2
4
4
  Summary: Provider package apache-airflow-providers-fab for Apache Airflow
5
5
  Keywords: airflow-provider,fab,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
@@ -20,20 +20,24 @@ Classifier: Programming Language :: Python :: 3.10
20
20
  Classifier: Programming Language :: Python :: 3.11
21
21
  Classifier: Programming Language :: Python :: 3.12
22
22
  Classifier: Topic :: System :: Monitoring
23
+ Requires-Dist: apache-airflow>=3.0.0.dev0
23
24
  Requires-Dist: apache-airflow-providers-common-compat>=1.2.1rc0
24
- Requires-Dist: apache-airflow>=3.0.0rc0
25
- Requires-Dist: flask-appbuilder==4.5.2
25
+ Requires-Dist: blinker>=1.6.2
26
+ Requires-Dist: flask>=2.2.1,<2.3
27
+ Requires-Dist: flask-appbuilder==4.5.3
26
28
  Requires-Dist: flask-login>=0.6.2
27
- Requires-Dist: flask>=2.2,<2.3
28
- Requires-Dist: google-re2>=1.0
29
+ Requires-Dist: flask-session>=0.4.0,<0.6
30
+ Requires-Dist: flask-wtf>=1.1.0
31
+ Requires-Dist: connexion[flask]>=2.14.2,<3.0
29
32
  Requires-Dist: jmespath>=0.7.0
33
+ Requires-Dist: werkzeug>=2.2,<4
30
34
  Requires-Dist: kerberos>=1.3.0 ; extra == "kerberos"
31
35
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
32
36
  Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0/changelog.html
33
37
  Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0
38
+ Project-URL: Mastodon, https://fosstodon.org/@airflow
34
39
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
35
40
  Project-URL: Source Code, https://github.com/apache/airflow
36
- Project-URL: Twitter, https://x.com/ApacheAirflow
37
41
  Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
38
42
  Provides-Extra: kerberos
39
43
 
@@ -55,33 +59,14 @@ Provides-Extra: kerberos
55
59
  specific language governing permissions and limitations
56
60
  under the License.
57
61
 
58
- .. Licensed to the Apache Software Foundation (ASF) under one
59
- or more contributor license agreements. See the NOTICE file
60
- distributed with this work for additional information
61
- regarding copyright ownership. The ASF licenses this file
62
- to you under the Apache License, Version 2.0 (the
63
- "License"); you may not use this file except in compliance
64
- with the License. You may obtain a copy of the License at
65
-
66
- .. http://www.apache.org/licenses/LICENSE-2.0
67
-
68
- .. Unless required by applicable law or agreed to in writing,
69
- software distributed under the License is distributed on an
70
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
71
- KIND, either express or implied. See the License for the
72
- specific language governing permissions and limitations
73
- under the License.
74
-
75
- .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
76
- OVERWRITTEN WHEN PREPARING PACKAGES.
77
-
78
- .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
79
- `PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
62
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
80
63
 
64
+ .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
65
+ ``PROVIDER_README_TEMPLATE.rst.jinja2`` IN the ``dev/breeze/src/airflow_breeze/templates`` DIRECTORY
81
66
 
82
67
  Package ``apache-airflow-providers-fab``
83
68
 
84
- Release: ``2.0.0.rc1``
69
+ Release: ``2.0.0``
85
70
 
86
71
 
87
72
  `Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__
@@ -113,18 +98,22 @@ PIP package Version required
113
98
  ========================================== ==================
114
99
  ``apache-airflow`` ``>=3.0.0.dev0``
115
100
  ``apache-airflow-providers-common-compat`` ``>=1.2.1``
116
- ``flask`` ``>=2.2,<2.3``
117
- ``flask-appbuilder`` ``==4.5.2``
101
+ ``blinker`` ``>=1.6.2``
102
+ ``flask`` ``>=2.2.1,<2.3``
103
+ ``flask-appbuilder`` ``==4.5.3``
118
104
  ``flask-login`` ``>=0.6.2``
119
- ``google-re2`` ``>=1.0``
105
+ ``flask-session`` ``>=0.4.0,<0.6``
106
+ ``flask-wtf`` ``>=1.1.0``
107
+ ``connexion[flask]`` ``>=2.14.2,<3.0``
120
108
  ``jmespath`` ``>=0.7.0``
109
+ ``werkzeug`` ``>=2.2,<4``
121
110
  ========================================== ==================
122
111
 
123
112
  Cross provider package dependencies
124
113
  -----------------------------------
125
114
 
126
115
  Those are dependencies that might be needed in order to use all the features of the package.
127
- You need to install the specified provider packages in order to use them.
116
+ You need to install the specified providers in order to use them.
128
117
 
129
118
  You can install such cross-provider dependencies when installing from PyPI. For example:
130
119
 
@@ -141,3 +130,4 @@ Dependent package
141
130
 
142
131
  The changelog for the provider package can be found in the
143
132
  `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0/changelog.html>`_.
133
+
@@ -16,33 +16,14 @@
16
16
  specific language governing permissions and limitations
17
17
  under the License.
18
18
 
19
- .. Licensed to the Apache Software Foundation (ASF) under one
20
- or more contributor license agreements. See the NOTICE file
21
- distributed with this work for additional information
22
- regarding copyright ownership. The ASF licenses this file
23
- to you under the Apache License, Version 2.0 (the
24
- "License"); you may not use this file except in compliance
25
- with the License. You may obtain a copy of the License at
26
-
27
- .. http://www.apache.org/licenses/LICENSE-2.0
28
-
29
- .. Unless required by applicable law or agreed to in writing,
30
- software distributed under the License is distributed on an
31
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
32
- KIND, either express or implied. See the License for the
33
- specific language governing permissions and limitations
34
- under the License.
35
-
36
- .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
37
- OVERWRITTEN WHEN PREPARING PACKAGES.
38
-
39
- .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
40
- `PROVIDER_README_TEMPLATE.rst.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
19
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
41
20
 
21
+ .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
22
+ ``PROVIDER_README_TEMPLATE.rst.jinja2`` IN the ``dev/breeze/src/airflow_breeze/templates`` DIRECTORY
42
23
 
43
24
  Package ``apache-airflow-providers-fab``
44
25
 
45
- Release: ``2.0.0.rc1``
26
+ Release: ``2.0.0``
46
27
 
47
28
 
48
29
  `Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__
@@ -74,18 +55,22 @@ PIP package Version required
74
55
  ========================================== ==================
75
56
  ``apache-airflow`` ``>=3.0.0.dev0``
76
57
  ``apache-airflow-providers-common-compat`` ``>=1.2.1``
77
- ``flask`` ``>=2.2,<2.3``
78
- ``flask-appbuilder`` ``==4.5.2``
58
+ ``blinker`` ``>=1.6.2``
59
+ ``flask`` ``>=2.2.1,<2.3``
60
+ ``flask-appbuilder`` ``==4.5.3``
79
61
  ``flask-login`` ``>=0.6.2``
80
- ``google-re2`` ``>=1.0``
62
+ ``flask-session`` ``>=0.4.0,<0.6``
63
+ ``flask-wtf`` ``>=1.1.0``
64
+ ``connexion[flask]`` ``>=2.14.2,<3.0``
81
65
  ``jmespath`` ``>=0.7.0``
66
+ ``werkzeug`` ``>=2.2,<4``
82
67
  ========================================== ==================
83
68
 
84
69
  Cross provider package dependencies
85
70
  -----------------------------------
86
71
 
87
72
  Those are dependencies that might be needed in order to use all the features of the package.
88
- You need to install the specified provider packages in order to use them.
73
+ You need to install the specified providers in order to use them.
89
74
 
90
75
  You can install such cross-provider dependencies when installing from PyPI. For example:
91
76
 
@@ -101,4 +86,4 @@ Dependent package
101
86
  ================================================================================================================== =================
102
87
 
103
88
  The changelog for the provider package can be found in the
104
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0/changelog.html>`_.
89
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0/changelog.html>`_.
@@ -0,0 +1,129 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+
18
+ # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
19
+
20
+ # IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
21
+ # `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
22
+ [build-system]
23
+ requires = ["flit_core==3.12.0"]
24
+ build-backend = "flit_core.buildapi"
25
+
26
+ [project]
27
+ name = "apache-airflow-providers-fab"
28
+ version = "2.0.0.rc2"
29
+ description = "Provider package apache-airflow-providers-fab for Apache Airflow"
30
+ readme = "README.rst"
31
+ authors = [
32
+ {name="Apache Software Foundation", email="dev@airflow.apache.org"},
33
+ ]
34
+ maintainers = [
35
+ {name="Apache Software Foundation", email="dev@airflow.apache.org"},
36
+ ]
37
+ keywords = [ "airflow-provider", "fab", "airflow", "integration" ]
38
+ classifiers = [
39
+ "Development Status :: 5 - Production/Stable",
40
+ "Environment :: Console",
41
+ "Environment :: Web Environment",
42
+ "Intended Audience :: Developers",
43
+ "Intended Audience :: System Administrators",
44
+ "Framework :: Apache Airflow",
45
+ "Framework :: Apache Airflow :: Provider",
46
+ "License :: OSI Approved :: Apache Software License",
47
+ "Programming Language :: Python :: 3.9",
48
+ "Programming Language :: Python :: 3.10",
49
+ "Programming Language :: Python :: 3.11",
50
+ "Programming Language :: Python :: 3.12",
51
+ "Topic :: System :: Monitoring",
52
+ ]
53
+ requires-python = "~=3.9"
54
+
55
+ # The dependencies should be modified in place in the generated file.
56
+ # Any change in the dependencies is preserved when the file is regenerated
57
+ # Make sure to run ``breeze static-checks --type update-providers-dependencies --all-files``
58
+ # After you modify the dependencies, and rebuild your Breeze CI image with ``breeze ci-image build``
59
+ dependencies = [
60
+ "apache-airflow>=3.0.0.dev0",
61
+ "apache-airflow-providers-common-compat>=1.2.1rc0",
62
+ # Blinker use for signals in Flask, this is an optional dependency in Flask 2.2 and lower.
63
+ # In Flask 2.3 it becomes a mandatory dependency, and flask signals are always available.
64
+ "blinker>=1.6.2",
65
+ # Flask 2.3 is scheduled to introduce a number of deprecation removals - some of them might be breaking
66
+ # for our dependencies - notably `_app_ctx_stack` and `_request_ctx_stack` removals.
67
+ # We should remove the limitation after 2.3 is released and our dependencies are updated to handle it
68
+ "flask>=2.2.1,<2.3",
69
+ # We are tightly coupled with FAB version as we vendored-in part of FAB code related to security manager
70
+ # This is done as part of preparation to removing FAB as dependency, but we are not ready for it yet
71
+ # Every time we update FAB version here, please make sure that you review the classes and models in
72
+ # `airflow/providers/fab/auth_manager/security_manager/override.py` with their upstream counterparts.
73
+ # In particular, make sure any breaking changes, for example any new methods, are accounted for.
74
+ "flask-appbuilder==4.5.3",
75
+ "flask-login>=0.6.2",
76
+ # Flask-Session 0.6 add new arguments into the SqlAlchemySessionInterface constructor as well as
77
+ # all parameters now are mandatory which make AirflowDatabaseSessionInterface incompatible with this version.
78
+ "flask-session>=0.4.0,<0.6",
79
+ "flask-wtf>=1.1.0",
80
+ "connexion[flask]>=2.14.2,<3.0",
81
+ "jmespath>=0.7.0",
82
+ # Werkzug 3 breaks Flask-Login 0.6.2
83
+ # we should remove this limitation when FAB supports Flask 2.3
84
+ "werkzeug>=2.2,<4",
85
+
86
+ ]
87
+
88
+ # The optional dependencies should be modified in place in the generated file
89
+ # Any change in the dependencies is preserved when the file is regenerated
90
+ [project.optional-dependencies]
91
+ "kerberos" = [
92
+ "kerberos>=1.3.0",
93
+ ]
94
+
95
+ [dependency-groups]
96
+ dev = [
97
+ "apache-airflow",
98
+ "apache-airflow-task-sdk",
99
+ "apache-airflow-devel-common",
100
+ "apache-airflow-providers-common-compat",
101
+ # Additional devel dependencies (do not remove this line and add extra development dependencies)
102
+ "kerberos>=1.3.0",
103
+ "requests_kerberos>=0.14.0",
104
+ ]
105
+
106
+ [tool.uv.sources]
107
+ # These names must match the names as defined in the pyproject.toml of the workspace items,
108
+ # *not* the workspace folder paths
109
+ apache-airflow = {workspace = true}
110
+ apache-airflow-devel-common = {workspace = true}
111
+ apache-airflow-task-sdk = {workspace = true}
112
+ apache-airflow-providers-common-sql = {workspace = true}
113
+ apache-airflow-providers-fab = {workspace = true}
114
+ apache-airflow-providers-standard = {workspace = true}
115
+
116
+ [project.urls]
117
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0"
118
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0/changelog.html"
119
+ "Bug Tracker" = "https://github.com/apache/airflow/issues"
120
+ "Source Code" = "https://github.com/apache/airflow"
121
+ "Slack Chat" = "https://s.apache.org/airflow-slack"
122
+ "Mastodon" = "https://fosstodon.org/@airflow"
123
+ "YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
124
+
125
+ [project.entry-points."apache_airflow_provider"]
126
+ provider_info = "airflow.providers.fab.get_provider_info:get_provider_info"
127
+
128
+ [tool.flit.module]
129
+ name = "airflow.providers.fab"
@@ -199,55 +199,3 @@ distributed under the License is distributed on an "AS IS" BASIS,
199
199
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
200
  See the License for the specific language governing permissions and
201
201
  limitations under the License.
202
-
203
- ============================================================================
204
- APACHE AIRFLOW SUBCOMPONENTS:
205
-
206
- The Apache Airflow project contains subcomponents with separate copyright
207
- notices and license terms. Your use of the source code for the these
208
- subcomponents is subject to the terms and conditions of the following
209
- licenses.
210
-
211
-
212
- ========================================================================
213
- Third party Apache 2.0 licenses
214
- ========================================================================
215
-
216
- The following components are provided under the Apache 2.0 License.
217
- See project link for details. The text of each license is also included
218
- at 3rd-party-licenses/LICENSE-[project].txt.
219
-
220
- (ALv2 License) hue v4.3.0 (https://github.com/cloudera/hue/)
221
- (ALv2 License) jqclock v2.3.0 (https://github.com/JohnRDOrazio/jQuery-Clock-Plugin)
222
- (ALv2 License) bootstrap3-typeahead v4.0.2 (https://github.com/bassjobsen/Bootstrap-3-Typeahead)
223
- (ALv2 License) connexion v2.7.0 (https://github.com/zalando/connexion)
224
-
225
- ========================================================================
226
- MIT licenses
227
- ========================================================================
228
-
229
- The following components are provided under the MIT License. See project link for details.
230
- The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
231
-
232
- (MIT License) jquery v3.5.1 (https://jquery.org/license/)
233
- (MIT License) dagre-d3 v0.6.4 (https://github.com/cpettitt/dagre-d3)
234
- (MIT License) bootstrap v3.4.1 (https://github.com/twbs/bootstrap/)
235
- (MIT License) d3-tip v0.9.1 (https://github.com/Caged/d3-tip)
236
- (MIT License) dataTables v1.10.25 (https://datatables.net)
237
- (MIT License) normalize.css v3.0.2 (http://necolas.github.io/normalize.css/)
238
- (MIT License) ElasticMock v1.3.2 (https://github.com/vrcmarcos/elasticmock)
239
- (MIT License) MomentJS v2.24.0 (http://momentjs.com/)
240
- (MIT License) eonasdan-bootstrap-datetimepicker v4.17.49 (https://github.com/eonasdan/bootstrap-datetimepicker/)
241
-
242
- ========================================================================
243
- BSD 3-Clause licenses
244
- ========================================================================
245
- The following components are provided under the BSD 3-Clause license. See project links for details.
246
- The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
247
-
248
- (BSD 3 License) d3 v5.16.0 (https://d3js.org)
249
- (BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
250
- (BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
251
-
252
- ========================================================================
253
- See 3rd-party-licenses/LICENSES-ui.txt for packages used in `/airflow/www`
@@ -26,9 +26,9 @@ from flask_appbuilder.const import AUTH_LDAP
26
26
  from flask_login import login_user
27
27
 
28
28
  from airflow.api_fastapi.app import get_auth_manager
29
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
30
29
 
31
30
  if TYPE_CHECKING:
31
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
32
32
  from airflow.providers.fab.auth_manager.models import User
33
33
 
34
34
  CLIENT_AUTH: tuple[str, str] | Any | None = None
@@ -45,8 +45,7 @@ def auth_current_user() -> User | None:
45
45
  auth = request.authorization
46
46
  if auth is None or not auth.username or not auth.password:
47
47
  return None
48
-
49
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
48
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
50
49
  user = None
51
50
  if security_manager.auth_type == AUTH_LDAP:
52
51
  user = security_manager.auth_user_ldap(auth.username, auth.password)
@@ -67,4 +66,4 @@ def requires_authentication(function: T):
67
66
  else:
68
67
  return Response("Unauthorized", 401, {"WWW-Authenticate": "Basic"})
69
68
 
70
- return cast(T, decorated)
69
+ return cast("T", decorated)
@@ -28,11 +28,11 @@ from requests_kerberos import HTTPKerberosAuth
28
28
 
29
29
  from airflow.api_fastapi.app import get_auth_manager
30
30
  from airflow.configuration import conf
31
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
32
31
  from airflow.utils.net import getfqdn
33
32
 
34
33
  if TYPE_CHECKING:
35
- from airflow.auth.managers.models.base_user import BaseUser
34
+ from airflow.api_fastapi.auth.managers.models.base_user import BaseUser
35
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
36
36
 
37
37
  log = logging.getLogger(__name__)
38
38
 
@@ -115,7 +115,7 @@ T = TypeVar("T", bound=Callable)
115
115
 
116
116
 
117
117
  def find_user(username=None, email=None):
118
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
118
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
119
119
  return security_manager.find_user(username=username, email=email)
120
120
 
121
121
 
@@ -143,4 +143,4 @@ def requires_authentication(function: T, find_user: Callable[[str], BaseUser] |
143
143
  return _forbidden()
144
144
  return _unauthorized()
145
145
 
146
- return cast(T, decorated)
146
+ return cast("T", decorated)
@@ -44,4 +44,4 @@ def requires_authentication(function: T):
44
44
  return Response("Unauthorized", 401, {})
45
45
  return function(*args, **kwargs)
46
46
 
47
- return cast(T, decorated)
47
+ return cast("T", decorated)
@@ -24,9 +24,6 @@ from flask import request
24
24
  from marshmallow import ValidationError
25
25
  from sqlalchemy import asc, desc, func, select
26
26
 
27
- from airflow.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound
28
- from airflow.api_connexion.parameters import check_limit, format_parameters
29
- from airflow.api_connexion.security import requires_access_custom_view
30
27
  from airflow.api_fastapi.app import get_auth_manager
31
28
  from airflow.providers.fab.auth_manager.models import Action, Role
32
29
  from airflow.providers.fab.auth_manager.schemas.role_and_permission_schema import (
@@ -36,11 +33,15 @@ from airflow.providers.fab.auth_manager.schemas.role_and_permission_schema impor
36
33
  role_collection_schema,
37
34
  role_schema,
38
35
  )
39
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
40
- from airflow.security import permissions
36
+ from airflow.providers.fab.www.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound
37
+ from airflow.providers.fab.www.api_connexion.parameters import check_limit, format_parameters
38
+ from airflow.providers.fab.www.api_connexion.security import requires_access_custom_view
39
+ from airflow.providers.fab.www.security import permissions
41
40
 
42
41
  if TYPE_CHECKING:
43
- from airflow.api_connexion.types import APIResponse, UpdateMask
42
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
43
+ from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
44
+ from airflow.providers.fab.www.api_connexion.types import APIResponse, UpdateMask
44
45
 
45
46
 
46
47
  def _check_action_and_resource(sm: FabAirflowSecurityManagerOverride, perms: list[tuple[str, str]]) -> None:
@@ -59,7 +60,7 @@ def _check_action_and_resource(sm: FabAirflowSecurityManagerOverride, perms: lis
59
60
  @requires_access_custom_view("GET", permissions.RESOURCE_ROLE)
60
61
  def get_role(*, role_name: str) -> APIResponse:
61
62
  """Get role."""
62
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
63
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
63
64
  role = security_manager.find_role(name=role_name)
64
65
  if not role:
65
66
  raise NotFound(title="Role not found", detail=f"Role with name {role_name!r} was not found")
@@ -70,7 +71,7 @@ def get_role(*, role_name: str) -> APIResponse:
70
71
  @format_parameters({"limit": check_limit})
71
72
  def get_roles(*, order_by: str = "name", limit: int, offset: int | None = None) -> APIResponse:
72
73
  """Get roles."""
73
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
74
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
74
75
  session = security_manager.get_session
75
76
  total_entries = session.scalars(select(func.count(Role.id))).one()
76
77
  direction = desc if order_by.startswith("-") else asc
@@ -80,8 +81,7 @@ def get_roles(*, order_by: str = "name", limit: int, offset: int | None = None)
80
81
  allowed_sort_attrs = ["role_id", "name"]
81
82
  if order_by not in allowed_sort_attrs:
82
83
  raise BadRequest(
83
- detail=f"Ordering with '{order_by}' is disallowed or "
84
- f"the attribute does not exist on the model"
84
+ detail=f"Ordering with '{order_by}' is disallowed or the attribute does not exist on the model"
85
85
  )
86
86
 
87
87
  query = select(Role)
@@ -98,7 +98,7 @@ def get_roles(*, order_by: str = "name", limit: int, offset: int | None = None)
98
98
  @format_parameters({"limit": check_limit})
99
99
  def get_permissions(*, limit: int, offset: int | None = None) -> APIResponse:
100
100
  """Get permissions."""
101
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
101
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
102
102
  session = security_manager.get_session
103
103
  total_entries = session.scalars(select(func.count(Action.id))).one()
104
104
  query = select(Action)
@@ -109,7 +109,7 @@ def get_permissions(*, limit: int, offset: int | None = None) -> APIResponse:
109
109
  @requires_access_custom_view("DELETE", permissions.RESOURCE_ROLE)
110
110
  def delete_role(*, role_name: str) -> APIResponse:
111
111
  """Delete a role."""
112
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
112
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
113
113
 
114
114
  role = security_manager.find_role(name=role_name)
115
115
  if not role:
@@ -121,7 +121,7 @@ def delete_role(*, role_name: str) -> APIResponse:
121
121
  @requires_access_custom_view("PUT", permissions.RESOURCE_ROLE)
122
122
  def patch_role(*, role_name: str, update_mask: UpdateMask = None) -> APIResponse:
123
123
  """Update a role."""
124
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
124
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
125
125
  body = request.json
126
126
  try:
127
127
  data = role_schema.load(body)
@@ -154,7 +154,7 @@ def patch_role(*, role_name: str, update_mask: UpdateMask = None) -> APIResponse
154
154
  @requires_access_custom_view("POST", permissions.RESOURCE_ROLE)
155
155
  def post_role() -> APIResponse:
156
156
  """Create a new role."""
157
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
157
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
158
158
  body = request.json
159
159
  try:
160
160
  data = role_schema.load(body)
@@ -25,9 +25,6 @@ from marshmallow import ValidationError
25
25
  from sqlalchemy import asc, desc, func, select
26
26
  from werkzeug.security import generate_password_hash
27
27
 
28
- from airflow.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound, Unknown
29
- from airflow.api_connexion.parameters import check_limit, format_parameters
30
- from airflow.api_connexion.security import requires_access_custom_view
31
28
  from airflow.api_fastapi.app import get_auth_manager
32
29
  from airflow.providers.fab.auth_manager.models import User
33
30
  from airflow.providers.fab.auth_manager.schemas.user_schema import (
@@ -36,18 +33,21 @@ from airflow.providers.fab.auth_manager.schemas.user_schema import (
36
33
  user_collection_schema,
37
34
  user_schema,
38
35
  )
39
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
40
- from airflow.security import permissions
36
+ from airflow.providers.fab.www.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound, Unknown
37
+ from airflow.providers.fab.www.api_connexion.parameters import check_limit, format_parameters
38
+ from airflow.providers.fab.www.api_connexion.security import requires_access_custom_view
39
+ from airflow.providers.fab.www.security import permissions
41
40
 
42
41
  if TYPE_CHECKING:
43
- from airflow.api_connexion.types import APIResponse, UpdateMask
42
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
44
43
  from airflow.providers.fab.auth_manager.models import Role
44
+ from airflow.providers.fab.www.api_connexion.types import APIResponse, UpdateMask
45
45
 
46
46
 
47
47
  @requires_access_custom_view("GET", permissions.RESOURCE_USER)
48
48
  def get_user(*, username: str) -> APIResponse:
49
49
  """Get a user."""
50
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
50
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
51
51
  user = security_manager.find_user(username=username)
52
52
  if not user:
53
53
  raise NotFound(title="User not found", detail=f"The User with username `{username}` was not found")
@@ -58,7 +58,7 @@ def get_user(*, username: str) -> APIResponse:
58
58
  @format_parameters({"limit": check_limit})
59
59
  def get_users(*, limit: int, order_by: str = "id", offset: str | None = None) -> APIResponse:
60
60
  """Get users."""
61
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
61
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
62
62
  session = security_manager.get_session
63
63
  total_entries = session.execute(select(func.count(User.id))).scalar()
64
64
  direction = desc if order_by.startswith("-") else asc
@@ -76,8 +76,7 @@ def get_users(*, limit: int, order_by: str = "id", offset: str | None = None) ->
76
76
  ]
77
77
  if order_by not in allowed_sort_attrs:
78
78
  raise BadRequest(
79
- detail=f"Ordering with '{order_by}' is disallowed or "
80
- f"the attribute does not exist on the model"
79
+ detail=f"Ordering with '{order_by}' is disallowed or the attribute does not exist on the model"
81
80
  )
82
81
 
83
82
  query = select(User).order_by(direction(getattr(User, order_param))).offset(offset).limit(limit)
@@ -94,7 +93,7 @@ def post_user() -> APIResponse:
94
93
  except ValidationError as e:
95
94
  raise BadRequest(detail=str(e.messages))
96
95
 
97
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
96
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
98
97
  username = data["username"]
99
98
  email = data["email"]
100
99
 
@@ -137,7 +136,7 @@ def patch_user(*, username: str, update_mask: UpdateMask = None) -> APIResponse:
137
136
  except ValidationError as e:
138
137
  raise BadRequest(detail=str(e.messages))
139
138
 
140
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
139
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
141
140
 
142
141
  user = security_manager.find_user(username=username)
143
142
  if user is None:
@@ -201,7 +200,7 @@ def patch_user(*, username: str, update_mask: UpdateMask = None) -> APIResponse:
201
200
  @requires_access_custom_view("DELETE", permissions.RESOURCE_USER)
202
201
  def delete_user(*, username: str) -> APIResponse:
203
202
  """Delete a user."""
204
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
203
+ security_manager = cast("FabAuthManager", get_auth_manager()).security_manager
205
204
 
206
205
  user = security_manager.find_user(username=username)
207
206
  if user is None:
@@ -0,0 +1,32 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ from __future__ import annotations
18
+
19
+ from airflow.api_fastapi.core_api.base import BaseModel
20
+
21
+
22
+ class LoginResponse(BaseModel):
23
+ """API Token serializer for responses."""
24
+
25
+ access_token: str
26
+
27
+
28
+ class LoginBody(BaseModel):
29
+ """API Token serializer for requests."""
30
+
31
+ username: str
32
+ password: str