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

S3 provider doesn't work with MFA credentials #40

Merged
merged 2 commits into from
Oct 3, 2019

Conversation

eschrock
Copy link
Collaborator

@eschrock eschrock commented Oct 3, 2019

Issues Addressed

Fixes #30

Proposed Changes

This fix will fetch the session token from the client and pass that to the server. Why you have to check the instance type of the object returned I don't know, but that's apparently the interface.

Testing

After getting credentials from aws sts get-session-token and setting environment variables, with current titan:

$ titan clone s3://titan-data-demo/hello-world/postgres hello-world
Clone failed.
The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: AE9AE0C236B7E357; S3 Extended Request ID: uKxN8c7SyScgymGk4i3BhzY9LMRcxCNJb4UFn9UeX3BVgRrCVXXGxNzd+vSXr0zwMAF7uXwFPyc=)
hello-world removed

With fix in place:

$ java -jar ./target/titan-0.3.1-jar-with-dependencies.jar clone s3://titan-data-demo/hello-world/postgres hello-world
Creating repository hello-world
Creating docker volume hello-world/v0 with path /var/lib/postgresql/data
Running controlled container hello-world
PULL 0f53a6a4-90ff-4f8c-843a-a6cce36f4f4f from origin RUNNING
Pulling 0f53a6a4-90ff-4f8c-843a-a6cce36f4f4f from 'origin'
Downloading archive for /var/lib/postgresql/data
null
Extracting archive for /var/lib/postgresql/data
null
PULL 0f53a6a4-90ff-4f8c-843a-a6cce36f4f4f from origin COMPLETE
Stopping container hello-world
Checkout 0f53a6a4-90ff-4f8c-843a-a6cce36f4f4f
Starting container hello-world
0f53a6a4-90ff-4f8c-843a-a6cce36f4f4f checked out

@mcred mcred merged commit 5729886 into titan-data:master Oct 3, 2019
@eschrock eschrock deleted the feature/mfa branch November 6, 2019 02:46
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.

S3 provider doesn't work with MFA credentials
2 participants