Skip to content

Commit 313ee9f

Browse files
committed
Remove : from workload identity SUBJECT when env prefix is empty
1 parent b11cc95 commit 313ee9f

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## [0.58.1] - 2025-10-06
4+
5+
- Removed `:` from workload identity `SUBJECT` when env prefix is empty.
6+
37
## [0.58.0] - 2025-10-06
48

59
- Introduced `workload_identity` authenticator and relevant CLI options (thanks to @jbylina).

snowddl/resolver/user.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,14 +176,17 @@ def _build_workload_identity_parameters(self, bp: UserBlueprint):
176176
query = self.engine.query_builder()
177177

178178
for param_name, param_value in bp.workload_identity.items():
179+
# ISSUER + SUBJECT is the unique key in Snowflake
180+
# SnowDDL has to append env_prefix in order to prevent duplicate key error
181+
# Feel free to adjust this logic for your own custom test environment
182+
if self.config.env_prefix and param_name == "SUBJECT":
183+
param_value = f"{param_value}:{self.config.env_prefix.rstrip('_$')}"
184+
179185
query.append_nl(
180186
" {param_name:r} = {param_value:dp}",
181187
{
182188
"param_name": param_name,
183-
# ISSUER + SUBJECT is the unique key in Snowflake
184-
# SnowDDL has to append env_prefix in order to prevent duplicate key error
185-
# Feel free to adjust this logic for your own custom test environment
186-
"param_value": f"{param_value}:{self.config.env_prefix.rstrip('_$')}" if param_name == "SUBJECT" else param_value,
189+
"param_value": param_value,
187190
},
188191
)
189192

snowddl/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.58.0"
1+
__version__ = "0.58.1"

0 commit comments

Comments
 (0)