-
Notifications
You must be signed in to change notification settings - Fork 173
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
[EKS-IAM Roles for Service Accounts] Possible to Assume Role? #86
Comments
Hi,
And replace I didn't find the doc with all possible fields and values. But I'll try this solution waiting for a feedback. Edit: I saw the issue 75, the url called seems the right one. |
Quick update, using the configmap way of configuration works with:
So good, but it uses the ec2 instance role for authentication. In my use case, I want to use the AWS feature (https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html) allowing to map a K8S service account to an IAM role. The correspondent token is mounted under: Different location from classical service token: Is there a way to request init-container and sidecar to use this token for the iam authentication? By mounting it as AWS_SESSION_TOKEN environment variable for instance? To do so, we'll need to have a setting to mount the additional AWS volume
Thanks. |
After investigation, I guess I could use the field Waiting for a possible enhancements, I switched to kubenetes auth method. |
This has been addressed by #169 in vault-k8s 0.10.0. For example, annotations like this will utilize IRSA creds to assume the AWS role and authenticate to vault's aws auth method: annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/role: "dev-role-iam"
# AWS auth method config
vault.hashicorp.com/auth-type: "aws"
vault.hashicorp.com/auth-path: "auth/aws"
vault.hashicorp.com/auth-config-type: "iam"
# secret injection template
vault.hashicorp.com/agent-inject-secret-database-config.txt: "internal/data/database/config"
vault.hashicorp.com/agent-inject-template-database-config.txt: |
{{- with secret "internal/data/database/config" -}}
postgresql://{{ .Data.data.username }}:{{ .Data.data.password }}@postgres:5432/wizard
{{- end -}} Closing for now. |
* fix failing tests * removed check for length of envmap * perform strict compare for env names
Hello,
Some context information:
Extract of the script:
Then:
When I use the CLI, I retrieve manually the token with:
So I suppose, the issue comes from the method
aws
which is not used by the injector by default I guess.Is there a setting to change the way the token is retrieved? Or do I need to provide the token manually?
Thanks for your help
Guillaume
The text was updated successfully, but these errors were encountered: