apache-airflow-providers-hashicorp 3.4.1rc1__tar.gz → 3.5.0rc1__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.
- apache-airflow-providers-hashicorp-3.5.0rc1/PKG-INFO +129 -0
- apache-airflow-providers-hashicorp-3.5.0rc1/README.rst +94 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/__init__.py +5 -3
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/_internal_client/vault_client.py +27 -10
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/get_provider_info.py +4 -1
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/hooks/vault.py +6 -4
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/secrets/vault.py +3 -2
- apache-airflow-providers-hashicorp-3.5.0rc1/apache_airflow_providers_hashicorp.egg-info/PKG-INFO +129 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/apache_airflow_providers_hashicorp.egg-info/requires.txt +1 -1
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/pyproject.toml +53 -40
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/setup.cfg +3 -2
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/setup.py +1 -1
- apache-airflow-providers-hashicorp-3.4.1rc1/PKG-INFO +0 -398
- apache-airflow-providers-hashicorp-3.4.1rc1/README.rst +0 -364
- apache-airflow-providers-hashicorp-3.4.1rc1/apache_airflow_providers_hashicorp.egg-info/PKG-INFO +0 -398
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/LICENSE +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/MANIFEST.in +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/NOTICE +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/_internal_client/__init__.py +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/hooks/__init__.py +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/airflow/providers/hashicorp/secrets/__init__.py +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/apache_airflow_providers_hashicorp.egg-info/SOURCES.txt +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/apache_airflow_providers_hashicorp.egg-info/dependency_links.txt +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/apache_airflow_providers_hashicorp.egg-info/entry_points.txt +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/apache_airflow_providers_hashicorp.egg-info/not-zip-safe +0 -0
- {apache-airflow-providers-hashicorp-3.4.1rc1 → apache-airflow-providers-hashicorp-3.5.0rc1}/apache_airflow_providers_hashicorp.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: apache-airflow-providers-hashicorp
|
|
3
|
+
Version: 3.5.0rc1
|
|
4
|
+
Summary: Provider for Apache Airflow. Implements apache-airflow-providers-hashicorp package
|
|
5
|
+
Home-page: https://airflow.apache.org/
|
|
6
|
+
Download-URL: https://archive.apache.org/dist/airflow/providers
|
|
7
|
+
Author: Apache Software Foundation
|
|
8
|
+
Author-email: dev@airflow.apache.org
|
|
9
|
+
License: Apache License 2.0
|
|
10
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/
|
|
11
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/changelog.html
|
|
12
|
+
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
13
|
+
Project-URL: Source Code, https://github.com/apache/airflow
|
|
14
|
+
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
15
|
+
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
16
|
+
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
17
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
18
|
+
Classifier: Environment :: Console
|
|
19
|
+
Classifier: Environment :: Web Environment
|
|
20
|
+
Classifier: Intended Audience :: Developers
|
|
21
|
+
Classifier: Intended Audience :: System Administrators
|
|
22
|
+
Classifier: Framework :: Apache Airflow
|
|
23
|
+
Classifier: Framework :: Apache Airflow :: Provider
|
|
24
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
29
|
+
Classifier: Topic :: System :: Monitoring
|
|
30
|
+
Requires-Python: ~=3.8
|
|
31
|
+
Description-Content-Type: text/x-rst
|
|
32
|
+
Provides-Extra: google
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
License-File: NOTICE
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
38
|
+
or more contributor license agreements. See the NOTICE file
|
|
39
|
+
distributed with this work for additional information
|
|
40
|
+
regarding copyright ownership. The ASF licenses this file
|
|
41
|
+
to you under the Apache License, Version 2.0 (the
|
|
42
|
+
"License"); you may not use this file except in compliance
|
|
43
|
+
with the License. You may obtain a copy of the License at
|
|
44
|
+
|
|
45
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
+
|
|
47
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
48
|
+
software distributed under the License is distributed on an
|
|
49
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
50
|
+
KIND, either express or implied. See the License for the
|
|
51
|
+
specific language governing permissions and limitations
|
|
52
|
+
under the License.
|
|
53
|
+
|
|
54
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
55
|
+
or more contributor license agreements. See the NOTICE file
|
|
56
|
+
distributed with this work for additional information
|
|
57
|
+
regarding copyright ownership. The ASF licenses this file
|
|
58
|
+
to you under the Apache License, Version 2.0 (the
|
|
59
|
+
"License"); you may not use this file except in compliance
|
|
60
|
+
with the License. You may obtain a copy of the License at
|
|
61
|
+
|
|
62
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
63
|
+
|
|
64
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
65
|
+
software distributed under the License is distributed on an
|
|
66
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
67
|
+
KIND, either express or implied. See the License for the
|
|
68
|
+
specific language governing permissions and limitations
|
|
69
|
+
under the License.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
Package ``apache-airflow-providers-hashicorp``
|
|
73
|
+
|
|
74
|
+
Release: ``3.5.0rc1``
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Hashicorp including `Hashicorp Vault <https://www.vaultproject.io/>`__
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Provider package
|
|
81
|
+
----------------
|
|
82
|
+
|
|
83
|
+
This is a provider package for ``hashicorp`` provider. All classes for this provider package
|
|
84
|
+
are in ``airflow.providers.hashicorp`` python package.
|
|
85
|
+
|
|
86
|
+
You can find package information and changelog for the provider
|
|
87
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/>`_.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
Installation
|
|
91
|
+
------------
|
|
92
|
+
|
|
93
|
+
You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
|
|
94
|
+
for the minimum Airflow version supported) via
|
|
95
|
+
``pip install apache-airflow-providers-hashicorp``
|
|
96
|
+
|
|
97
|
+
The package supports the following python versions: 3.8,3.9,3.10,3.11
|
|
98
|
+
|
|
99
|
+
Requirements
|
|
100
|
+
------------
|
|
101
|
+
|
|
102
|
+
================== ==================
|
|
103
|
+
PIP package Version required
|
|
104
|
+
================== ==================
|
|
105
|
+
``apache-airflow`` ``>=2.5.0``
|
|
106
|
+
``hvac`` ``>=0.10``
|
|
107
|
+
================== ==================
|
|
108
|
+
|
|
109
|
+
Cross provider package dependencies
|
|
110
|
+
-----------------------------------
|
|
111
|
+
|
|
112
|
+
Those are dependencies that might be needed in order to use all the features of the package.
|
|
113
|
+
You need to install the specified provider packages in order to use them.
|
|
114
|
+
|
|
115
|
+
You can install such cross-provider dependencies when installing from PyPI. For example:
|
|
116
|
+
|
|
117
|
+
.. code-block:: bash
|
|
118
|
+
|
|
119
|
+
pip install apache-airflow-providers-hashicorp[google]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
==================================================================================================== ==========
|
|
123
|
+
Dependent package Extra
|
|
124
|
+
==================================================================================================== ==========
|
|
125
|
+
`apache-airflow-providers-google <https://airflow.apache.org/docs/apache-airflow-providers-google>`_ ``google``
|
|
126
|
+
==================================================================================================== ==========
|
|
127
|
+
|
|
128
|
+
The changelog for the provider package can be found in the
|
|
129
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/changelog.html>`_.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
|
|
2
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
3
|
+
or more contributor license agreements. See the NOTICE file
|
|
4
|
+
distributed with this work for additional information
|
|
5
|
+
regarding copyright ownership. The ASF licenses this file
|
|
6
|
+
to you under the Apache License, Version 2.0 (the
|
|
7
|
+
"License"); you may not use this file except in compliance
|
|
8
|
+
with the License. You may obtain a copy of the License at
|
|
9
|
+
|
|
10
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
|
|
12
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
13
|
+
software distributed under the License is distributed on an
|
|
14
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
15
|
+
KIND, either express or implied. See the License for the
|
|
16
|
+
specific language governing permissions and limitations
|
|
17
|
+
under the License.
|
|
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
|
+
|
|
37
|
+
Package ``apache-airflow-providers-hashicorp``
|
|
38
|
+
|
|
39
|
+
Release: ``3.5.0rc1``
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
Hashicorp including `Hashicorp Vault <https://www.vaultproject.io/>`__
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
Provider package
|
|
46
|
+
----------------
|
|
47
|
+
|
|
48
|
+
This is a provider package for ``hashicorp`` provider. All classes for this provider package
|
|
49
|
+
are in ``airflow.providers.hashicorp`` python package.
|
|
50
|
+
|
|
51
|
+
You can find package information and changelog for the provider
|
|
52
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/>`_.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
Installation
|
|
56
|
+
------------
|
|
57
|
+
|
|
58
|
+
You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
|
|
59
|
+
for the minimum Airflow version supported) via
|
|
60
|
+
``pip install apache-airflow-providers-hashicorp``
|
|
61
|
+
|
|
62
|
+
The package supports the following python versions: 3.8,3.9,3.10,3.11
|
|
63
|
+
|
|
64
|
+
Requirements
|
|
65
|
+
------------
|
|
66
|
+
|
|
67
|
+
================== ==================
|
|
68
|
+
PIP package Version required
|
|
69
|
+
================== ==================
|
|
70
|
+
``apache-airflow`` ``>=2.5.0``
|
|
71
|
+
``hvac`` ``>=0.10``
|
|
72
|
+
================== ==================
|
|
73
|
+
|
|
74
|
+
Cross provider package dependencies
|
|
75
|
+
-----------------------------------
|
|
76
|
+
|
|
77
|
+
Those are dependencies that might be needed in order to use all the features of the package.
|
|
78
|
+
You need to install the specified provider packages in order to use them.
|
|
79
|
+
|
|
80
|
+
You can install such cross-provider dependencies when installing from PyPI. For example:
|
|
81
|
+
|
|
82
|
+
.. code-block:: bash
|
|
83
|
+
|
|
84
|
+
pip install apache-airflow-providers-hashicorp[google]
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
==================================================================================================== ==========
|
|
88
|
+
Dependent package Extra
|
|
89
|
+
==================================================================================================== ==========
|
|
90
|
+
`apache-airflow-providers-google <https://airflow.apache.org/docs/apache-airflow-providers-google>`_ ``google``
|
|
91
|
+
==================================================================================================== ==========
|
|
92
|
+
|
|
93
|
+
The changelog for the provider package can be found in the
|
|
94
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/changelog.html>`_.
|
|
@@ -28,14 +28,16 @@ import packaging.version
|
|
|
28
28
|
|
|
29
29
|
__all__ = ["__version__"]
|
|
30
30
|
|
|
31
|
-
__version__ = "3.
|
|
31
|
+
__version__ = "3.5.0"
|
|
32
32
|
|
|
33
33
|
try:
|
|
34
34
|
from airflow import __version__ as airflow_version
|
|
35
35
|
except ImportError:
|
|
36
36
|
from airflow.version import version as airflow_version
|
|
37
37
|
|
|
38
|
-
if packaging.version.parse(airflow_version) < packaging.version.parse(
|
|
38
|
+
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
|
39
|
+
"2.5.0"
|
|
40
|
+
):
|
|
39
41
|
raise RuntimeError(
|
|
40
|
-
f"The package `apache-airflow-providers-hashicorp:{__version__}` requires Apache Airflow 2.
|
|
42
|
+
f"The package `apache-airflow-providers-hashicorp:{__version__}` requires Apache Airflow 2.5.0+" # NOQA: E501
|
|
41
43
|
)
|
|
@@ -21,7 +21,9 @@ from functools import cached_property
|
|
|
21
21
|
import hvac
|
|
22
22
|
from hvac.api.auth_methods import Kubernetes
|
|
23
23
|
from hvac.exceptions import InvalidPath, VaultError
|
|
24
|
-
from requests import Response
|
|
24
|
+
from requests import Response, Session
|
|
25
|
+
from requests.adapters import HTTPAdapter
|
|
26
|
+
from urllib3.util import Retry
|
|
25
27
|
|
|
26
28
|
from airflow.utils.log.logging_mixin import LoggingMixin
|
|
27
29
|
|
|
@@ -46,10 +48,12 @@ VALID_AUTH_TYPES: list[str] = [
|
|
|
46
48
|
|
|
47
49
|
class _VaultClient(LoggingMixin):
|
|
48
50
|
"""
|
|
49
|
-
Retrieves Authenticated client from Hashicorp Vault.
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
Retrieves Authenticated client from Hashicorp Vault.
|
|
52
|
+
|
|
53
|
+
This is purely internal class promoting authentication code reuse between the Hook and the
|
|
54
|
+
SecretBackend, it should not be used directly in Airflow DAGs. Use VaultBackend for backend
|
|
55
|
+
integration and Hook in case you want to communicate with VaultHook using standard Airflow
|
|
56
|
+
Connection definition.
|
|
53
57
|
|
|
54
58
|
:param url: Base URL for the Vault instance being addressed.
|
|
55
59
|
:param auth_type: Authentication Type for Vault. Default is ``token``. Available values are in
|
|
@@ -143,7 +147,7 @@ class _VaultClient(LoggingMixin):
|
|
|
143
147
|
if not radius_secret:
|
|
144
148
|
raise VaultError("The 'radius' authentication type requires 'radius_secret'")
|
|
145
149
|
|
|
146
|
-
self.kv_engine_version = kv_engine_version
|
|
150
|
+
self.kv_engine_version = kv_engine_version or 2
|
|
147
151
|
self.url = url
|
|
148
152
|
self.auth_type = auth_type
|
|
149
153
|
self.kwargs = kwargs
|
|
@@ -170,12 +174,9 @@ class _VaultClient(LoggingMixin):
|
|
|
170
174
|
@property
|
|
171
175
|
def client(self):
|
|
172
176
|
"""
|
|
173
|
-
|
|
174
|
-
it is still authenticated to Vault, and invalidates the cache if this
|
|
175
|
-
is not the case.
|
|
177
|
+
Checks that it is still authenticated to Vault and invalidates the cache if this is not the case.
|
|
176
178
|
|
|
177
179
|
:return: Vault Client
|
|
178
|
-
|
|
179
180
|
"""
|
|
180
181
|
if not self._client.is_authenticated():
|
|
181
182
|
# Invalidate the cache:
|
|
@@ -191,6 +192,22 @@ class _VaultClient(LoggingMixin):
|
|
|
191
192
|
:return: Vault Client
|
|
192
193
|
|
|
193
194
|
"""
|
|
195
|
+
if "session" not in self.kwargs:
|
|
196
|
+
# If no session object provide one with retry as per hvac documentation:
|
|
197
|
+
# https://hvac.readthedocs.io/en/stable/advanced_usage.html#retrying-failed-requests
|
|
198
|
+
adapter = HTTPAdapter(
|
|
199
|
+
max_retries=Retry(
|
|
200
|
+
total=3,
|
|
201
|
+
backoff_factor=0.1,
|
|
202
|
+
status_forcelist=[412, 500, 502, 503],
|
|
203
|
+
raise_on_status=False,
|
|
204
|
+
)
|
|
205
|
+
)
|
|
206
|
+
session = Session()
|
|
207
|
+
session.mount("http://", adapter)
|
|
208
|
+
session.mount("https://", adapter)
|
|
209
|
+
self.kwargs["session"] = session
|
|
210
|
+
|
|
194
211
|
_client = hvac.Client(url=self.url, **self.kwargs)
|
|
195
212
|
if self.auth_type == "approle":
|
|
196
213
|
self._auth_approle(_client)
|
|
@@ -29,6 +29,9 @@ def get_provider_info():
|
|
|
29
29
|
"description": "Hashicorp including `Hashicorp Vault <https://www.vaultproject.io/>`__\n",
|
|
30
30
|
"suspended": False,
|
|
31
31
|
"versions": [
|
|
32
|
+
"3.5.0",
|
|
33
|
+
"3.4.3",
|
|
34
|
+
"3.4.2",
|
|
32
35
|
"3.4.1",
|
|
33
36
|
"3.4.0",
|
|
34
37
|
"3.3.1",
|
|
@@ -48,7 +51,7 @@ def get_provider_info():
|
|
|
48
51
|
"1.0.1",
|
|
49
52
|
"1.0.0",
|
|
50
53
|
],
|
|
51
|
-
"dependencies": ["apache-airflow>=2.
|
|
54
|
+
"dependencies": ["apache-airflow>=2.5.0", "hvac>=0.10"],
|
|
52
55
|
"integrations": [
|
|
53
56
|
{
|
|
54
57
|
"integration-name": "Hashicorp Vault",
|
|
@@ -19,11 +19,9 @@ from __future__ import annotations
|
|
|
19
19
|
|
|
20
20
|
import json
|
|
21
21
|
import warnings
|
|
22
|
-
from typing import Any
|
|
22
|
+
from typing import TYPE_CHECKING, Any
|
|
23
23
|
|
|
24
|
-
import hvac
|
|
25
24
|
from hvac.exceptions import VaultError
|
|
26
|
-
from requests import Response
|
|
27
25
|
|
|
28
26
|
from airflow.exceptions import AirflowProviderDeprecationWarning
|
|
29
27
|
from airflow.hooks.base import BaseHook
|
|
@@ -34,6 +32,10 @@ from airflow.providers.hashicorp._internal_client.vault_client import (
|
|
|
34
32
|
)
|
|
35
33
|
from airflow.utils.helpers import merge_dicts
|
|
36
34
|
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
import hvac
|
|
37
|
+
from requests import Response
|
|
38
|
+
|
|
37
39
|
|
|
38
40
|
class VaultHook(BaseHook):
|
|
39
41
|
"""
|
|
@@ -49,7 +51,7 @@ class VaultHook(BaseHook):
|
|
|
49
51
|
The mount point should be placed as a path in the URL - similarly to Vault's URL schema:
|
|
50
52
|
This indicates the "path" the secret engine is mounted on. Default id not specified is "secret".
|
|
51
53
|
Note that this ``mount_point`` is not used for authentication if authentication is done via a
|
|
52
|
-
different engines. Each engine uses
|
|
54
|
+
different engines. Each engine uses its own engine-specific authentication mount_point.
|
|
53
55
|
|
|
54
56
|
The extras in the connection are named the same as the parameters ('kv_engine_version', 'auth_type', ...).
|
|
55
57
|
|
|
@@ -209,8 +209,9 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
|
|
|
209
209
|
|
|
210
210
|
def get_connection(self, conn_id: str) -> Connection | None:
|
|
211
211
|
"""
|
|
212
|
-
Get connection from Vault as secret.
|
|
213
|
-
|
|
212
|
+
Get connection from Vault as secret.
|
|
213
|
+
|
|
214
|
+
Prioritize conn_uri if exists, if not fall back to normal Connection creation.
|
|
214
215
|
|
|
215
216
|
:return: A Connection object constructed from Vault data
|
|
216
217
|
"""
|
apache-airflow-providers-hashicorp-3.5.0rc1/apache_airflow_providers_hashicorp.egg-info/PKG-INFO
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: apache-airflow-providers-hashicorp
|
|
3
|
+
Version: 3.5.0rc1
|
|
4
|
+
Summary: Provider for Apache Airflow. Implements apache-airflow-providers-hashicorp package
|
|
5
|
+
Home-page: https://airflow.apache.org/
|
|
6
|
+
Download-URL: https://archive.apache.org/dist/airflow/providers
|
|
7
|
+
Author: Apache Software Foundation
|
|
8
|
+
Author-email: dev@airflow.apache.org
|
|
9
|
+
License: Apache License 2.0
|
|
10
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/
|
|
11
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/changelog.html
|
|
12
|
+
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
|
13
|
+
Project-URL: Source Code, https://github.com/apache/airflow
|
|
14
|
+
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
|
15
|
+
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
|
16
|
+
Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
17
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
18
|
+
Classifier: Environment :: Console
|
|
19
|
+
Classifier: Environment :: Web Environment
|
|
20
|
+
Classifier: Intended Audience :: Developers
|
|
21
|
+
Classifier: Intended Audience :: System Administrators
|
|
22
|
+
Classifier: Framework :: Apache Airflow
|
|
23
|
+
Classifier: Framework :: Apache Airflow :: Provider
|
|
24
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
29
|
+
Classifier: Topic :: System :: Monitoring
|
|
30
|
+
Requires-Python: ~=3.8
|
|
31
|
+
Description-Content-Type: text/x-rst
|
|
32
|
+
Provides-Extra: google
|
|
33
|
+
License-File: LICENSE
|
|
34
|
+
License-File: NOTICE
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
38
|
+
or more contributor license agreements. See the NOTICE file
|
|
39
|
+
distributed with this work for additional information
|
|
40
|
+
regarding copyright ownership. The ASF licenses this file
|
|
41
|
+
to you under the Apache License, Version 2.0 (the
|
|
42
|
+
"License"); you may not use this file except in compliance
|
|
43
|
+
with the License. You may obtain a copy of the License at
|
|
44
|
+
|
|
45
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
46
|
+
|
|
47
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
48
|
+
software distributed under the License is distributed on an
|
|
49
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
50
|
+
KIND, either express or implied. See the License for the
|
|
51
|
+
specific language governing permissions and limitations
|
|
52
|
+
under the License.
|
|
53
|
+
|
|
54
|
+
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
55
|
+
or more contributor license agreements. See the NOTICE file
|
|
56
|
+
distributed with this work for additional information
|
|
57
|
+
regarding copyright ownership. The ASF licenses this file
|
|
58
|
+
to you under the Apache License, Version 2.0 (the
|
|
59
|
+
"License"); you may not use this file except in compliance
|
|
60
|
+
with the License. You may obtain a copy of the License at
|
|
61
|
+
|
|
62
|
+
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
63
|
+
|
|
64
|
+
.. Unless required by applicable law or agreed to in writing,
|
|
65
|
+
software distributed under the License is distributed on an
|
|
66
|
+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
67
|
+
KIND, either express or implied. See the License for the
|
|
68
|
+
specific language governing permissions and limitations
|
|
69
|
+
under the License.
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
Package ``apache-airflow-providers-hashicorp``
|
|
73
|
+
|
|
74
|
+
Release: ``3.5.0rc1``
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
Hashicorp including `Hashicorp Vault <https://www.vaultproject.io/>`__
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
Provider package
|
|
81
|
+
----------------
|
|
82
|
+
|
|
83
|
+
This is a provider package for ``hashicorp`` provider. All classes for this provider package
|
|
84
|
+
are in ``airflow.providers.hashicorp`` python package.
|
|
85
|
+
|
|
86
|
+
You can find package information and changelog for the provider
|
|
87
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/>`_.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
Installation
|
|
91
|
+
------------
|
|
92
|
+
|
|
93
|
+
You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
|
|
94
|
+
for the minimum Airflow version supported) via
|
|
95
|
+
``pip install apache-airflow-providers-hashicorp``
|
|
96
|
+
|
|
97
|
+
The package supports the following python versions: 3.8,3.9,3.10,3.11
|
|
98
|
+
|
|
99
|
+
Requirements
|
|
100
|
+
------------
|
|
101
|
+
|
|
102
|
+
================== ==================
|
|
103
|
+
PIP package Version required
|
|
104
|
+
================== ==================
|
|
105
|
+
``apache-airflow`` ``>=2.5.0``
|
|
106
|
+
``hvac`` ``>=0.10``
|
|
107
|
+
================== ==================
|
|
108
|
+
|
|
109
|
+
Cross provider package dependencies
|
|
110
|
+
-----------------------------------
|
|
111
|
+
|
|
112
|
+
Those are dependencies that might be needed in order to use all the features of the package.
|
|
113
|
+
You need to install the specified provider packages in order to use them.
|
|
114
|
+
|
|
115
|
+
You can install such cross-provider dependencies when installing from PyPI. For example:
|
|
116
|
+
|
|
117
|
+
.. code-block:: bash
|
|
118
|
+
|
|
119
|
+
pip install apache-airflow-providers-hashicorp[google]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
==================================================================================================== ==========
|
|
123
|
+
Dependent package Extra
|
|
124
|
+
==================================================================================================== ==========
|
|
125
|
+
`apache-airflow-providers-google <https://airflow.apache.org/docs/apache-airflow-providers-google>`_ ``google``
|
|
126
|
+
==================================================================================================== ==========
|
|
127
|
+
|
|
128
|
+
The changelog for the provider package can be found in the
|
|
129
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/3.5.0/changelog.html>`_.
|
|
@@ -16,20 +16,20 @@
|
|
|
16
16
|
# under the License.
|
|
17
17
|
[tool.black]
|
|
18
18
|
line-length = 110
|
|
19
|
-
target-version = ['
|
|
20
|
-
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
19
|
+
target-version = ['py38', 'py39', 'py310', 'py311']
|
|
20
|
+
|
|
21
|
+
# Editable installs are currently broken using setuptools 64.0.0 and above. The problem is tracked in
|
|
22
|
+
# https://github.com/pypa/setuptools/issues/3548. We're also discussing how we could potentially fix
|
|
23
|
+
# this problem on our end in issue https://github.com/apache/airflow/issues/30764. Until then we need
|
|
24
|
+
# to use one of the following workarounds locally for editable installs:
|
|
25
|
+
# 1) Pin setuptools <= 63.4.3 below in the [build-system] section.
|
|
26
|
+
# 2) Include your airflow source code directory in PYTHONPATH.
|
|
25
27
|
[build-system]
|
|
26
28
|
requires = ['setuptools==67.2.0']
|
|
27
29
|
build-backend = "setuptools.build_meta"
|
|
28
30
|
|
|
29
|
-
[project]
|
|
30
|
-
requires-python = ">=3.8"
|
|
31
|
-
|
|
32
31
|
[tool.ruff]
|
|
32
|
+
target-version = "py38"
|
|
33
33
|
typing-modules = ["airflow.typing_compat"]
|
|
34
34
|
line-length = 110
|
|
35
35
|
extend-exclude = [
|
|
@@ -39,7 +39,8 @@ extend-exclude = [
|
|
|
39
39
|
# The files generated by stubgen aren't 100% valid syntax it turns out, and we don't ship them, so we can
|
|
40
40
|
# ignore them in ruff
|
|
41
41
|
"airflow/providers/common/sql/*/*.pyi",
|
|
42
|
-
"airflow/migrations/versions/*.py"
|
|
42
|
+
"airflow/migrations/versions/*.py",
|
|
43
|
+
"tests/dags/test_imports.py",
|
|
43
44
|
]
|
|
44
45
|
|
|
45
46
|
extend-select = [
|
|
@@ -59,11 +60,13 @@ extend-select = [
|
|
|
59
60
|
"D402",
|
|
60
61
|
"D403",
|
|
61
62
|
"D412",
|
|
62
|
-
"D419"
|
|
63
|
+
"D419",
|
|
64
|
+
"TCH001", # typing-only-first-party-import
|
|
65
|
+
"TCH002", # typing-only-third-party-import
|
|
66
|
+
"TID251",
|
|
63
67
|
]
|
|
64
68
|
extend-ignore = [
|
|
65
69
|
"D203",
|
|
66
|
-
"D205",
|
|
67
70
|
"D212",
|
|
68
71
|
"D213",
|
|
69
72
|
"D214",
|
|
@@ -71,6 +74,8 @@ extend-ignore = [
|
|
|
71
74
|
"E731",
|
|
72
75
|
]
|
|
73
76
|
|
|
77
|
+
namespace-packages = ["airflow/providers"]
|
|
78
|
+
|
|
74
79
|
[tool.pytest.ini_options]
|
|
75
80
|
# * Disable `flaky` plugin for pytest. This plugin conflicts with `rerunfailures` because provide same marker.
|
|
76
81
|
# * Disable `nose` builtin plugin for pytest. This feature deprecated in 7.2 and will be removed in pytest>=8
|
|
@@ -97,53 +102,29 @@ filterwarnings = [
|
|
|
97
102
|
"ignore::DeprecationWarning:apispec.utils",
|
|
98
103
|
]
|
|
99
104
|
python_files = [
|
|
100
|
-
"*.py",
|
|
105
|
+
"test_*.py",
|
|
106
|
+
"example_*.py",
|
|
101
107
|
]
|
|
102
108
|
testpaths = [
|
|
103
109
|
"tests",
|
|
104
110
|
]
|
|
105
111
|
|
|
106
112
|
[tool.ruff.isort]
|
|
107
|
-
known-first-party = ["airflow", "airflow_breeze", "docker_tests", "docs", "kubernetes_tests", "tests"]
|
|
108
113
|
required-imports = ["from __future__ import annotations"]
|
|
109
114
|
combine-as-imports = true
|
|
110
115
|
|
|
111
|
-
# TODO: for now, https://github.com/charliermarsh/ruff/issues/1817
|
|
112
|
-
known-third-party = [
|
|
113
|
-
"asana",
|
|
114
|
-
"atlassian",
|
|
115
|
-
"celery",
|
|
116
|
-
"cloudant",
|
|
117
|
-
"databricks",
|
|
118
|
-
"datadog",
|
|
119
|
-
"docker",
|
|
120
|
-
"elasticsearch",
|
|
121
|
-
"github",
|
|
122
|
-
"google",
|
|
123
|
-
"grpc",
|
|
124
|
-
"jenkins",
|
|
125
|
-
"mysql",
|
|
126
|
-
"neo4j",
|
|
127
|
-
"papermill",
|
|
128
|
-
"redis",
|
|
129
|
-
"sendgrid",
|
|
130
|
-
"snowflake",
|
|
131
|
-
"telegram",
|
|
132
|
-
"trino",
|
|
133
|
-
]
|
|
134
|
-
|
|
135
116
|
[tool.ruff.per-file-ignores]
|
|
136
117
|
"airflow/models/__init__.py" = ["F401"]
|
|
137
118
|
"airflow/models/sqla_models.py" = ["F401"]
|
|
138
119
|
|
|
139
|
-
|
|
140
120
|
# The test_python.py is needed because adding __future__.annotations breaks runtime checks that are
|
|
141
121
|
# needed for the test to work
|
|
142
122
|
"tests/decorators/test_python.py" = ["I002"]
|
|
143
123
|
|
|
144
124
|
# The Pydantic representations of SqlAlchemy Models are not parsed well with Pydantic
|
|
145
125
|
# when __future__.annotations is used so we need to skip them from upgrading
|
|
146
|
-
|
|
126
|
+
# Pydantic also require models to be imported during execution
|
|
127
|
+
"airflow/serialization/pydantic/*.py" = ["I002", "UP007", "TCH001"]
|
|
147
128
|
|
|
148
129
|
# Ignore pydoc style from these
|
|
149
130
|
"*.pyi" = ["D"]
|
|
@@ -164,3 +145,35 @@ known-third-party = [
|
|
|
164
145
|
"airflow/security/utils.py" = ["E402"]
|
|
165
146
|
"tests/providers/elasticsearch/log/elasticmock/__init__.py" = ["E402"]
|
|
166
147
|
"tests/providers/elasticsearch/log/elasticmock/utilities/__init__.py" = ["E402"]
|
|
148
|
+
|
|
149
|
+
[tool.ruff.flake8-tidy-imports.banned-api]
|
|
150
|
+
"airflow.AirflowException".msg = "Use airflow.exceptions.AirflowException instead."
|
|
151
|
+
"airflow.Dataset".msg = "Use airflow.datasets.Dataset instead."
|
|
152
|
+
|
|
153
|
+
[tool.coverage.run]
|
|
154
|
+
branch = true
|
|
155
|
+
relative_files = true
|
|
156
|
+
source = ["airflow"]
|
|
157
|
+
omit = [
|
|
158
|
+
"airflow/_vendor/**",
|
|
159
|
+
"airflow/contrib/**",
|
|
160
|
+
"airflow/example_dags/**",
|
|
161
|
+
"airflow/migrations/**",
|
|
162
|
+
"airflow/providers/**/example_dags/**",
|
|
163
|
+
"airflow/www/node_modules/**",
|
|
164
|
+
"airflow/providers/google/ads/_vendor/**",
|
|
165
|
+
]
|
|
166
|
+
|
|
167
|
+
[tool.coverage.report]
|
|
168
|
+
skip_empty = true
|
|
169
|
+
exclude_also = [
|
|
170
|
+
"def __repr__",
|
|
171
|
+
"raise AssertionError",
|
|
172
|
+
"raise NotImplementedError",
|
|
173
|
+
"if __name__ == .__main__.:",
|
|
174
|
+
"@(abc\\.)?abstractmethod",
|
|
175
|
+
"@(typing(_extensions)?\\.)?overload",
|
|
176
|
+
"if TYPE_CHECKING:"
|
|
177
|
+
]
|
|
178
|
+
[tool.ruff.flake8-type-checking]
|
|
179
|
+
exempt-modules = ["typing", "typing_extensions"]
|