dataflow-core 2.1.7__py3-none-any.whl → 2.1.8__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.
Potentially problematic release.
This version of dataflow-core might be problematic. Click here for more details.
- authenticator/dataflowhubauthenticator.py +19 -16
- dataflow/dataflow.py +158 -34
- dataflow/schemas/__init__.py +0 -0
- dataflow/schemas/connection.py +84 -0
- dataflow/schemas/git_ssh.py +50 -0
- dataflow/schemas/secret.py +44 -0
- dataflow/secrets_manager/__init__.py +13 -0
- dataflow/secrets_manager/factory.py +59 -0
- dataflow/secrets_manager/interface.py +22 -0
- dataflow/secrets_manager/providers/__init__.py +0 -0
- dataflow/secrets_manager/providers/aws_manager.py +164 -0
- dataflow/secrets_manager/providers/azure_manager.py +185 -0
- dataflow/secrets_manager/service.py +156 -0
- dataflow/utils/exceptions.py +112 -0
- {dataflow_core-2.1.7.dist-info → dataflow_core-2.1.8.dist-info}/METADATA +3 -1
- {dataflow_core-2.1.7.dist-info → dataflow_core-2.1.8.dist-info}/RECORD +19 -9
- dataflow/utils/aws_secrets_manager.py +0 -57
- dataflow/utils/json_handler.py +0 -33
- {dataflow_core-2.1.7.dist-info → dataflow_core-2.1.8.dist-info}/WHEEL +0 -0
- {dataflow_core-2.1.7.dist-info → dataflow_core-2.1.8.dist-info}/entry_points.txt +0 -0
- {dataflow_core-2.1.7.dist-info → dataflow_core-2.1.8.dist-info}/top_level.txt +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
authenticator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
authenticator/dataflowairflowauthenticator.py,sha256=gEdCiL2yJQ7lYvAwbrjcAkccVMfehoMJldw9eU7cc2s,2243
|
|
3
|
-
authenticator/dataflowhubauthenticator.py,sha256=
|
|
3
|
+
authenticator/dataflowhubauthenticator.py,sha256=WEIYk8T8kvXfyqPMnV83nzD4sSDwYEWLBnzcqZtTg1E,13473
|
|
4
4
|
authenticator/dataflowsupersetauthenticator.py,sha256=NkAmDaIc-ui-qEolu4xz_UY7P_2g8111hwNjPvAOW1Q,2839
|
|
5
5
|
dataflow/__init__.py,sha256=WTRg8HMpMWSgxYJ9ZGVldx4k07fAbta3mBmZ1hG9mWE,30
|
|
6
6
|
dataflow/configuration.py,sha256=7To6XwH1eESiYp39eqPcswXWwrdBUdPF6xN6WnazOF0,663
|
|
7
7
|
dataflow/database_manager.py,sha256=tJHMuOZ9Muskrh9t4uLRlTuFU0VkHAzoHlGP5DORIC4,899
|
|
8
|
-
dataflow/dataflow.py,sha256
|
|
8
|
+
dataflow/dataflow.py,sha256=Ixj4xSmpG94ByedfYJpzD4fCcmO5jXLxYpkJ4shoDeY,13331
|
|
9
9
|
dataflow/db.py,sha256=73ojGqpCTRVTlPszD73Ozhjih_BI2KTHmazqxxL6iWk,3780
|
|
10
10
|
dataflow/environment.py,sha256=05F-dBRyZu2mr26vuiuJU13pfgtRpA9yW69bk83HGUw,27239
|
|
11
11
|
dataflow/models/__init__.py,sha256=WnlLd-0T3HYtJloDms1a58lN66WzBIbBSTReDXD6HaQ,892
|
|
@@ -30,16 +30,26 @@ dataflow/models/user.py,sha256=qFvkU6hZQzv-QWCC8nDKonnpl2Z2YEqMni5iUVQpMB0,1041
|
|
|
30
30
|
dataflow/models/user_environment.py,sha256=yI9NutULcLiwlycuEin6ROe6o1Sjdv_sgw2MEkJFeYg,568
|
|
31
31
|
dataflow/models/user_team.py,sha256=r_fmKvf6JuGgiiI9TXWjVG2QZ3WOvDrOwYWVQ3r8oWo,659
|
|
32
32
|
dataflow/models/variables.py,sha256=Sinvv3zFYni5i_GrL69cVfhCh4tOOaIHiEzWYRJ-i10,1132
|
|
33
|
+
dataflow/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
34
|
+
dataflow/schemas/connection.py,sha256=1bKTSEPW1QwcFQe35QCIr-S5DTMr34WJCjSKhxMpPek,2449
|
|
35
|
+
dataflow/schemas/git_ssh.py,sha256=mJdEbUe2uQNXGpj2XnLZhTgqiISwH0Xw2O0utW1Bp9Y,1333
|
|
36
|
+
dataflow/schemas/secret.py,sha256=dAN_2IBTjnjf4sT6cyPVd_Zcdaw8s_EMG4aodMoCwXU,1165
|
|
33
37
|
dataflow/scripts/clone_environment.sh,sha256=xWJBw9z1W1rztrzLXYro3UtEdFuBSqNrB83y45zqFfE,487
|
|
34
38
|
dataflow/scripts/create_environment.sh,sha256=3FHgNplJuEZvyTsLqlCJNX9oyfXgsfqn80VZk2xtvso,828
|
|
35
39
|
dataflow/scripts/update_environment.sh,sha256=2dtn2xlNi6frpig-sqlGE1_IKRbbkqYOCpf_qyMKKII,992
|
|
40
|
+
dataflow/secrets_manager/__init__.py,sha256=idGqIDtYl0De2WIK9Obl-N7SDPSYtVM0D-wXfZjCiy4,559
|
|
41
|
+
dataflow/secrets_manager/factory.py,sha256=k1sIyXBKtas1upWJpq8Mks2d8kjLAHU7CFvjeuMXXxs,2160
|
|
42
|
+
dataflow/secrets_manager/interface.py,sha256=HhrKpQrprWIbDsVfU_qc59OXmSIuHXv106OXv6-Epqc,506
|
|
43
|
+
dataflow/secrets_manager/service.py,sha256=SSWgTXJTAwVPqMIc76cB2hR6nghNVOoMpIN9M0i7Su0,7241
|
|
44
|
+
dataflow/secrets_manager/providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
+
dataflow/secrets_manager/providers/aws_manager.py,sha256=16peXyKeuAjv2RVTMUjrzArPYENK9Zu7jREWVgMfScA,8671
|
|
46
|
+
dataflow/secrets_manager/providers/azure_manager.py,sha256=sWOz-7ALnLt6vyM3lt14GBpzpmDnlH3hkdqtuApqkgU,9430
|
|
36
47
|
dataflow/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
37
|
-
dataflow/utils/
|
|
48
|
+
dataflow/utils/exceptions.py,sha256=8GRFoYZ5dPGQckVm2znaHpPi0ZAs69fK-RGKukEsapk,4432
|
|
38
49
|
dataflow/utils/get_current_user.py,sha256=4nSO3SPVMZhW-MsIgxR3f9ZzrFaIZIuyrM6hvfyE7PQ,1202
|
|
39
|
-
dataflow/utils/json_handler.py,sha256=5_7WdypegRBDe2HSqBXyrJAdd92wsha8qRcmQvCj1TA,782
|
|
40
50
|
dataflow/utils/logger.py,sha256=7BFrOq5Oiqn8P4XZbgJzMP5O07d2fpdECbbfsjrUuHw,1213
|
|
41
|
-
dataflow_core-2.1.
|
|
42
|
-
dataflow_core-2.1.
|
|
43
|
-
dataflow_core-2.1.
|
|
44
|
-
dataflow_core-2.1.
|
|
45
|
-
dataflow_core-2.1.
|
|
51
|
+
dataflow_core-2.1.8.dist-info/METADATA,sha256=f7JqNJGVu3L1qea_GAEIsRDh3N4y-8lKrhcMhuvlZUs,369
|
|
52
|
+
dataflow_core-2.1.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
53
|
+
dataflow_core-2.1.8.dist-info/entry_points.txt,sha256=ppj_EIbYrJJwCPg1kfdsZk5q1N-Ejfis1neYrnjhO8o,117
|
|
54
|
+
dataflow_core-2.1.8.dist-info/top_level.txt,sha256=SZsUOpSCK9ntUy-3Tusxzf5A2e8ebwD8vouPb1dPt_8,23
|
|
55
|
+
dataflow_core-2.1.8.dist-info/RECORD,,
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import boto3
|
|
2
|
-
from botocore.exceptions import ClientError, EndpointConnectionError, NoCredentialsError
|
|
3
|
-
import json
|
|
4
|
-
from .json_handler import JsonHandler
|
|
5
|
-
|
|
6
|
-
class SecretsManagerClient:
|
|
7
|
-
"""
|
|
8
|
-
A class to interact with AWS Secrets Manager for managing secrets.
|
|
9
|
-
|
|
10
|
-
Attributes:
|
|
11
|
-
client: The Boto3 client for Secrets Manager.
|
|
12
|
-
json_handler: An instance of JsonHandler for handling JSON operations.
|
|
13
|
-
"""
|
|
14
|
-
def __init__(self):
|
|
15
|
-
self.json_handler = JsonHandler()
|
|
16
|
-
try:
|
|
17
|
-
self.client = boto3.client('secretsmanager')
|
|
18
|
-
except EndpointConnectionError as e:
|
|
19
|
-
self.logger.error(f"Failed to initialize SecretsManagerClient: {e}")
|
|
20
|
-
raise Exception(f"Failed to initialize SecretsManagerClient: Unable to connect to the endpoint. {e}")
|
|
21
|
-
except NoCredentialsError as e:
|
|
22
|
-
self.logger.error(f"Failed to initialize SecretsManagerClient: {e}")
|
|
23
|
-
raise Exception(f"Failed to initialize SecretsManagerClient: No AWS credentials found. {e}")
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
def get_secret_by_key(self, vault_path, user_name, conn_id: str, runtime, slug):
|
|
27
|
-
"""
|
|
28
|
-
Get information about a specific secret using a dynamically constructed vault path.
|
|
29
|
-
|
|
30
|
-
Args:
|
|
31
|
-
vault_path (str): The base vault path.
|
|
32
|
-
user_name (str): The user name.
|
|
33
|
-
conn_id (str): The key of the secret to retrieve.
|
|
34
|
-
runtime (str, optional): The runtime environment. Defaults to None.
|
|
35
|
-
slug (str, optional): The slug identifier. Defaults to None.
|
|
36
|
-
|
|
37
|
-
Returns:
|
|
38
|
-
str: Information about the secret in JSON format.
|
|
39
|
-
|
|
40
|
-
Raises:
|
|
41
|
-
Exception: If the operation fails.
|
|
42
|
-
"""
|
|
43
|
-
try:
|
|
44
|
-
if runtime and slug:
|
|
45
|
-
secret_name = f"{runtime}/{slug}/{vault_path}/{conn_id}"
|
|
46
|
-
else:
|
|
47
|
-
secret_name = f"{user_name}/{vault_path}/{conn_id}"
|
|
48
|
-
|
|
49
|
-
response = self.client.get_secret_value(SecretId=secret_name)
|
|
50
|
-
secret_data = json.loads(response.get('SecretString'))
|
|
51
|
-
|
|
52
|
-
return secret_data
|
|
53
|
-
except ClientError as e:
|
|
54
|
-
if e.response['Error']['Code'] == 'ResourceNotFoundException':
|
|
55
|
-
raise Exception(f"Secret named '{conn_id}' not found with path '{secret_name}'")
|
|
56
|
-
else:
|
|
57
|
-
raise Exception(f"Failed to get secret '{conn_id}': {e}")
|
dataflow/utils/json_handler.py
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import json
|
|
2
|
-
|
|
3
|
-
class JsonHandler:
|
|
4
|
-
"""
|
|
5
|
-
Helper class for handling JSON serialization and deserialization.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
def __init__(self):
|
|
9
|
-
pass
|
|
10
|
-
|
|
11
|
-
def dict_to_json(self, data_dict):
|
|
12
|
-
"""
|
|
13
|
-
Serialize a dictionary to JSON string.
|
|
14
|
-
|
|
15
|
-
Args:
|
|
16
|
-
data_dict (dict): The dictionary to serialize.
|
|
17
|
-
|
|
18
|
-
Returns:
|
|
19
|
-
str: The JSON string representation of the dictionary.
|
|
20
|
-
"""
|
|
21
|
-
return json.dumps(data_dict)
|
|
22
|
-
|
|
23
|
-
def json_to_dict(self, json_string):
|
|
24
|
-
"""
|
|
25
|
-
Deserialize a JSON string to dictionary.
|
|
26
|
-
|
|
27
|
-
Args:
|
|
28
|
-
json_string (str): The JSON string to deserialize.
|
|
29
|
-
|
|
30
|
-
Returns:
|
|
31
|
-
dict: The dictionary representation of the JSON string.
|
|
32
|
-
"""
|
|
33
|
-
return json.loads(json_string)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|