Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions src/runtime/pkg/data/data.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,8 +414,17 @@ func MountURL(downloadType string, credentialInfo ConfigInfo, urlPath string,
osmoChan <- fmt.Sprintf("Missing data credential for %s.", storageBackend.GetProfile())
return isEmpty
}
os.Setenv("AWS_ACCESS_KEY_ID", dataCredential.AccessKeyId)
os.Setenv("AWS_SECRET_ACCESS_KEY", dataCredential.AccessKey)
// Only set static key env vars when keys are provided.
// When using DefaultDataCredential (ambient credentials via Pod Identity,
// IRSA, etc.), keys are empty — setting empty env vars would clobber the
// SDK's default credential chain.
if dataCredential.AccessKeyId != "" {
os.Setenv("AWS_ACCESS_KEY_ID", dataCredential.AccessKeyId)
os.Setenv("AWS_SECRET_ACCESS_KEY", dataCredential.AccessKey)
}
if dataCredential.Region != "" {
os.Setenv("AWS_REGION", dataCredential.Region)
}

var commandArgs []string

Expand Down
4 changes: 2 additions & 2 deletions src/utils/connectors/postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -2557,7 +2557,7 @@ def construct_path(endpoint: str, bucket: str, path: str):

class LogConfig(ExtraArgBaseModel):
""" Config for storing information about data. """
credential: credentials.StaticDataCredential | None = None
credential: credentials.DataCredential | None = None


class WorkflowInfo(ExtraArgBaseModel):
Expand All @@ -2574,7 +2574,7 @@ def validate_name(self, name: str):

class DataConfig(ExtraArgBaseModel):
""" Config for storing information about data. """
credential: credentials.StaticDataCredential | None = None
credential: credentials.DataCredential | None = None

base_url: str = ''
# Timeout in mins for osmo-ctrl to retry connecting to the OSMO service until exiting the task
Expand Down
4 changes: 2 additions & 2 deletions src/utils/job/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def create_login_dict(user: str,


def create_config_dict(
data_info: dict[str, credentials.StaticDataCredential],
data_info: dict[str, credentials.DataCredential],
) -> dict:
'''
Creates the config dict where the input should be a dict containing key values like:
Expand Down Expand Up @@ -2339,7 +2339,7 @@ def convert_to_pod_spec(
service_config: connectors.ServiceConfig | None = None,
dataset_config: connectors.DatasetConfig | None = None,
pool_info: connectors.Pool | None = None,
data_endpoints: Dict[str, credentials.StaticDataCredential] | None = None,
data_endpoints: Dict[str, credentials.DataCredential] | None = None,
skip_refresh_token: bool = False,
auth_token: str | None = None,
) -> Tuple[Dict, Dict[str, kb_objects.FileMount], Optional[Tuple[str, str]]]:
Expand Down
Loading