apache-airflow-providers-fab 1.5.3__tar.gz → 2.0.0b1__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 (122) hide show
  1. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1}/PKG-INFO +17 -35
  2. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1}/README.rst +8 -27
  3. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1}/pyproject.toml +47 -16
  4. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/LICENSE +0 -52
  5. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/__init__.py +3 -3
  6. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api/auth/backend/basic_auth.py +3 -3
  7. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api/auth/backend/kerberos_auth.py +4 -4
  8. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api/auth/backend/session.py +1 -1
  9. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api_endpoints/role_and_permission_endpoint.py +14 -13
  10. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api_endpoints/user_endpoint.py +12 -12
  11. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/datamodels/login.py +32 -0
  12. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/openapi/v1-generated.yaml +152 -0
  13. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/routes/login.py +51 -0
  14. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/services/login.py +58 -0
  15. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/db_command.py +2 -4
  16. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/user_command.py +2 -2
  17. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/utils.py +10 -9
  18. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/fab_auth_manager.py +231 -126
  19. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/models/__init__.py +1 -1
  20. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/models/anonymous_user.py +1 -1
  21. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/models/db.py +22 -5
  22. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/openapi/__init__.py +16 -0
  23. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/schemas/__init__.py +16 -0
  24. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/schemas/user_schema.py +1 -1
  25. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/security_manager/override.py +71 -632
  26. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/views/__init__.py +16 -0
  27. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/views/permissions.py +1 -1
  28. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/views/roles_list.py +1 -1
  29. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/views/user.py +1 -1
  30. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/views/user_edit.py +1 -1
  31. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/views/user_stats.py +1 -1
  32. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/get_provider_info.py +22 -16
  33. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/migrations/__init__.py +16 -0
  34. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/migrations/versions/__init__.py +16 -0
  35. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/airflow_flask_app.py +31 -0
  36. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/api_connexion/__init__.py +17 -0
  37. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/api_connexion/exceptions.py +197 -0
  38. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/api_connexion/parameters.py +131 -0
  39. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/api_connexion/security.py +84 -0
  40. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/api_connexion/types.py +30 -0
  41. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/app.py +112 -0
  42. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/auth.py +350 -0
  43. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/constants.py +28 -0
  44. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/__init__.py +16 -0
  45. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/init_appbuilder.py +602 -0
  46. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/init_jinja_globals.py +82 -0
  47. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/init_manifest_files.py +61 -0
  48. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/init_security.py +61 -0
  49. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/init_session.py +64 -0
  50. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/extensions/init_views.py +177 -0
  51. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/package-lock.json +10127 -0
  52. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/package.json +81 -0
  53. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/security/__init__.py +17 -0
  54. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/security/permissions.py +126 -0
  55. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/security_appless.py +44 -0
  56. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/security_manager.py +122 -0
  57. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/session.py +41 -0
  58. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/css/bootstrap-theme.css +6215 -0
  59. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/css/flash.css +57 -0
  60. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/css/loading-dots.css +60 -0
  61. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/css/main.css +676 -0
  62. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/css/material-icons.css +84 -0
  63. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/airflowDefaultTheme.feec4a4075c2f3d6ae01.css +33 -0
  64. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/airflowDefaultTheme.feec4a4075c2f3d6ae01.js +1 -0
  65. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/flash.137b30cff85b5588e661.css +18 -0
  66. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/flash.137b30cff85b5588e661.js +1 -0
  67. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/jquery-ui.min.css +5 -0
  68. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/jquery-ui.min.js +2 -0
  69. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/jquery-ui.min.js.LICENSE.txt +4 -0
  70. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/loadingDots.48ab7d5b04e66f2686b0.css +18 -0
  71. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/loadingDots.48ab7d5b04e66f2686b0.js +1 -0
  72. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/main.ec1d38d994d72bb083cd.css +18 -0
  73. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/main.ec1d38d994d72bb083cd.js +2 -0
  74. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/main.ec1d38d994d72bb083cd.js.LICENSE.txt +18 -0
  75. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/manifest.json +17 -0
  76. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/materialIcons.57390fa60d8f61175334.css +18 -0
  77. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/materialIcons.57390fa60d8f61175334.js +1 -0
  78. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/moment.4d28b37c229bdfc54575.js +2 -0
  79. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/moment.4d28b37c229bdfc54575.js.LICENSE.txt +11 -0
  80. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/dist/oss-licenses.json +29 -0
  81. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/js/datetime_utils.js +134 -0
  82. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/js/main.js +324 -0
  83. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/sort_asc.png +0 -0
  84. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/sort_both.png +0 -0
  85. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/static/sort_desc.png +0 -0
  86. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/airflow/_messages.html +30 -0
  87. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/airflow/error.html +35 -0
  88. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/airflow/main.html +78 -0
  89. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/airflow/traceback.html +53 -0
  90. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/appbuilder/flash.html +34 -0
  91. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/appbuilder/index.html +20 -0
  92. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/appbuilder/navbar.html +60 -0
  93. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/appbuilder/navbar_menu.html +60 -0
  94. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/templates/appbuilder/navbar_right.html +64 -0
  95. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/utils.py +272 -0
  96. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/views.py +129 -0
  97. apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www/webpack.config.js +213 -0
  98. apache_airflow_providers_fab-1.5.3/airflow/providers/fab/auth_manager/decorators/auth.py +0 -126
  99. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/alembic.ini +0 -0
  100. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/__init__.py +0 -0
  101. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api/__init__.py +0 -0
  102. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api/auth/__init__.py +0 -0
  103. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api/auth/backend/__init__.py +0 -0
  104. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/api_endpoints/__init__.py +0 -0
  105. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/auth_manager/openapi → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi}/__init__.py +0 -0
  106. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/auth_manager/schemas → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/datamodels}/__init__.py +0 -0
  107. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/auth_manager/views → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/openapi}/__init__.py +0 -0
  108. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/migrations → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/routes}/__init__.py +0 -0
  109. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/migrations/versions → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/api_fastapi/services}/__init__.py +0 -0
  110. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/__init__.py +0 -0
  111. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/definition.py +0 -0
  112. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/role_command.py +0 -0
  113. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/cli_commands/sync_perm_command.py +0 -0
  114. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/openapi/v1.yaml +0 -0
  115. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py +0 -0
  116. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/auth_manager/decorators → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/auth_manager/security_manager}/__init__.py +0 -0
  117. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/auth_manager/security_manager/constants.py +0 -0
  118. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/migrations/README +0 -0
  119. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/migrations/env.py +0 -0
  120. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/migrations/script.py.mako +0 -0
  121. {apache_airflow_providers_fab-1.5.3 → apache_airflow_providers_fab-2.0.0b1/src}/airflow/providers/fab/migrations/versions/0001_1_4_0_placeholder_migration.py +0 -0
  122. {apache_airflow_providers_fab-1.5.3/airflow/providers/fab/auth_manager/security_manager → apache_airflow_providers_fab-2.0.0b1/src/airflow/providers/fab/www}/__init__.py +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: 1.5.3
3
+ Version: 2.0.0b1
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,20 @@ 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.1
24
- Requires-Dist: apache-airflow>=2.9.0
25
+ Requires-Dist: flask>=2.2,<2.3
25
26
  Requires-Dist: flask-appbuilder==4.5.3
26
27
  Requires-Dist: flask-login>=0.6.2
27
- Requires-Dist: flask>=2.2,<2.3
28
- Requires-Dist: google-re2>=1.0
28
+ Requires-Dist: connexion[flask]>=2.14.2,<3.0
29
29
  Requires-Dist: jmespath>=0.7.0
30
30
  Requires-Dist: kerberos>=1.3.0 ; extra == "kerberos"
31
31
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
32
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3/changelog.html
33
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3
32
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1/changelog.html
33
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1
34
+ Project-URL: Mastodon, https://fosstodon.org/@airflow
34
35
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
35
36
  Project-URL: Source Code, https://github.com/apache/airflow
36
- Project-URL: Twitter, https://x.com/ApacheAirflow
37
37
  Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
38
38
  Provides-Extra: kerberos
39
39
 
@@ -55,33 +55,14 @@ Provides-Extra: kerberos
55
55
  specific language governing permissions and limitations
56
56
  under the License.
57
57
 
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
58
+ .. NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
80
59
 
