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

Add support for additional AWS authentication sources #102

Merged
merged 1 commit into from
Feb 7, 2016

Conversation

willglynn
Copy link
Contributor

AWS client tools commonly support passing credentials via AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY, but supporting only this is insufficient. For example, access key IDs provided by STS require passing in AWS_SECURITY_TOKEN as a third value, and EC2 instances are often provided dynamic credentials at runtime via the EC2 metadata service.

This changeset makes lego attempt to find credentials in the same way that the aws CLI tool attempts to find credentials. The result is even less auth code than before because goamz provides all this with aws.GetAuth().

AWS client tools commonly support passing credentials via
`AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY`, but supporting only this is
insufficient. For example, access key IDs provided by STS require passing in
`AWS_SECURITY_TOKEN` as a third value, and EC2 instances are often provided
dynamic credentials at runtime via the EC2 metadata service.

This changeset makes `lego` attempt to find credentials in the same way that
the `aws` CLI tool attempts to find credentials. The result is even less
auth code than before because `goamz` provides all this with `aws.GetAuth()`.
@willglynn
Copy link
Contributor Author

Note also that this proposed behavior matches the official AWS SDK's default credential chain, customarily achieved by omitting the Credentials field of aws.Config.

@janeczku
Copy link
Contributor

janeczku commented Feb 7, 2016

LGTM 👍

@mholt
Copy link
Contributor

mholt commented Feb 7, 2016

I like that this PR is a net gain in LOC because of comments, but is actually a net reduction.

@xenolf
Copy link
Member

xenolf commented Feb 7, 2016

Great PR, thank you!

xenolf added a commit that referenced this pull request Feb 7, 2016
Add support for additional AWS authentication sources
@xenolf xenolf merged commit e497865 into go-acme:master Feb 7, 2016
@willglynn willglynn deleted the aws_authentication branch February 8, 2016 18:22
@ldez ldez added this to the v0.3 milestone Dec 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants