question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

AWS IAM authentication does not work

See original GitHub issue

I’ve tried many things to get AWS IAM role authentication to work and every time I get the error from vault:

{"errors":["didn't supply required authentication values"]}

Here is what I have that I think should work but get the above error:

var requestHeader = Convert.ToBase64String(Encoding.UTF8.GetBytes("{\"X-Vault-AWS-IAM-Server-ID\":[\"vault.example.com\"]}"));
var authMethod = new IAMAWSAuthMethodInfo(roleName: "my-role", requestHeaders: requestHeader);

I also didn’t see an included example of this.

Here is a snippet in python/ruby where people report works for AWS IAM auth - https://gist.github.com/joelthompson/378cbe449d541debf771f5a6a171c5ed#file-vault_aws_auth_py3-py

Using the vault CLI I am able to auth:

vault auth -method=aws -token-only header_value=vault.example.com role=my-role

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:36 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
rajanadarcommented, Apr 18, 2019

Fantastic. I have a bug in the constructor without the mount point. That’s why the one without the mount point fails. If you use the constructor with the mount point, it works.

I’ll fix the bug in a day. Then you should be able to use either constructor.

1reaction
nsmeefcommented, Dec 5, 2018

Need this in order to leverage this package for our systems. Do you need help implementing/fixing @rajanadar? (I haven’t yet used so don’t know where the implementation is up to).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting general IAM issues
Use the information here to help you diagnose and fix common issues when you work with AWS Identity and Access Management (IAM).
Read more >
Enabling and disabling IAM database authentication
To enable or disable IAM database authentication for an existing DB instance. Open the Amazon RDS console at https://console.aws.amazon.com/rds/ .
Read more >
Troubleshooting IAM Identity Center issues
The following can help you troubleshoot some common issues you might encounter while setting up or using the IAM Identity Center console.
Read more >
IAM database authentication for MariaDB, MySQL, and ...
IAM database authentication works with MariaDB, MySQL, and PostgreSQL. With this authentication method, you don't need to use a password when you connect...
Read more >
What if an MFA device is lost or stops working?
If your AWS account root user multi-factor authentication (MFA) device is lost, damaged, or not working, you can recover access to your account....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found