helmus opened a new issue, #186:
URL: https://github.com/apache/arrow-rs-object-store/issues/186

   **Describe the bug**
   
   Loading credentials trough an aws_profile is currently not working because 
the expiration value of the credential is evaluated incorrectly. 
   
   The following call to `c.expiry()` will always return `None`, resulting in 
an `Invalid expiry` error.
   
https://github.com/apache/arrow-rs/blob/96791ea47b032ce2ebcb07087d3b3007ea0df536/object_store/src/aws/credential.rs#L558-L566
   
   The `expiry()` method returns the `expires_after` field, which is not loaded 
from the `aws_profile`, but instead is made optionally available to the caller 
as a caching ttl field. ( [reference for that 
here](https://github.com/awslabs/smithy-rs/blob/76ee00eb1737964ce240ae817f573980920f0607/aws/rust-runtime/aws-credential-types/src/credentials_impl.rs#L29-L36)
 , there is an `expiry_mut()` method as well, allowing the caller to modify the 
expiration.  ).
   
   As such this value will always be `None`. A value of `None` means the 
credential does not expire at all. 
   Currently the referenced code evaluates an expiry of `None` as an invalid 
expiry.
   
   
   
   **To Reproduce**
   attempt to load a file from s3 trough an aws_profile, `Invalid expiry` will 
be shown.
   
   
   **Expected behavior**
   
   The query should execute correctly.
   
   
   **Additional context**
   <!--
   Add any other context about the problem here.
   -->


-- 
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