Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sts: Always slash expiry time by 80% #1533

Merged
merged 2 commits into from
Aug 19, 2021

Conversation

vadmeste
Copy link
Member

@vadmeste vadmeste commented Aug 17, 2021

By default, STS expiration time is reduced by 10 seconds, but this is
not always good since an S3 call can be called near expiration time but
evaluated after the expiration time - the window here is 10 seconds
which can be not enough to upload some large data to an S3 server before
this latter rejects it with bad (expired) credentials.

This commit will always slash expiration time by 80% instead.

Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be more reasonable to only use the 80% when the DefaultExpiryWindow is used.

I would keep it, but have it be -1. If the window sent is equal, use 80%.

Don't deprecate it and allow previous behavior to work as expected.

What about also having a default minimum time?

pkg/credentials/iam_aws.go Outdated Show resolved Hide resolved
pkg/credentials/credentials.go Outdated Show resolved Hide resolved
Currently, STS expiration time is reduced by 10 seconds, but this is
not always good since an S3 call can be called near expiration time but
evaluated after the expiration time - the window here is 10 seconds
which can be not enough to upload some large data to an S3 server before
this latter rejects it with bad (expired) credentials.

This commit will slash expiration time by 80% instead by default.
Copy link
Contributor

@klauspost klauspost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doc update. Rest LGTM.

pkg/credentials/iam_aws.go Outdated Show resolved Hide resolved
Co-authored-by: Klaus Post <klauspost@gmail.com>
@harshavardhana harshavardhana merged commit 7877ed5 into minio:master Aug 19, 2021
vadmeste pushed a commit to vadmeste/minio that referenced this pull request Aug 23, 2021
This fixes some issues in replication & S3 gateway:
- minio/minio-go#1531
- minio/minio-go#1533
harshavardhana pushed a commit to minio/minio that referenced this pull request Aug 24, 2021
This fixes some issues in replication & S3 gateway:
- minio/minio-go#1531
- minio/minio-go#1533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants