dataflow-core 2.1.17__tar.gz → 2.1.18rc1__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.
Potentially problematic release.
This version of dataflow-core might be problematic. Click here for more details.
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/PKG-INFO +1 -1
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/schemas/connection.py +5 -2
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/schemas/git_ssh.py +5 -2
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/schemas/secret.py +5 -2
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/service.py +8 -2
- dataflow_core-2.1.18rc1/dataflow/secrets_manager/utils.py +58 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/PKG-INFO +1 -1
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/SOURCES.txt +1 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/setup.py +1 -1
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/README.md +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/authenticator/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/authenticator/dataflowairflowauthenticator.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/authenticator/dataflowhubauthenticator.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/authenticator/dataflowsupersetauthenticator.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/configuration.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/database_manager.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/dataflow.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/db.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/environment.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/app_types.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/blacklist_library.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/connection.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/dataflow_zone.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/environment.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/environment_status.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/git_ssh.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/org_associations.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/organization.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/pinned_projects.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/pod_activity.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/pod_session_history.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/project_details.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/recent_project_studio.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/recent_projects.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/role.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/role_server.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/role_zone.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/server_config.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/session.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/team.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/user.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/user_team.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/models/variables.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/schemas/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/scripts/clone_environment.sh +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/scripts/create_environment.sh +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/scripts/update_environment.sh +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/factory.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/interface.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/aws_manager.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/azure_manager.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/gcp_manager.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/utils/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/utils/exceptions.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/utils/get_current_user.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/utils/logger.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/dependency_links.txt +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/entry_points.txt +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/requires.txt +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/top_level.txt +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dfmigration/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dfmigration/env.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dfmigration/versions/001_initial_baseline_migration.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dfmigration/versions/__init__.py +0 -0
- {dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/setup.cfg +0 -0
|
@@ -31,9 +31,12 @@ class ConnectionBase(BaseModel):
|
|
|
31
31
|
raise ValueError("Connection ID must be a string.")
|
|
32
32
|
if len(v) > 30:
|
|
33
33
|
raise ValueError("Connection ID must be at most 30 characters long.")
|
|
34
|
-
|
|
34
|
+
# Must start with letter, end with letter or digit
|
|
35
|
+
# Can contain letters, numbers, and underscores
|
|
36
|
+
if not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]|[A-Za-z]", v):
|
|
35
37
|
raise ValueError(
|
|
36
|
-
"Connection ID
|
|
38
|
+
"Connection ID must start with a letter, end with a letter or digit, "
|
|
39
|
+
"and contain only letters, numbers, and underscores (_)!"
|
|
37
40
|
)
|
|
38
41
|
return v
|
|
39
42
|
|
|
@@ -17,9 +17,12 @@ class SSHBase(BaseModel):
|
|
|
17
17
|
raise ValueError("SSH key name must be a string.")
|
|
18
18
|
if len(v) > 20:
|
|
19
19
|
raise ValueError("SSH key name must be at most 20 characters long.")
|
|
20
|
-
|
|
20
|
+
# Must start with letter, end with letter or digit
|
|
21
|
+
# Can contain letters, numbers, and underscores
|
|
22
|
+
if not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]|[A-Za-z]", v):
|
|
21
23
|
raise ValueError(
|
|
22
|
-
"SSH key name
|
|
24
|
+
"SSH key name must start with a letter, end with a letter or digit, "
|
|
25
|
+
"and contain only letters, numbers, and underscores (_)!"
|
|
23
26
|
)
|
|
24
27
|
return v
|
|
25
28
|
|
|
@@ -18,9 +18,12 @@ class SecretBase(BaseModel):
|
|
|
18
18
|
raise ValueError("Secret key must be a string.")
|
|
19
19
|
if len(v) > 30:
|
|
20
20
|
raise ValueError("Secret key must be at most 30 characters long.")
|
|
21
|
-
|
|
21
|
+
# Must start with letter, end with letter or digit
|
|
22
|
+
# Can contain letters, numbers, and underscores
|
|
23
|
+
if not re.fullmatch(r"[A-Za-z][A-Za-z0-9_]*[A-Za-z0-9]|[A-Za-z]", v):
|
|
22
24
|
raise ValueError(
|
|
23
|
-
"Secret key
|
|
25
|
+
"Secret key must start with a letter, end with a letter or digit, "
|
|
26
|
+
"and contain only letters, numbers, and underscores (_)!"
|
|
24
27
|
)
|
|
25
28
|
return v
|
|
26
29
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from .interface import SecretManager
|
|
2
|
+
from .utils import encode_vault_key
|
|
2
3
|
from ..schemas.connection import ConnectionSave, ConnectionUpdate, ConnectionRead
|
|
3
4
|
from ..schemas.secret import SecretSave, SecretUpdate, SecretRead
|
|
4
5
|
from ..schemas.git_ssh import SSHSave, SSHRead
|
|
@@ -124,13 +125,16 @@ class _RuntimeAccessor(_BaseAccessor):
|
|
|
124
125
|
self.slug = slug
|
|
125
126
|
|
|
126
127
|
def _get_vault_path(self, secret_type: str, key: str) -> str:
|
|
128
|
+
# Encode the key for cloud compatibility
|
|
129
|
+
encoded_key = encode_vault_key(key)
|
|
130
|
+
|
|
127
131
|
# Special case for git-ssh in runtime context
|
|
128
132
|
if secret_type == "git-ssh":
|
|
129
133
|
return f"{self.org_id}-{self.runtime_env}-{secret_type}-{self.slug}"
|
|
130
134
|
|
|
131
135
|
# Standard format for all other secret types
|
|
132
136
|
context = self.slug if self.slug else "global"
|
|
133
|
-
return f"{self.org_id}-{self.runtime_env}-{context}-{secret_type}-{
|
|
137
|
+
return f"{self.org_id}-{self.runtime_env}-{context}-{secret_type}-{encoded_key}"
|
|
134
138
|
|
|
135
139
|
class _StudioAccessor(_BaseAccessor):
|
|
136
140
|
def __init__(self, secret_manager: SecretManager, org_id: str, user_name: str):
|
|
@@ -139,7 +143,9 @@ class _StudioAccessor(_BaseAccessor):
|
|
|
139
143
|
self.user_name = user_name
|
|
140
144
|
|
|
141
145
|
def _get_vault_path(self, secret_type: str, key: str) -> str:
|
|
142
|
-
|
|
146
|
+
# Encode the key for cloud compatibility
|
|
147
|
+
encoded_key = encode_vault_key(key)
|
|
148
|
+
return f"{self.org_id}-{self.user_name}-{secret_type}-{encoded_key}"
|
|
143
149
|
|
|
144
150
|
# --------------------------------------------------------------------------
|
|
145
151
|
# PUBLIC INTERFACE CLASS
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Utility functions for secrets manager.
|
|
3
|
+
"""
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def encode_vault_key(key: str) -> str:
|
|
7
|
+
"""
|
|
8
|
+
Encode key for cloud-safe storage.
|
|
9
|
+
|
|
10
|
+
Converts to lowercase and replaces underscores with hyphens
|
|
11
|
+
to ensure compatibility with all cloud providers (AWS, Azure, GCP).
|
|
12
|
+
|
|
13
|
+
Cloud providers have different naming restrictions:
|
|
14
|
+
- AWS: Allows a-z, A-Z, 0-9, /_+=.@-
|
|
15
|
+
- Azure: Only lowercase letters, digits, and hyphens (a-z, 0-9, -)
|
|
16
|
+
Must START with letter, END with letter or digit
|
|
17
|
+
- GCP: Lowercase letters, digits, hyphens, and underscores (a-z, 0-9, -, _)
|
|
18
|
+
Must START with letter or underscore
|
|
19
|
+
|
|
20
|
+
This encoding ensures compatibility with the most restrictive provider (Azure).
|
|
21
|
+
|
|
22
|
+
Input validation (done in schemas) ensures:
|
|
23
|
+
- Key starts with a letter (A-Z, a-z)
|
|
24
|
+
- Key ends with a letter or digit (A-Z, a-z, 0-9)
|
|
25
|
+
- Key contains only letters, numbers, and underscores
|
|
26
|
+
|
|
27
|
+
After encoding (lowercase + underscore→hyphen):
|
|
28
|
+
- Starts with lowercase letter (a-z) ✓
|
|
29
|
+
- Ends with lowercase letter or digit (a-z, 0-9) ✓
|
|
30
|
+
- Contains only lowercase letters, digits, and hyphens ✓
|
|
31
|
+
|
|
32
|
+
Args:
|
|
33
|
+
key: Original key name (e.g., "My_Secret", "DB_CONNECTION")
|
|
34
|
+
Must start with letter and end with letter/digit
|
|
35
|
+
|
|
36
|
+
Returns:
|
|
37
|
+
Encoded key in lowercase with hyphens (e.g., "my-secret", "db-connection")
|
|
38
|
+
|
|
39
|
+
Examples:
|
|
40
|
+
>>> encode_vault_key("My_Secret")
|
|
41
|
+
'my-secret'
|
|
42
|
+
>>> encode_vault_key("DB_CONNECTION")
|
|
43
|
+
'db-connection'
|
|
44
|
+
>>> encode_vault_key("apiKey123")
|
|
45
|
+
'apikey123'
|
|
46
|
+
>>> encode_vault_key("test_API_v2")
|
|
47
|
+
'test-api-v2'
|
|
48
|
+
>>> encode_vault_key("A")
|
|
49
|
+
'a'
|
|
50
|
+
|
|
51
|
+
Note:
|
|
52
|
+
This encoding is case-insensitive. Both "My_Secret" and "my_secret"
|
|
53
|
+
will map to the same vault path. The original key (with case) is
|
|
54
|
+
preserved in the secret's data payload for reference.
|
|
55
|
+
"""
|
|
56
|
+
# Simple encoding: lowercase and replace underscores with hyphens
|
|
57
|
+
# No need for prefix/suffix handling since validation ensures correct start/end
|
|
58
|
+
return key.lower().replace('_', '-')
|
|
@@ -46,6 +46,7 @@ dataflow/secrets_manager/__init__.py
|
|
|
46
46
|
dataflow/secrets_manager/factory.py
|
|
47
47
|
dataflow/secrets_manager/interface.py
|
|
48
48
|
dataflow/secrets_manager/service.py
|
|
49
|
+
dataflow/secrets_manager/utils.py
|
|
49
50
|
dataflow/secrets_manager/providers/__init__.py
|
|
50
51
|
dataflow/secrets_manager/providers/aws_manager.py
|
|
51
52
|
dataflow/secrets_manager/providers/azure_manager.py
|
|
@@ -14,7 +14,7 @@ class PostInstall(install):
|
|
|
14
14
|
|
|
15
15
|
setup(
|
|
16
16
|
name="dataflow-core",
|
|
17
|
-
version="2.1.
|
|
17
|
+
version="2.1.18rc1",
|
|
18
18
|
packages=find_packages(include=["dataflow", "dataflow.*", "authenticator", "authenticator.*", "dfmigration", "dfmigration.*"]),
|
|
19
19
|
include_package_data=True,
|
|
20
20
|
package_data={
|
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/authenticator/dataflowairflowauthenticator.py
RENAMED
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/authenticator/dataflowsupersetauthenticator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/__init__.py
RENAMED
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/aws_manager.py
RENAMED
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/azure_manager.py
RENAMED
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow/secrets_manager/providers/gcp_manager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dataflow_core-2.1.17 → dataflow_core-2.1.18rc1}/dataflow_core.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|