-
Notifications
You must be signed in to change notification settings - Fork 54
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
"aud" claim should be list, not string #231
Comments
Thanks for raising this. Note there is some relevant previous discussion here: #144 (comment) I can see how the |
"app" is just an example of custom audience in my case. It is configured as role's required audience at Vault side. |
Thanks, but why is
i.e. if you were going to specify any additional audience, I would expect it to be an audience that Vault itself identifies as, not the app. It goes on to say:
So I could imagine a case where multiple audiences are desirable for specifying Vault and Kubernetes audiences, and those seem like somewhat reasonable things to have a high degree of trust between. Through this lens I don't see a case to set an app as the audience, because the app and the Kubernetes API operate at very different layers in the application stack, as well as the app not being the intended audience for the token. That brings me to my question: Is it sufficient to simply not configure a required audience in the Vault k8s auth role for this case? Or are there requirements/considerations that make that undesirable? |
It works well without audience configured at Vault side and no customization in SecretProviderClass.
To address this I probably need to dive deeper inside JWT, k8s, Vault auth flows. Until now I considered audience is an additional mechanism of distinguishing Vault permissions between applications, deployed to the cluster (alongside service account and namespace). |
We use Vault Server external to EKS cluster with kubernetes auth with short-lived tokens (See https://developer.hashicorp.com/vault/docs/auth/kubernetes#use-the-vault-client-s-jwt-as-the-reviewer-jwt). Valid JWT contains the following part
In order to use external Vault with customized audience, audience claim must contain this string "https://kubernetes.default.svc".
When customizing audience, it is rewritten completely, what makes kubernetes auth with short-lived tokens broken.
Config:
Dumped JWT (partly).
Proposal: make audience list, not string. so, example config would be
The text was updated successfully, but these errors were encountered: