This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs-object-store.git
The following commit(s) were added to refs/heads/main by this push:
new 1558217 Use builder fields instead of env vars for determining
credential provider (#547)
1558217 is described below
commit 15582171678b6a0e9d9f45f8d5cdd7780e3aa806
Author: Matt Friede <[email protected]>
AuthorDate: Fri Nov 21 10:10:37 2025 -0500
Use builder fields instead of env vars for determining credential provider
(#547)
---
src/aws/builder.rs | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/aws/builder.rs b/src/aws/builder.rs
index 7c05964..e49145a 100644
--- a/src/aws/builder.rs
+++ b/src/aws/builder.rs
@@ -1060,10 +1060,9 @@ impl AmazonS3Builder {
(Some(_), None, _) => return
Err(Error::MissingSecretAccessKey.into()),
(None, None, _) => unreachable!(),
}
- } else if let (Ok(token_path), Ok(role_arn)) = (
- std::env::var("AWS_WEB_IDENTITY_TOKEN_FILE"),
- std::env::var("AWS_ROLE_ARN"),
- ) {
+ } else if let (Some(token_path), Some(role_arn)) =
+ (self.web_identity_token_file, self.role_arn)
+ {
debug!("Using WebIdentity credential provider");
let session_name = self