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

Backport of Adds vault role to JWT claims if specified in jobspec into release/1.7.x #19545

Conversation

hc-github-team-nomad-core
Copy link
Contributor

Backport

This PR is auto-generated from #19535 to be assessed for backporting due to the inclusion of the label backport/1.7.x.

The below text is copied from the body of the original PR.


Adds vault_role as an attribute in the JWT if, and only if, the role is specified in the jobspec. This would allow Vault users to interpolate the Vault role in their templated policies. This could be generally useful, but was primarily added to unblock a specific customer. They have verified that this fix (including the constraint below) would unblock JWT-based Vault auth for their setup.

Ideally, we could add the role regardless of where it is specified, but since the server is minting the JWTs and the client has the default fallback auth_role values, it is difficult to insert the role into the JWT claims if it is using the fallback. There is also a potential syncing issue if you update config and then restart Nomad. To get around these issues, Vault Namespaces have the same constraint (only adding to claims if in the jobspec), so we're adding the same constraint to the role JWT claim.


Overview of commits

@mikenomitch mikenomitch merged commit 5fdf464 into release/1.7.x Dec 20, 2023
15 of 17 checks passed
@mikenomitch mikenomitch deleted the backport/add-vault-role-to-jwt-claims/lightly-alive-lab branch December 20, 2023 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants