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

aws_auth - aws_security_token parameter is not used #160

Closed
briantist opened this issue Oct 20, 2021 · 0 comments · Fixed by #161
Closed

aws_auth - aws_security_token parameter is not used #160

briantist opened this issue Oct 20, 2021 · 0 comments · Fixed by #161
Assignees
Labels
bug Something isn't working
Milestone

Comments

@briantist
Copy link
Collaborator

briantist commented Oct 20, 2021

SUMMARY

The aws_security_token option, when supplied, is not passed into the aws_iam_login call.

If using a boto profile or other session credentials, the session token from those will be used, but direct parameter binding values are never accessed.

Related: #118

ISSUE TYPE
  • Bug Report
COMPONENT NAME

_auth_aws_iam_login

ANSIBLE VERSION

N/A

COLLECTION VERSION

1.3.2

CONFIGURATION

N/A

OS / ENVIRONMENT

N/A

STEPS TO REPRODUCE

Use temporary AWS creds like those from role assumption which require use of the session token, then pass the token to the auth method.

EXPECTED RESULTS

Success!

ACTUAL RESULTS

An error describing an invalid session token.

Error was a <class 'ansible.errors.AnsibleError'>, original message: An unhandled exception occurred while running the lookup plugin 'community.hashi_vault.hashi_vault'. Error was a <class 'hvac.exceptions.InvalidRequest'>, original message: error making upstream request: received error code 403 from STS: <ErrorResponse xmlns=\"https://sts.amazonaws.com/doc/2011-06-15/\">\n  <Error>\n    <Type>Sender</Type>\n    <Code>InvalidClientTokenId</Code>\n    <Message>The security token included in the request is invalid.</Message>\n  </Error>\n  <RequestId>23453748-f61b-4b59-8e72-13ce2c90fcf4</RequestId>\n</ErrorResponse>\n, on post https://vault/v1/auth/aws/login"}
@briantist briantist added the bug Something isn't working label Oct 20, 2021
@briantist briantist added this to the v1.4.0 milestone Oct 20, 2021
@briantist briantist self-assigned this Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant