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

Adding support for the AWS session token used in STS temporary credentials #11

Merged
merged 1 commit into from
Jan 19, 2016

Conversation

garnaat
Copy link
Contributor

@garnaat garnaat commented Jan 19, 2016

This PR adds support for the session_token used in STS temporary credentials such as IAM roles.

@garnaat
Copy link
Contributor Author

garnaat commented Jan 19, 2016

Fixes #9

@DavidMuller
Copy link
Owner

Thanks for this pull request @garnaat

This PR adds support for the session_token used in STS temporary credentials such as IAM roles.

Have you used this change-set to successfully authenticate with temporary credentials and a production elatsicsearch cluster?

@garnaat
Copy link
Contributor Author

garnaat commented Jan 19, 2016

Yes, I did that this morning. I need to be able to talk to an AWS Elasticsearch service that is protected within a Lambda function where the only credentials I have are temporary creds supplied to the Lambda container. It is working for me.

DavidMuller added a commit that referenced this pull request Jan 19, 2016
Adding support for the AWS session token used in STS temporary credentials
@DavidMuller DavidMuller merged commit 41518b3 into DavidMuller:master Jan 19, 2016
@garnaat
Copy link
Contributor Author

garnaat commented Jan 19, 2016

Thanks!

@DavidMuller
Copy link
Owner

I've published this change on pypi -- version 0.2.4

(I also added a note about temporary credentials to the changelog and the bottom of the README)

@alexbao
Copy link

alexbao commented Sep 12, 2017

@garnaat thanks for the change!

I was trying to use the instance role for ES access and I got The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. error not sure whether it's because of anything misconfigured.

I am using elastalert library, the auth is constructed as https://github.com/Yelp/elastalert/blob/master/elastalert/auth.py#L58 with only aws_region setup to pick up the instance role. Verified that the role should have the access to ES.

Any advice? Thank you in advance!

@alexbao
Copy link

alexbao commented Sep 15, 2017

Happy to be proven wrong: my guess is that aws might updated the way to calculate signature. The auth should have worked when set up the connection, but failed later when the query is sent. cc @garnaat @DavidMuller

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.

3 participants