You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let expiry = match c.expiry().and_then(|e| e.duration_since(t_now).ok()){
Some(ttl) => Instant::now() + ttl,
None => {
returnErr(crate::Error::Generic{
store:"S3",
source:"Invalid expiry".into(),
})
}
};
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 , 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
The text was updated successfully, but these errors were encountered:
Does your profile contain static credentials? I'm wondering if the issue here is that the aws-profile logic is not currently handling this, which we should fix, but interpreting the expiry is still correct for ephemeral credentials such as those obtained from sso?
tustvold
changed the title
object-store: fix aws_profile loading
object-store: aws_profile fails to load static credentials
Feb 27, 2023
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 returnNone
, resulting in anInvalid expiry
error.arrow-rs/object_store/src/aws/credential.rs
Lines 558 to 566 in 96791ea
The
expiry()
method returns theexpires_after
field, which is not loaded from theaws_profile
, but instead is made optionally available to the caller as a caching ttl field. ( reference for that here , there is anexpiry_mut()
method as well, allowing the caller to modify the expiration. ).As such this value will always be
None
. A value ofNone
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
The text was updated successfully, but these errors were encountered: