apache-airflow-providers-fab 1.1.1rc1__py3-none-any.whl → 1.2.0__py3-none-any.whl
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.
- airflow/providers/fab/LICENSE +4 -4
- airflow/providers/fab/__init__.py +1 -1
- airflow/providers/fab/auth_manager/security_manager/override.py +31 -9
- airflow/providers/fab/get_provider_info.py +7 -7
- {apache_airflow_providers_fab-1.1.1rc1.dist-info → apache_airflow_providers_fab-1.2.0.dist-info}/METADATA +11 -11
- {apache_airflow_providers_fab-1.1.1rc1.dist-info → apache_airflow_providers_fab-1.2.0.dist-info}/RECORD +8 -8
- {apache_airflow_providers_fab-1.1.1rc1.dist-info → apache_airflow_providers_fab-1.2.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_fab-1.1.1rc1.dist-info → apache_airflow_providers_fab-1.2.0.dist-info}/entry_points.txt +0 -0
airflow/providers/fab/LICENSE
CHANGED
@@ -215,7 +215,7 @@ Third party Apache 2.0 licenses
|
|
215
215
|
|
216
216
|
The following components are provided under the Apache 2.0 License.
|
217
217
|
See project link for details. The text of each license is also included
|
218
|
-
at licenses/LICENSE-[project].txt.
|
218
|
+
at 3rd-party-licenses/LICENSE-[project].txt.
|
219
219
|
|
220
220
|
(ALv2 License) hue v4.3.0 (https://github.com/cloudera/hue/)
|
221
221
|
(ALv2 License) jqclock v2.3.0 (https://github.com/JohnRDOrazio/jQuery-Clock-Plugin)
|
@@ -227,7 +227,7 @@ MIT licenses
|
|
227
227
|
========================================================================
|
228
228
|
|
229
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 licenses/LICENSE-[project].txt.
|
230
|
+
The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
|
231
231
|
|
232
232
|
(MIT License) jquery v3.5.1 (https://jquery.org/license/)
|
233
233
|
(MIT License) dagre-d3 v0.6.4 (https://github.com/cpettitt/dagre-d3)
|
@@ -243,11 +243,11 @@ The text of each license is also included at licenses/LICENSE-[project].txt.
|
|
243
243
|
BSD 3-Clause licenses
|
244
244
|
========================================================================
|
245
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 licenses/LICENSE-[project].txt.
|
246
|
+
The text of each license is also included at 3rd-party-licenses/LICENSE-[project].txt.
|
247
247
|
|
248
248
|
(BSD 3 License) d3 v5.16.0 (https://d3js.org)
|
249
249
|
(BSD 3 License) d3-shape v2.1.0 (https://github.com/d3/d3-shape)
|
250
250
|
(BSD 3 License) cgroupspy 0.2.1 (https://github.com/cloudsigma/cgroupspy)
|
251
251
|
|
252
252
|
========================================================================
|
253
|
-
See licenses/LICENSES-ui.txt for packages used in `/airflow/www`
|
253
|
+
See 3rd-party-licenses/LICENSES-ui.txt for packages used in `/airflow/www`
|
@@ -29,7 +29,7 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "1.
|
32
|
+
__version__ = "1.2.0"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
35
|
"2.9.0"
|
@@ -57,8 +57,10 @@ from flask_appbuilder.security.views import (
|
|
57
57
|
AuthOAuthView,
|
58
58
|
AuthOIDView,
|
59
59
|
AuthRemoteUserView,
|
60
|
+
AuthView,
|
60
61
|
RegisterUserModelView,
|
61
62
|
)
|
63
|
+
from flask_appbuilder.views import expose
|
62
64
|
from flask_babel import lazy_gettext
|
63
65
|
from flask_jwt_extended import JWTManager, current_user as current_user_jwt
|
64
66
|
from flask_login import LoginManager
|
@@ -123,6 +125,21 @@ log = logging.getLogger(__name__)
|
|
123
125
|
MAX_NUM_DATABASE_USER_SESSIONS = 50000
|
124
126
|
|
125
127
|
|
128
|
+
# The following class patches the logout method within AuthView, so it only supports POST method
|
129
|
+
# to make CSRF protection effective. You could remove the patch and configure it when it is supported
|
130
|
+
# natively by Flask-AppBuilder (https://github.com/dpgaspar/Flask-AppBuilder/issues/2248)
|
131
|
+
|
132
|
+
|
133
|
+
class _ModifiedAuthView(AuthView):
|
134
|
+
@expose("/logout/", methods=["POST"])
|
135
|
+
def logout(self):
|
136
|
+
return super().logout()
|
137
|
+
|
138
|
+
|
139
|
+
for auth_view in [AuthDBView, AuthLDAPView, AuthOAuthView, AuthOIDView, AuthRemoteUserView]:
|
140
|
+
auth_view.__bases__ = (_ModifiedAuthView,)
|
141
|
+
|
142
|
+
|
126
143
|
class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
|
127
144
|
"""
|
128
145
|
This security manager overrides the default AirflowSecurityManager security manager.
|
@@ -1506,14 +1523,15 @@ class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
|
|
1506
1523
|
user.username = username
|
1507
1524
|
user.email = email
|
1508
1525
|
user.active = True
|
1526
|
+
self.get_session.add(user)
|
1509
1527
|
user.roles = role if isinstance(role, list) else [role]
|
1510
1528
|
if hashed_password:
|
1511
1529
|
user.password = hashed_password
|
1512
1530
|
else:
|
1513
1531
|
user.password = generate_password_hash(password)
|
1514
|
-
self.get_session.add(user)
|
1515
1532
|
self.get_session.commit()
|
1516
1533
|
log.info(const.LOGMSG_INF_SEC_ADD_USER, username)
|
1534
|
+
|
1517
1535
|
return user
|
1518
1536
|
except Exception as e:
|
1519
1537
|
log.error(const.LOGMSG_ERR_SEC_ADD_USER, e)
|
@@ -2229,13 +2247,17 @@ class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
|
|
2229
2247
|
me = self.oauth_remotes[provider].get("userinfo")
|
2230
2248
|
data = me.json()
|
2231
2249
|
log.debug("User info from Okta: %s", data)
|
2232
|
-
|
2233
|
-
|
2234
|
-
|
2235
|
-
|
2236
|
-
|
2237
|
-
|
2238
|
-
|
2250
|
+
if "error" not in data:
|
2251
|
+
return {
|
2252
|
+
"username": f"{provider}_{data['sub']}",
|
2253
|
+
"first_name": data.get("given_name", ""),
|
2254
|
+
"last_name": data.get("family_name", ""),
|
2255
|
+
"email": data["email"],
|
2256
|
+
"role_keys": data.get("groups", []),
|
2257
|
+
}
|
2258
|
+
else:
|
2259
|
+
log.error(data.get("error_description"))
|
2260
|
+
return {}
|
2239
2261
|
# for Auth0
|
2240
2262
|
if provider == "auth0":
|
2241
2263
|
data = self.appbuilder.sm.oauth_remotes[provider].userinfo()
|
@@ -2258,8 +2280,8 @@ class FabAirflowSecurityManagerOverride(AirflowSecurityManagerV2):
|
|
2258
2280
|
"first_name": data.get("given_name", ""),
|
2259
2281
|
"last_name": data.get("family_name", ""),
|
2260
2282
|
"email": data.get("email", ""),
|
2283
|
+
"role_keys": data.get("groups", []),
|
2261
2284
|
}
|
2262
|
-
|
2263
2285
|
# for Authentik
|
2264
2286
|
if provider == "authentik":
|
2265
2287
|
id_token = resp["id_token"]
|
@@ -28,15 +28,15 @@ def get_provider_info():
|
|
28
28
|
"name": "Fab",
|
29
29
|
"description": "`Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__\n",
|
30
30
|
"state": "ready",
|
31
|
-
"source-date-epoch":
|
32
|
-
"versions": ["1.1.1", "1.1.0", "1.0.4", "1.0.3", "1.0.2", "1.0.1", "1.0.0"],
|
31
|
+
"source-date-epoch": 1718604369,
|
32
|
+
"versions": ["1.2.0", "1.1.1", "1.1.0", "1.0.4", "1.0.3", "1.0.2", "1.0.1", "1.0.0"],
|
33
33
|
"dependencies": [
|
34
34
|
"apache-airflow>=2.9.0",
|
35
35
|
"flask>=2.2,<2.3",
|
36
|
-
"flask-appbuilder==4.
|
36
|
+
"flask-appbuilder==4.5.0",
|
37
37
|
"flask-login>=0.6.2",
|
38
38
|
"google-re2>=1.0",
|
39
|
-
"jmespath",
|
39
|
+
"jmespath>=0.7.0",
|
40
40
|
],
|
41
41
|
"config": {
|
42
42
|
"fab": {
|
@@ -44,21 +44,21 @@ def get_provider_info():
|
|
44
44
|
"options": {
|
45
45
|
"auth_rate_limited": {
|
46
46
|
"description": "Boolean for enabling rate limiting on authentication endpoints.\n",
|
47
|
-
"version_added": "1.0.
|
47
|
+
"version_added": "1.0.2",
|
48
48
|
"type": "boolean",
|
49
49
|
"example": None,
|
50
50
|
"default": "True",
|
51
51
|
},
|
52
52
|
"auth_rate_limit": {
|
53
53
|
"description": "Rate limit for authentication endpoints.\n",
|
54
|
-
"version_added": "
|
54
|
+
"version_added": "1.0.2",
|
55
55
|
"type": "string",
|
56
56
|
"example": None,
|
57
57
|
"default": "5 per 40 second",
|
58
58
|
},
|
59
59
|
"update_fab_perms": {
|
60
60
|
"description": "Update FAB permissions and sync security manager roles\non webserver startup\n",
|
61
|
-
"version_added": "1.
|
61
|
+
"version_added": "1.0.2",
|
62
62
|
"type": "string",
|
63
63
|
"example": None,
|
64
64
|
"default": "True",
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: apache-airflow-providers-fab
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.2.0
|
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>
|
@@ -21,15 +21,15 @@ Classifier: Programming Language :: Python :: 3.10
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.11
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
23
|
Classifier: Topic :: System :: Monitoring
|
24
|
-
Requires-Dist: apache-airflow>=2.9.
|
25
|
-
Requires-Dist: flask-appbuilder==4.
|
24
|
+
Requires-Dist: apache-airflow>=2.9.0
|
25
|
+
Requires-Dist: flask-appbuilder==4.5.0
|
26
26
|
Requires-Dist: flask-login>=0.6.2
|
27
27
|
Requires-Dist: flask>=2.2,<2.3
|
28
28
|
Requires-Dist: google-re2>=1.0
|
29
|
-
Requires-Dist: jmespath
|
29
|
+
Requires-Dist: jmespath>=0.7.0
|
30
30
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
31
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-fab/1.
|
32
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-fab/1.
|
31
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-fab/1.2.0/changelog.html
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-fab/1.2.0
|
33
33
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
34
34
|
Project-URL: Source Code, https://github.com/apache/airflow
|
35
35
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
@@ -79,7 +79,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
79
79
|
|
80
80
|
Package ``apache-airflow-providers-fab``
|
81
81
|
|
82
|
-
Release: ``1.
|
82
|
+
Release: ``1.2.0``
|
83
83
|
|
84
84
|
|
85
85
|
`Flask App Builder <https://flask-appbuilder.readthedocs.io/>`__
|
@@ -92,7 +92,7 @@ This is a provider package for ``fab`` provider. All classes for this provider p
|
|
92
92
|
are in ``airflow.providers.fab`` python package.
|
93
93
|
|
94
94
|
You can find package information and changelog for the provider
|
95
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.
|
95
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.2.0/>`_.
|
96
96
|
|
97
97
|
Installation
|
98
98
|
------------
|
@@ -111,11 +111,11 @@ PIP package Version required
|
|
111
111
|
==================== ==================
|
112
112
|
``apache-airflow`` ``>=2.9.0``
|
113
113
|
``flask`` ``>=2.2,<2.3``
|
114
|
-
``flask-appbuilder`` ``==4.
|
114
|
+
``flask-appbuilder`` ``==4.5.0``
|
115
115
|
``flask-login`` ``>=0.6.2``
|
116
116
|
``google-re2`` ``>=1.0``
|
117
|
-
``jmespath``
|
117
|
+
``jmespath`` ``>=0.7.0``
|
118
118
|
==================== ==================
|
119
119
|
|
120
120
|
The changelog for the provider package can be found in the
|
121
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.
|
121
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-fab/1.2.0/changelog.html>`_.
|
@@ -1,6 +1,6 @@
|
|
1
|
-
airflow/providers/fab/LICENSE,sha256=
|
2
|
-
airflow/providers/fab/__init__.py,sha256=
|
3
|
-
airflow/providers/fab/get_provider_info.py,sha256=
|
1
|
+
airflow/providers/fab/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
2
|
+
airflow/providers/fab/__init__.py,sha256=n37H_HkofwOz2q7k3JkSSpCi4b_pCsFfQT_S88Dvfng,1490
|
3
|
+
airflow/providers/fab/get_provider_info.py,sha256=RkAA2URKN6LzRa-yX0wQNyFltzfMJ_yRiego7v5npL4,3019
|
4
4
|
airflow/providers/fab/auth_manager/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
5
5
|
airflow/providers/fab/auth_manager/fab_auth_manager.py,sha256=j_jAOd4iHPY5ZM6Uadi89zfYNndwlskPxBDSP14ieX4,19581
|
6
6
|
airflow/providers/fab/auth_manager/api/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
@@ -25,14 +25,14 @@ airflow/providers/fab/auth_manager/openapi/__init__.py,sha256=9hdXHABrVpkbpjZgUf
|
|
25
25
|
airflow/providers/fab/auth_manager/openapi/v1.yaml,sha256=xFlQMccLoGarx8SnQvGJ1DRfHo4jQ3p9DzoPqQINcCw,19380
|
26
26
|
airflow/providers/fab/auth_manager/security_manager/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
27
27
|
airflow/providers/fab/auth_manager/security_manager/constants.py,sha256=x1Sjl_Mu3wmaSy3NFZlHxK2z-juzWmMs1SrzJ0aiBBQ,907
|
28
|
-
airflow/providers/fab/auth_manager/security_manager/override.py,sha256=
|
28
|
+
airflow/providers/fab/auth_manager/security_manager/override.py,sha256=_nOv-BeyAKtRhtu_3P9PfhPZPFY3xl5xpcWCFhF5K0M,112273
|
29
29
|
airflow/providers/fab/auth_manager/views/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
30
30
|
airflow/providers/fab/auth_manager/views/permissions.py,sha256=k5APUTqqKZqMxCWlKrUEgqdDVrGa9719HJ3UmFpiSLc,2886
|
31
31
|
airflow/providers/fab/auth_manager/views/roles_list.py,sha256=o_VqnLbQa4sisKxLwyx6VCl3HmvjKcjkrJG23R81FMQ,1494
|
32
32
|
airflow/providers/fab/auth_manager/views/user.py,sha256=KaBWeBMy5j8o9qwe0RDHhtToO4aC6pH_m7N9IcIj1xM,5995
|
33
33
|
airflow/providers/fab/auth_manager/views/user_edit.py,sha256=d8wQ_8Rk8Ce95sCElZIXN7ATwbXrT2Tauqn5uTwuo2E,2140
|
34
34
|
airflow/providers/fab/auth_manager/views/user_stats.py,sha256=zP2eX6e40rpEohJcvnvri4Khu3Q4ULLxjz1zOWvOr8A,1300
|
35
|
-
apache_airflow_providers_fab-1.
|
36
|
-
apache_airflow_providers_fab-1.
|
37
|
-
apache_airflow_providers_fab-1.
|
38
|
-
apache_airflow_providers_fab-1.
|
35
|
+
apache_airflow_providers_fab-1.2.0.dist-info/entry_points.txt,sha256=m05kASp7vFi0ZmQ--CFp7GeJpPL7UT2RQF8EEP5XRX8,99
|
36
|
+
apache_airflow_providers_fab-1.2.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
37
|
+
apache_airflow_providers_fab-1.2.0.dist-info/METADATA,sha256=tpMGPvazu-TMWFN19Fxa597x4DDkiCOjXuvJpVbeuZ0,5012
|
38
|
+
apache_airflow_providers_fab-1.2.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|