Skip to content

Commit

Permalink
only serialize auth secrets when values are resolvable
Browse files Browse the repository at this point in the history
  • Loading branch information
vblagoje committed Jan 15, 2025
1 parent d9d4fae commit b278637
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ def to_dict(self) -> Dict[str, Any]:

# Handle http_auth serialization
if self._auth_secrets:
http_auth = tuple(secret.to_dict() for secret in self._auth_secrets)
# If all secrets are resolved, serialize them
if all(secret.resolve_value() for secret in self._auth_secrets):
http_auth = tuple(secret.to_dict() for secret in self._auth_secrets)
else:
# If any secrets are not resolved, don't serialize them (backwards compatibility)
http_auth = None
elif isinstance(self._http_auth, tuple):
# For non-Secret tuples, keep the values as-is
http_auth = self._http_auth
Expand Down

0 comments on commit b278637

Please sign in to comment.