60
+ .. IF YOU WANT TO MODIFY TEMPLATE FOR THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
61
+ ``PROVIDER_README_TEMPLATE.rst.jinja2`` IN the ``dev/breeze/src/airflow_breeze/templates`` DIRECTORY
81
62
 
82
63
  Package ``apache-airflow-providers-fab``
83
64
 
84
- Release: ``1.5.3``
65
+ Release: ``2.0.0b1``
85
66
 
86
67
 
87
68
  `Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__
@@ -94,7 +75,7 @@ This is a provider package for ``fab`` provider. All classes for this provider p
94
75
  are in ``airflow.providers.fab`` python package.
95
76
 
96
77
  You can find package information and changelog for the provider
97
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3/>`_.
78
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1/>`_.
98
79
 
99
80
  Installation
100
81
  ------------
@@ -111,12 +92,12 @@ Requirements
111
92
  ========================================== ==================
112
93
  PIP package Version required
113
94
  ========================================== ==================
114
- ``apache-airflow`` ``>=2.9.0``
95
+ ``apache-airflow`` ``>=3.0.0.dev0``
115
96
  ``apache-airflow-providers-common-compat`` ``>=1.2.1``
116
97
  ``flask`` ``>=2.2,<2.3``
117
98
  ``flask-appbuilder`` ``==4.5.3``
118
99
  ``flask-login`` ``>=0.6.2``
119
- ``google-re2`` ``>=1.0``
100
+ ``connexion[flask]`` ``>=2.14.2,<3.0``
120
101
  ``jmespath`` ``>=0.7.0``
121
102
  ========================================== ==================
122
103
 
@@ -140,4 +121,5 @@ Dependent package
140
121
  ================================================================================================================== =================
141
122
 
142
123
  The changelog for the provider package can be found in the
143
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3/changelog.html>`_.
124
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1/changelog.html>`_.
125
+
@@ -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: ``1.5.3``
26
+ Release: ``2.0.0b1``
46
27
 
47
28
 
48
29
  `Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__
@@ -55,7 +36,7 @@ This is a provider package for ``fab`` provider. All classes for this provider p
55
36
  are in ``airflow.providers.fab`` python package.
56
37
 
57
38
  You can find package information and changelog for the provider
58
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3/>`_.
39
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1/>`_.
59
40
 
60
41
  Installation
61
42
  ------------
@@ -72,12 +53,12 @@ Requirements
72
53
  ========================================== ==================
73
54
  PIP package Version required
74
55
  ========================================== ==================
75
- ``apache-airflow`` ``>=2.9.0``
56
+ ``apache-airflow`` ``>=3.0.0.dev0``
76
57
  ``apache-airflow-providers-common-compat`` ``>=1.2.1``
77
58
  ``flask`` ``>=2.2,<2.3``
78
59
  ``flask-appbuilder`` ``==4.5.3``
79
60
  ``flask-login`` ``>=0.6.2``
80
- ``google-re2`` ``>=1.0``
61
+ ``connexion[flask]`` ``>=2.14.2,<3.0``
81
62
  ``jmespath`` ``>=0.7.0``
82
63
  ========================================== ==================
83
64
 
@@ -101,4 +82,4 @@ Dependent package
101
82
  ================================================================================================================== =================
102
83
 
103
84
  The changelog for the provider package can be found in the
104
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3/changelog.html>`_.
85
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1/changelog.html>`_.
@@ -1,4 +1,3 @@
1
-
2
1
  # Licensed to the Apache Software Foundation (ASF) under one
3
2
  # or more contributor license agreements. See the NOTICE file
4
3
  # distributed with this work for additional information
@@ -16,18 +15,17 @@
16
15
  # specific language governing permissions and limitations
17
16
  # under the License.
18
17
 
19
- # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
20
- # OVERWRITTEN WHEN PREPARING PACKAGES.
18
+ # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE OVERWRITTEN!
21
19
 
22
- # IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
20
+ # IF YOU WANT TO MODIFY THIS FILE EXCEPT DEPENDENCIES, YOU SHOULD MODIFY THE TEMPLATE
23
21
  # `pyproject_TEMPLATE.toml.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
24
22
  [build-system]
25
- requires = ["flit_core==3.10.1"]
23
+ requires = ["flit_core==3.11.0"]
26
24
  build-backend = "flit_core.buildapi"
27
25
 
28
26
  [project]
29
27
  name = "apache-airflow-providers-fab"
30
- version = "1.5.3"
28
+ version = "2.0.0b1"
31
29
  description = "Provider package apache-airflow-providers-fab for Apache Airflow"
32
30
  readme = "README.rst"
33
31
  authors = [
@@ -53,31 +51,64 @@ classifiers = [
53
51
  "Topic :: System :: Monitoring",
54
52
  ]
55
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``
56
59
  dependencies = [
60
+ "apache-airflow>=3.0.0.dev0",
57
61
  "apache-airflow-providers-common-compat>=1.2.1",
58
- "apache-airflow>=2.9.0",
62
+ "flask>=2.2,<2.3",
63
+ # We are tightly coupled with FAB version as we vendored-in part of FAB code related to security manager
64
+ # This is done as part of preparation to removing FAB as dependency, but we are not ready for it yet
65
+ # Every time we update FAB version here, please make sure that you review the classes and models in
66
+ # `airflow/providers/fab/auth_manager/security_manager/override.py` with their upstream counterparts.
67
+ # In particular, make sure any breaking changes, for example any new methods, are accounted for.
59
68
  "flask-appbuilder==4.5.3",
60
69
  "flask-login>=0.6.2",
61
- "flask>=2.2,<2.3",
62
- "google-re2>=1.0",
70
+ "connexion[flask]>=2.14.2,<3.0",
63
71
  "jmespath>=0.7.0",
64
72
  ]
65
73
 
74
+ # The optional dependencies should be modified in place in the generated file
75
+ # Any change in the dependencies is preserved when the file is regenerated
76
+ [project.optional-dependencies]
77
+ "kerberos" = [
78
+ "kerberos>=1.3.0",
79
+ ]
80
+
81
+ [dependency-groups]
82
+ dev = [
83
+ "apache-airflow",
84
+ "apache-airflow-task-sdk",
85
+ "apache-airflow-devel-common",
86
+ "apache-airflow-providers-common-compat",
87
+ # Additional devel dependencies (do not remove this line and add extra development dependencies)
88
+ "kerberos>=1.3.0",
89
+ ]
90
+
91
+ [tool.uv.sources]
92
+ # These names must match the names as defined in the pyproject.toml of the workspace items,
93
+ # *not* the workspace folder paths
94
+ apache-airflow = {workspace = true}
95
+ apache-airflow-devel-common = {workspace = true}
96
+ apache-airflow-task-sdk = {workspace = true}
97
+ apache-airflow-providers-common-sql = {workspace = true}
98
+ apache-airflow-providers-fab = {workspace = true}
99
+ apache-airflow-providers-standard = {workspace = true}
100
+
66
101
  [project.urls]
67
- "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3"
68
- "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/1.5.3/changelog.html"
102
+ "Documentation" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1"
103
+ "Changelog" = "https://airflow.apache.org/docs/apache-airflow-providers-fab/2.0.0b1/changelog.html"
69
104
  "Bug Tracker" = "https://github.com/apache/airflow/issues"
70
105
  "Source Code" = "https://github.com/apache/airflow"
71
106
  "Slack Chat" = "https://s.apache.org/airflow-slack"
72
- "Twitter" = "https://x.com/ApacheAirflow"
107
+ "Mastodon" = "https://fosstodon.org/@airflow"
73
108
  "YouTube" = "https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/"
74
109
 
75
110
  [project.entry-points."apache_airflow_provider"]
76
111
  provider_info = "airflow.providers.fab.get_provider_info:get_provider_info"
77
- [project.optional-dependencies]
78
- "kerberos" = [
79
- "kerberos>=1.3.0",
80
- ]
81
112
 
82
113
  [tool.flit.module]
83
114
  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`
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "1.5.3"
32
+ __version__ = "2.0.0b1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.9.0"
35
+ "3.0.0.dev0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-fab:{__version__}` needs Apache Airflow 2.9.0+"
38
+ f"The package `apache-airflow-providers-fab:{__version__}` needs Apache Airflow 3.0.0.dev0+"
39
39
  )
@@ -25,8 +25,8 @@ from flask import Response, current_app, request
25
25
  from flask_appbuilder.const import AUTH_LDAP
26
26
  from flask_login import login_user
27
27
 
28
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
29
- from airflow.www.extensions.init_auth_manager import get_auth_manager
28
+ from airflow.api_fastapi.app import get_auth_manager
29
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
30
30
 
31
31
  if TYPE_CHECKING:
32
32
  from airflow.providers.fab.auth_manager.models import User
@@ -46,7 +46,7 @@ def auth_current_user() -> User | None:
46
46
  if auth is None or not auth.username or not auth.password:
47
47
  return None
48
48
 
49
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
49
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
50
50
  user = None
51
51
  if security_manager.auth_type == AUTH_LDAP:
52
52
  user = security_manager.auth_user_ldap(auth.username, auth.password)
@@ -26,13 +26,13 @@ import kerberos
26
26
  from flask import Response, current_app, g, make_response, request
27
27
  from requests_kerberos import HTTPKerberosAuth
28
28
 
29
+ from airflow.api_fastapi.app import get_auth_manager
29
30
  from airflow.configuration import conf
30
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
31
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
31
32
  from airflow.utils.net import getfqdn
32
- from airflow.www.extensions.init_auth_manager import get_auth_manager
33
33
 
34
34
  if TYPE_CHECKING:
35
- from airflow.auth.managers.models.base_user import BaseUser
35
+ from airflow.api_fastapi.auth.managers.models.base_user import BaseUser
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
 
@@ -23,7 +23,7 @@ from typing import Any, Callable, TypeVar, cast
23
23
 
24
24
  from flask import Response
25
25
 
26
- from airflow.www.extensions.init_auth_manager import get_auth_manager
26
+ from airflow.api_fastapi.app import get_auth_manager
27
27
 
28
28
  CLIENT_AUTH: tuple[str, str] | Any | None = None
29
29
 
@@ -24,9 +24,8 @@ 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
27
+ from airflow.api_fastapi.app import get_auth_manager
28
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
30
29
  from airflow.providers.fab.auth_manager.models import Action, Role
31
30
  from airflow.providers.fab.auth_manager.schemas.role_and_permission_schema import (
32
31
  ActionCollection,
@@ -35,12 +34,14 @@ from airflow.providers.fab.auth_manager.schemas.role_and_permission_schema impor
35
34
  role_collection_schema,
36
35
  role_schema,
37
36
  )
38
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
39
- from airflow.security import permissions
40
- from airflow.www.extensions.init_auth_manager import get_auth_manager
37
+ from airflow.providers.fab.www.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound
38
+ from airflow.providers.fab.www.api_connexion.parameters import check_limit, format_parameters
39
+ from airflow.providers.fab.www.api_connexion.security import requires_access_custom_view
40
+ from airflow.providers.fab.www.security import permissions
41
41
 
42
42
  if TYPE_CHECKING:
43
- from airflow.api_connexion.types import APIResponse, UpdateMask
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
@@ -98,7 +99,7 @@ def get_roles(*, order_by: str = "name", limit: int, offset: int | None = None)
98
99
  @format_parameters({"limit": check_limit})
99
100
  def get_permissions(*, limit: int, offset: int | None = None) -> APIResponse:
100
101
  """Get permissions."""
101
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
102
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
102
103
  session = security_manager.get_session
103
104
  total_entries = session.scalars(select(func.count(Action.id))).one()
104
105
  query = select(Action)
@@ -109,7 +110,7 @@ def get_permissions(*, limit: int, offset: int | None = None) -> APIResponse:
109
110
  @requires_access_custom_view("DELETE", permissions.RESOURCE_ROLE)
110
111
  def delete_role(*, role_name: str) -> APIResponse:
111
112
  """Delete a role."""
112
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
113
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
113
114
 
114
115
  role = security_manager.find_role(name=role_name)
115
116
  if not role:
@@ -121,7 +122,7 @@ def delete_role(*, role_name: str) -> APIResponse:
121
122
  @requires_access_custom_view("PUT", permissions.RESOURCE_ROLE)
122
123
  def patch_role(*, role_name: str, update_mask: UpdateMask = None) -> APIResponse:
123
124
  """Update a role."""
124
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
125
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
125
126
  body = request.json
126
127
  try:
127
128
  data = role_schema.load(body)
@@ -154,7 +155,7 @@ def patch_role(*, role_name: str, update_mask: UpdateMask = None) -> APIResponse
154
155
  @requires_access_custom_view("POST", permissions.RESOURCE_ROLE)
155
156
  def post_role() -> APIResponse:
156
157
  """Create a new role."""
157
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
158
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
158
159
  body = request.json
159
160
  try:
160
161
  data = role_schema.load(body)
@@ -25,9 +25,8 @@ 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
28
+ from airflow.api_fastapi.app import get_auth_manager
29
+ from airflow.providers.fab.auth_manager.fab_auth_manager import FabAuthManager
31
30
  from airflow.providers.fab.auth_manager.models import User
32
31
  from airflow.providers.fab.auth_manager.schemas.user_schema import (
33
32
  UserCollection,
@@ -35,19 +34,20 @@ from airflow.providers.fab.auth_manager.schemas.user_schema import (
35
34
  user_collection_schema,
36
35
  user_schema,
37
36
  )
38
- from airflow.providers.fab.auth_manager.security_manager.override import FabAirflowSecurityManagerOverride
39
- from airflow.security import permissions
40
- from airflow.www.extensions.init_auth_manager import get_auth_manager
37
+ from airflow.providers.fab.www.api_connexion.exceptions import AlreadyExists, BadRequest, NotFound, Unknown
38
+ from airflow.providers.fab.www.api_connexion.parameters import check_limit, format_parameters
39
+ from airflow.providers.fab.www.api_connexion.security import requires_access_custom_view
40
+ from airflow.providers.fab.www.security import permissions
41
41
 
42
42
  if TYPE_CHECKING:
43
- from airflow.api_connexion.types import APIResponse, UpdateMask
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
@@ -94,7 +94,7 @@ def post_user() -> APIResponse:
94
94
  except ValidationError as e:
95
95
  raise BadRequest(detail=str(e.messages))
96
96
 
97
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
97
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
98
98
  username = data["username"]
99
99
  email = data["email"]
100
100
 
@@ -137,7 +137,7 @@ def patch_user(*, username: str, update_mask: UpdateMask = None) -> APIResponse:
137
137
  except ValidationError as e:
138
138
  raise BadRequest(detail=str(e.messages))
139
139
 
140
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
140
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
141
141
 
142
142
  user = security_manager.find_user(username=username)
143
143
  if user is None:
@@ -201,7 +201,7 @@ def patch_user(*, username: str, update_mask: UpdateMask = None) -> APIResponse:
201
201
  @requires_access_custom_view("DELETE", permissions.RESOURCE_USER)
202
202
  def delete_user(*, username: str) -> APIResponse:
203
203
  """Delete a user."""
204
- security_manager = cast(FabAirflowSecurityManagerOverride, get_auth_manager().security_manager)
204
+ security_manager = cast(FabAuthManager, get_auth_manager()).security_manager
205
205
 
206
206
  user = security_manager.find_user(username=username)
207
207
  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
+ jwt_token: str
26
+
27
+
28
+ class LoginBody(BaseModel):
29
+ """API Token serializer for requests."""
30
+
31
+ username: str
32
+ password: str