-
Notifications
You must be signed in to change notification settings - Fork 2k
[Feature Request] Put Vault token in Raft and provide an API to set it. #7258
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
Comments
What if you used Consul template to create the nomad config? |
While technically possible, this only moves the problem one layer further down. I'm working in an environment where I would like to not place a secret into the configuration archive, and rather would like to remotely provide it to nomad during bootstrapping. |
Hi @the-maldridge, thanks for raising this issue. It is certainly an interesting idea and would make the UX in handling certain token related tasks nicer. That being said, this would be something we would need to discuss seeing as there are security implications. |
@jrasell For sure. There are also security implications for having a very high powered token sitting in a file for Nomad to pick up, and I'm hopeful to avoid that. With the release of Vault 1.4 and integrated storage, Nomad becomes the last part of the Hashicorp stack that by default can form a bootstrapping loop with another service when collocated. I'm "solving" this right now by doing the bootstrap of a cluster in two passes and rebooting in between, but this is less than ideal. |
Would this also be fixed via #15617 @the-maldridge? |
Luckily it doesn't require a full TLS setup. I've been testing it locally just fine, and I'm too lazy to start a full mTLS cluster every time 😅 I'm curious to which part made you think that, we may need to adjust the description. |
@lgfa29 my understanding is that OIDC needs full TLS (note TLS, not mTLS) to be able to perform key discovery and import. I had always understood this to be a spec conformance item, but perhaps the Nomad team has allowed that key import to happen over an insecure channel? |
Ah ok, yeah so the issue is a bit light on the details, probably because the implementation wasn't fully clear by then. The initial plan is to use Nomad's JWKS URL instead of OIDC. The workflow would be something like this:
So for each task with a This way the Nomad servers are no longer involved in the token creation and renewal process, so there's no need to provide any Vault token anywhere. There's a bit of setup needed to properly configure Vault, but we're thinking of ways to help with that. |
Starting in Nomad 1.7.0-beta.1 we've deprecated the use of Vault tokens in the Nomad agent configuration. Nomad will use workload identities to sign into Vault for purposes of getting Vault tokens for those workloads. Using Vault tokens in the Nomad configuration will be removed entirely in Nomad 1.9. |
For future people finding this issue, could you put a link to the learn guide for setting up workload identity, and/or a migration guide for going from the legacy workflow to the new one? |
Oh, I expected the 1.7-beta to publish docs as well, but it looks like the pipeline bug we have around publishing docs for prereleases is still unfixed. In the meantime, there's some documentation describing the new workflow in https://github.com/hashicorp/nomad/blob/main/website/content/docs/integrations/vault-integration.mdx and a full tutorial for Vault and Consul coming out before GA. I'll make sure to circle back here once those are published. |
@the-maldridge here's a preview of the tutorials:
The full documentation is still a work in progress, but let me know if you have any early feedback on these 🙂 |
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues. |
It would be nice to have an API to set the nomad server vault token so that it doesn't need to be placed into a config file on the server machines. My current use case is that this would allow the use of Nomad in places where remote configuration management is not a clean solution, but talking to the nomad API is.
It would also make it significantly easier to rotate the token.
The text was updated successfully, but these errors were encountered: