apache-airflow-providers-hashicorp 4.3.3rc1__py3-none-any.whl → 4.4.3__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/hashicorp/__init__.py +3 -3
- airflow/providers/hashicorp/_internal_client/vault_client.py +3 -1
- airflow/providers/hashicorp/secrets/vault.py +17 -4
- {apache_airflow_providers_hashicorp-4.3.3rc1.dist-info → apache_airflow_providers_hashicorp-4.4.3.dist-info}/METADATA +14 -12
- apache_airflow_providers_hashicorp-4.4.3.dist-info/RECORD +15 -0
- apache_airflow_providers_hashicorp-4.4.3.dist-info/licenses/NOTICE +5 -0
- apache_airflow_providers_hashicorp-4.3.3rc1.dist-info/RECORD +0 -14
- {apache_airflow_providers_hashicorp-4.3.3rc1.dist-info → apache_airflow_providers_hashicorp-4.4.3.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_hashicorp-4.3.3rc1.dist-info → apache_airflow_providers_hashicorp-4.4.3.dist-info}/entry_points.txt +0 -0
- {airflow/providers/hashicorp → apache_airflow_providers_hashicorp-4.4.3.dist-info/licenses}/LICENSE +0 -0
|
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
|
|
|
29
29
|
|
|
30
30
|
__all__ = ["__version__"]
|
|
31
31
|
|
|
32
|
-
__version__ = "4.
|
|
32
|
+
__version__ = "4.4.3"
|
|
33
33
|
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
35
|
-
"2.
|
|
35
|
+
"2.11.0"
|
|
36
36
|
):
|
|
37
37
|
raise RuntimeError(
|
|
38
|
-
f"The package `apache-airflow-providers-hashicorp:{__version__}` needs Apache Airflow 2.
|
|
38
|
+
f"The package `apache-airflow-providers-hashicorp:{__version__}` needs Apache Airflow 2.11.0+"
|
|
39
39
|
)
|
|
@@ -421,7 +421,9 @@ class _VaultClient(LoggingMixin):
|
|
|
421
421
|
if not self.mount_point:
|
|
422
422
|
split_secret_path = secret_path.split("/", 1)
|
|
423
423
|
if len(split_secret_path) < 2:
|
|
424
|
-
raise InvalidPath
|
|
424
|
+
raise InvalidPath(
|
|
425
|
+
"The variable path you have provided is invalid. Please provide a full path of the format: path/to/secret/variable"
|
|
426
|
+
)
|
|
425
427
|
return split_secret_path[0], split_secret_path[1]
|
|
426
428
|
return self.mount_point, secret_path
|
|
427
429
|
|
|
@@ -186,7 +186,7 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
|
|
|
186
186
|
if TYPE_CHECKING:
|
|
187
187
|
from airflow.models.connection import Connection
|
|
188
188
|
|
|
189
|
-
def get_connection(self, conn_id: str) -> Connection | None:
|
|
189
|
+
def get_connection(self, conn_id: str, team_name: str | None = None) -> Connection | None:
|
|
190
190
|
"""
|
|
191
191
|
Get connection from Vault as secret.
|
|
192
192
|
|
|
@@ -208,11 +208,12 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
|
|
|
208
208
|
|
|
209
209
|
return Connection(conn_id, **response)
|
|
210
210
|
|
|
211
|
-
def get_variable(self, key: str) -> str | None:
|
|
211
|
+
def get_variable(self, key: str, team_name: str | None = None) -> str | None:
|
|
212
212
|
"""
|
|
213
213
|
Get Airflow Variable.
|
|
214
214
|
|
|
215
215
|
:param key: Variable Key
|
|
216
|
+
:param team_name: Team name associated to the task trying to access the variable (if any)
|
|
216
217
|
:return: Variable Value retrieved from the vault
|
|
217
218
|
"""
|
|
218
219
|
mount_point, variable_key = self._parse_path(key)
|
|
@@ -225,7 +226,13 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
|
|
|
225
226
|
response = self.vault_client.get_secret(
|
|
226
227
|
secret_path=(mount_point + "/" if mount_point else "") + secret_path
|
|
227
228
|
)
|
|
228
|
-
|
|
229
|
+
if not response:
|
|
230
|
+
return None
|
|
231
|
+
try:
|
|
232
|
+
return response["value"]
|
|
233
|
+
except KeyError:
|
|
234
|
+
self.log.warning('Vault secret %s fetched but does not have required key "value"', key)
|
|
235
|
+
return None
|
|
229
236
|
|
|
230
237
|
def get_config(self, key: str) -> str | None:
|
|
231
238
|
"""
|
|
@@ -244,4 +251,10 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
|
|
|
244
251
|
response = self.vault_client.get_secret(
|
|
245
252
|
secret_path=(mount_point + "/" if mount_point else "") + secret_path
|
|
246
253
|
)
|
|
247
|
-
|
|
254
|
+
if not response:
|
|
255
|
+
return None
|
|
256
|
+
try:
|
|
257
|
+
return response["value"]
|
|
258
|
+
except KeyError:
|
|
259
|
+
self.log.warning('Vault config %s fetched but does not have required key "value"', key)
|
|
260
|
+
return None
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: apache-airflow-providers-hashicorp
|
|
3
|
-
Version: 4.3
|
|
3
|
+
Version: 4.4.3
|
|
4
4
|
Summary: Provider package apache-airflow-providers-hashicorp for Apache Airflow
|
|
5
5
|
Keywords: airflow-provider,hashicorp,airflow,integration
|
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
7
7
|
Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
|
|
8
8
|
Requires-Python: >=3.10
|
|
9
9
|
Description-Content-Type: text/x-rst
|
|
10
|
+
License-Expression: Apache-2.0
|
|
10
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
11
12
|
Classifier: Environment :: Console
|
|
12
13
|
Classifier: Environment :: Web Environment
|
|
@@ -14,20 +15,21 @@ Classifier: Intended Audience :: Developers
|
|
|
14
15
|
Classifier: Intended Audience :: System Administrators
|
|
15
16
|
Classifier: Framework :: Apache Airflow
|
|
16
17
|
Classifier: Framework :: Apache Airflow :: Provider
|
|
17
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.10
|
|
19
19
|
Classifier: Programming Language :: Python :: 3.11
|
|
20
20
|
Classifier: Programming Language :: Python :: 3.12
|
|
21
21
|
Classifier: Programming Language :: Python :: 3.13
|
|
22
22
|
Classifier: Topic :: System :: Monitoring
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
License-File: LICENSE
|
|
24
|
+
License-File: NOTICE
|
|
25
|
+
Requires-Dist: apache-airflow>=2.11.0
|
|
26
|
+
Requires-Dist: apache-airflow-providers-common-compat>=1.8.0
|
|
25
27
|
Requires-Dist: hvac>=1.1.0
|
|
26
|
-
Requires-Dist: boto3>=1.
|
|
28
|
+
Requires-Dist: boto3>=1.37.2 ; extra == "boto3"
|
|
27
29
|
Requires-Dist: apache-airflow-providers-google ; extra == "google"
|
|
28
30
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
29
|
-
Project-URL: Changelog, https://airflow.
|
|
30
|
-
Project-URL: Documentation, https://airflow.
|
|
31
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.4.3/changelog.html
|
|
32
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.4.3
|
|
31
33
|
Project-URL: Mastodon, https://fosstodon.org/@airflow
|
|
32
34
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
33
35
|
Project-URL: Source Code, https://github.com/apache/airflow
|
|
@@ -60,7 +62,7 @@ Provides-Extra: google
|
|
|
60
62
|
|
|
61
63
|
Package ``apache-airflow-providers-hashicorp``
|
|
62
64
|
|
|
63
|
-
Release: ``4.
|
|
65
|
+
Release: ``4.4.3``
|
|
64
66
|
|
|
65
67
|
|
|
66
68
|
Hashicorp including `Hashicorp Vault <https://www.vaultproject.io/>`__
|
|
@@ -73,7 +75,7 @@ This is a provider package for ``hashicorp`` provider. All classes for this prov
|
|
|
73
75
|
are in ``airflow.providers.hashicorp`` python package.
|
|
74
76
|
|
|
75
77
|
You can find package information and changelog for the provider
|
|
76
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.
|
|
78
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.4.3/>`_.
|
|
77
79
|
|
|
78
80
|
Installation
|
|
79
81
|
------------
|
|
@@ -90,7 +92,7 @@ Requirements
|
|
|
90
92
|
========================================== ==================
|
|
91
93
|
PIP package Version required
|
|
92
94
|
========================================== ==================
|
|
93
|
-
``apache-airflow`` ``>=2.
|
|
95
|
+
``apache-airflow`` ``>=2.11.0``
|
|
94
96
|
``apache-airflow-providers-common-compat`` ``>=1.8.0``
|
|
95
97
|
``hvac`` ``>=1.1.0``
|
|
96
98
|
========================================== ==================
|
|
@@ -121,10 +123,10 @@ Optional dependencies
|
|
|
121
123
|
========== ===================================
|
|
122
124
|
Extra Dependencies
|
|
123
125
|
========== ===================================
|
|
124
|
-
``boto3`` ``boto3>=1.
|
|
126
|
+
``boto3`` ``boto3>=1.37.2``
|
|
125
127
|
``google`` ``apache-airflow-providers-google``
|
|
126
128
|
========== ===================================
|
|
127
129
|
|
|
128
130
|
The changelog for the provider package can be found in the
|
|
129
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.
|
|
131
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.4.3/changelog.html>`_.
|
|
130
132
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
airflow/providers/hashicorp/__init__.py,sha256=KyjEVeD4yi3NDSMd5h-y6qYmp-rHhgl80HkS5-7oeag,1498
|
|
2
|
+
airflow/providers/hashicorp/get_provider_info.py,sha256=AFQ7VdRDobAK4-p5A0R9kv4vseR3xtxm7HASrLHThG8,2038
|
|
3
|
+
airflow/providers/hashicorp/version_compat.py,sha256=NMlSRFNSPBEq8-HTJEeIest-4a3o1kxJEIR3Wv69yBE,1285
|
|
4
|
+
airflow/providers/hashicorp/_internal_client/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
5
|
+
airflow/providers/hashicorp/_internal_client/vault_client.py,sha256=2WI92MyEG-8ctwhUtZLFqAfahcX2qXZn34oW8q4THNg,24838
|
|
6
|
+
airflow/providers/hashicorp/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
7
|
+
airflow/providers/hashicorp/hooks/vault.py,sha256=xwSg_zM-mCSwqQR64U3wm3_jqKPttx04Ze_OjCTYM5s,18089
|
|
8
|
+
airflow/providers/hashicorp/secrets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
9
|
+
airflow/providers/hashicorp/secrets/vault.py,sha256=LPnj5q0dOlLhH-XfUR_W5NDHXFk59ccmIC4Nsmg8PgA,11914
|
|
10
|
+
apache_airflow_providers_hashicorp-4.4.3.dist-info/entry_points.txt,sha256=M338G3KvFSRu5IqEFm5Qheg_myVuQbsN_2EbAwcgqk4,105
|
|
11
|
+
apache_airflow_providers_hashicorp-4.4.3.dist-info/licenses/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
|
12
|
+
apache_airflow_providers_hashicorp-4.4.3.dist-info/licenses/NOTICE,sha256=_cWHznIoUSbLCY_KfmKqetlKlsoH0c2VBjmZjElAzuc,168
|
|
13
|
+
apache_airflow_providers_hashicorp-4.4.3.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
14
|
+
apache_airflow_providers_hashicorp-4.4.3.dist-info/METADATA,sha256=EV7CmvlvhVvTbC5-hBctcWL9KgZfxg1kffZBZtFQfhQ,5829
|
|
15
|
+
apache_airflow_providers_hashicorp-4.4.3.dist-info/RECORD,,
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
airflow/providers/hashicorp/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
|
|
2
|
-
airflow/providers/hashicorp/__init__.py,sha256=S6-Lf-NCxMqVPiZU-ieMUWXJ1QOhYXw-pW4Jgt3xFek,1498
|
|
3
|
-
airflow/providers/hashicorp/get_provider_info.py,sha256=AFQ7VdRDobAK4-p5A0R9kv4vseR3xtxm7HASrLHThG8,2038
|
|
4
|
-
airflow/providers/hashicorp/version_compat.py,sha256=NMlSRFNSPBEq8-HTJEeIest-4a3o1kxJEIR3Wv69yBE,1285
|
|
5
|
-
airflow/providers/hashicorp/_internal_client/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
6
|
-
airflow/providers/hashicorp/_internal_client/vault_client.py,sha256=9kcavdjUL_SLE7gUidin01MBHC5QBnY8QChTjaIy1tY,24683
|
|
7
|
-
airflow/providers/hashicorp/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
8
|
-
airflow/providers/hashicorp/hooks/vault.py,sha256=xwSg_zM-mCSwqQR64U3wm3_jqKPttx04Ze_OjCTYM5s,18089
|
|
9
|
-
airflow/providers/hashicorp/secrets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
|
|
10
|
-
airflow/providers/hashicorp/secrets/vault.py,sha256=GqiIIbA4dedrr1yHv1q0eVpqT5u9TL8oUynL76tYurQ,11378
|
|
11
|
-
apache_airflow_providers_hashicorp-4.3.3rc1.dist-info/entry_points.txt,sha256=M338G3KvFSRu5IqEFm5Qheg_myVuQbsN_2EbAwcgqk4,105
|
|
12
|
-
apache_airflow_providers_hashicorp-4.3.3rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
|
|
13
|
-
apache_airflow_providers_hashicorp-4.3.3rc1.dist-info/METADATA,sha256=mfUdwAih3qAfdWYyCNzrVZ099CNkBwq-gyGTwkm5700,5841
|
|
14
|
-
apache_airflow_providers_hashicorp-4.3.3rc1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{airflow/providers/hashicorp → apache_airflow_providers_hashicorp-4.4.3.dist-info/licenses}/LICENSE
RENAMED
|
File without changes
|