-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
IAM roles for AWS EKS service accounts not working #8926
Comments
we are seeing same issue,
this did not work for us either. |
@serhatcetinkaya @dogfish182 this is working, |
thanks for that @papovyr! I would also love to know when the fix will be rolled into a release, I can't find any kind of release cycle description anywhere though. Does anyone know? We would prefer to wait for an official release and use the helm chart for simplicity and can probably just work around it until then. |
As far as I know, this change hasn't been added to any Vault release yet. The milestone for this change is 1.5. |
I saw it also got backported to 1.4.3 (not yet released) |
I think this is fixed in 1.4.3, but it looks like there might be another bug (#9415) that requires that the otherwise optional parameter |
I can confirm 1.4.3 works with |
Closing since 1.5.0 is now released, and 1.4.3 was verified to be working with |
@janwillies Have you verified the k8s service account matches the IAM role trust relationship conditions for name and namespace? Discussed more in this thread: #9576 (comment) |
Indeed that was the issue. I found out via getting the token from the pod and decoding. Thanks, and 1.5 works great so far! |
Describe the bug
IAM roles for AWS EKS service accounts still don't work with Vault. I was expecting the issue to be resolved after #7450 and #7738 . I suspect the problem is custom credential chain implementation in Vault.
In EKS we have dummy IAM roles with almost no permission attached on worker nodes, instead we give permissions directly to pod (either with native IAM to service account solution or with third party tools like kube2iam etc). Expecting latest Vault would work with IAM to service account solution after seeing changelog, we upgraded to 1.4.1 and saw that instead of using service account IAM role it tries to use worker node IAM role, authenticates successfully but fails due to lack of privileges.
To Reproduce
Steps to reproduce the behavior:
To easily reproduce use dynamodb backend and don't give any dynamodb permissions to worker node IAM role but give required permissions to IAM role that is attached to service account, it will fail immediately with following error:
Expected behavior
I expect it to work like official SDK. With the same setup and different container when I do a call to AWS API the container uses IAM role from the service account.
Environment:
I used the official
vault:1.4.1
container.vault status
output:vault version
):Vault v1.4.1
AWS_WEB_IDENTITY_TOKEN_FILE
is readable by vault user:Vault server configuration file(s):
Additional context
In one of the related isssues, someone mentioned changing security context solves the problem but for me it didn't. Below is the securityContext used:
I tried different combinations mentioned in related issues.
The text was updated successfully, but these errors were encountered: