tustvold commented on code in PR #5268:
URL: https://github.com/apache/arrow-rs/pull/5268#discussion_r1439096403


##########
object_store/src/aws/client.rs:
##########
@@ -194,6 +212,27 @@ impl S3Config {
     }
 }
 
+struct SessionCredential<'a> {
+    credential: Option<Arc<AwsCredential>>,
+    session_token: bool,
+    config: &'a S3Config,
+}
+
+impl<'a> SessionCredential<'a> {
+    fn authorizer(&self) -> Option<AwsAuthorizer<'_>> {
+        let mut authorizer =
+            AwsAuthorizer::new(self.credential.as_deref()?, "s3", 
&self.config.region)
+                .with_sign_payload(self.config.sign_payload);
+
+        if self.session_token {
+            let token = HeaderName::from_static("x-amz-s3session-token");

Review Comment:
   This is not clearly documented anywhere I could find, I reverse engineered 
it from the boto library - 
https://github.com/boto/botocore/blob/develop/botocore/auth.py#L547



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to