Skip to content

Commit c651fe1

Browse files
sapinbZk2u
authored andcommitted
remove IRSA backend, allow optional access_key, secret in S3Compatible backend for IRSA
1 parent e1b25cf commit c651fe1

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

bin/mosaic/src/config.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ pub(crate) enum TableStoreBackend {
306306
bucket: String,
307307
region: String,
308308
prefix: String,
309+
<<<<<<< HEAD
310+
=======
311+
/// When both `access_key_id` and `secret_access_key` are omitted, the
312+
/// AWS credential chain is used: IRSA web-identity token → ECS task
313+
/// creds → EC2 instance profile.
314+
>>>>>>> 3e11546 (remove IRSA backend, allow optional access_key, secret in S3Compatible backend for IRSA)
309315
access_key_id: Option<String>,
310316
secret_access_key: Option<String>,
311317
endpoint: Option<String>,
@@ -319,6 +325,7 @@ pub(crate) enum TableStoreBackend {
319325
#[serde(default)]
320326
virtual_hosted_style_request: bool,
321327
},
328+
<<<<<<< HEAD
322329
}
323330

324331
impl TableStoreBackend {
@@ -336,6 +343,8 @@ impl TableStoreBackend {
336343
Self::LocalFilesystem { .. } => None,
337344
}
338345
}
346+
=======
347+
>>>>>>> 3e11546 (remove IRSA backend, allow optional access_key, secret in S3Compatible backend for IRSA)
339348
}
340349

341350
#[derive(Debug, Clone, Deserialize)]

bin/mosaic/src/main.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,14 @@ where
154154
builder = builder.with_secret_access_key(secret_access_key);
155155
}
156156

157+
// When credentials are omitted the builder falls through to the
158+
// AWS credential chain: IRSA web-identity → ECS task → instance profile.
159+
if let (Some(key_id), Some(secret)) = (access_key_id, secret_access_key) {
160+
builder = builder
161+
.with_access_key_id(key_id)
162+
.with_secret_access_key(secret);
163+
}
164+
157165
if let Some(endpoint) = endpoint {
158166
builder = builder.with_endpoint(endpoint);
159167
}

0 commit comments

Comments
 (0)