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

generate ~/.aws/config for ecs server endpoint #972

Open
synfinatic opened this issue Jul 11, 2024 · 1 comment
Open

generate ~/.aws/config for ecs server endpoint #972

synfinatic opened this issue Jul 11, 2024 · 1 comment
Milestone

Comments

@synfinatic
Copy link
Owner

synfinatic commented Jul 11, 2024

Like setup profiles, but use the ECS server endpoint to fetch the creds. This way users can just do export AWS_PROFILE=xxx on a remote host and get access to different roles without using the full url endpoint.

Looks like the AWS SDK doesn't support multiple profiles with the Ecs endpoint (only the Ec2InstanceMetadata is documented which I assume is just for EC2???). Anyways, support for this seems likely to require using the credential_process option. Since the SDK doesn't support caching of creds via credential_process, we would need to do so in a local process to avoid constantly going over the network which would add too much latency.

@synfinatic synfinatic modified the milestones: 2.0.0, 2.1.0 Jul 11, 2024
@synfinatic
Copy link
Owner Author

Not sure this is actually a good idea?

If we require using the credential process (which is necessary) and we want to cache credentials, then we need one of:

  1. A secure store to save the creds
  2. A service to store the creds in memory (but need to prevent others on the same system from talking to it)
  3. Just write the unencrypted creds to disk like the stock aws tooling

None of these options really seem that great? Probably the best option is an ssh-agent like solution which would use https://pkg.go.dev/gopkg.in/sevlyar/go-daemon.v0 or similar, which seems a bit of a hack since Go doesn't safely support fork() to run in background.

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

1 participant