Skip to content

Commit

Permalink
support session token (#530)
Browse files Browse the repository at this point in the history
  • Loading branch information
twuebi authored Aug 12, 2024
1 parent 182b20d commit bbbea97
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/iceberg/src/io/storage_s3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pub const S3_ENDPOINT: &str = "s3.endpoint";
pub const S3_ACCESS_KEY_ID: &str = "s3.access-key-id";
/// S3 secret access key.
pub const S3_SECRET_ACCESS_KEY: &str = "s3.secret-access-key";
/// S3 session token.
/// This is required when using temporary credentials.
pub const S3_SESSION_TOKEN: &str = "s3.session-token";
/// S3 region.
pub const S3_REGION: &str = "s3.region";
/// S3 Path Style Access.
Expand All @@ -56,6 +59,9 @@ pub(crate) fn s3_config_parse(mut m: HashMap<String, String>) -> Result<S3Config
if let Some(secret_access_key) = m.remove(S3_SECRET_ACCESS_KEY) {
cfg.secret_access_key = Some(secret_access_key);
};
if let Some(session_token) = m.remove(S3_SESSION_TOKEN) {
cfg.session_token = Some(session_token);
};
if let Some(region) = m.remove(S3_REGION) {
cfg.region = Some(region);
};
Expand Down

0 comments on commit bbbea97

Please # to comment.