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 binary cache: support assumed roles #4748

Open
JackKelly-Bellroy opened this issue Apr 27, 2021 · 5 comments
Open

S3 binary cache: support assumed roles #4748

JackKelly-Bellroy opened this issue Apr 27, 2021 · 5 comments

Comments

@JackKelly-Bellroy
Copy link

JackKelly-Bellroy commented Apr 27, 2021

Is your feature request related to a problem? Please describe.
It is not currently possible to use a private S3 binary cache with an assumed IAM role, because STSProfileCredentialsProvider is not in the default credentials resolution chain.

Describe the solution you'd like
Given a profile in .aws/config that sets role_arn and source_profile in a profile foo, have s3://bucket?profile=foo perform an sts:AssumeRole call instead of failing with Access Denied.

Describe alternatives you've considered
A workaround is to create a new key pair in the account holding the bucket, but that means creating and managing more sets of credentials.

@JackKelly-Bellroy
Copy link
Author

As a workaround, the bucket policy can allow IAM users in other accounts to access it.

@dhess
Copy link

dhess commented Sep 25, 2021

Ugh, I just discovered this issue today myself. We've been configuring our EC2 NixOS instances to use IAM auth to assume a role that can read our private S3 Nix binary cache, and all this time I thought it was working....

At the very least, the docs should be updated to mention this limitation.

@stale
Copy link

stale bot commented Apr 16, 2022

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Apr 16, 2022
@JackKelly-Bellroy
Copy link
Author

Still relevant, and you're still annoying.

@stale stale bot removed the stale label Apr 19, 2022
@JackKelly-Bellroy
Copy link
Author

I tried wiring the STSProfileCredentialsProvider into the way Nix acquires credentials, but ran into aws/aws-sdk-cpp#1963

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

No branches or pull requests

3 participants