-
Notifications
You must be signed in to change notification settings - Fork 186
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
S3: add support for STS session tokens #1472
Conversation
@@ -224,6 +224,9 @@ Status S3::init(const Config& config, ThreadPool* const thread_pool) { | |||
auto aws_secret_access_key = | |||
config.get("vfs.s3.aws_secret_access_key", &found); | |||
assert(found); | |||
auto aws_session_token = | |||
config.get("vfs.s3.aws_session_token", &found); | |||
assert(found); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit message leads me to believe that tokens are not always required. Should we really have an assert
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consistency with the others -- the dict entry is also still expected for the key and secret, even if empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -224,6 +224,9 @@ Status S3::init(const Config& config, ThreadPool* const thread_pool) { | |||
auto aws_secret_access_key = | |||
config.get("vfs.s3.aws_secret_access_key", &found); | |||
assert(found); | |||
auto aws_session_token = | |||
config.get("vfs.s3.aws_session_token", &found); | |||
assert(found); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, thanks!
80a7f33
to
17f6f3a
Compare
If the user has set a session token (for AWS Security Token Service) then use it: - https://docs.aws.amazon.com/STS/latest/APIReference/Welcome.html For testing run: `aws sts get-session-token --duration-seconds 900`. See: - https://docs.aws.amazon.com/cli/latest/reference/sts/get-session-token.html
17f6f3a
to
2a55836
Compare
(cherry picked from commit b46407c)
(cherry picked from commit b46407c)
Some AWS credentials are issued via the AWS STS, which requires to pass an additional "session token" to the AWSCredentials object.
Fixes issue raised by user in the forum: https://forum.tiledb.com/t/tile-db-s3-documentation/132/5
[ch1468]