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

[FEATURE] Use Nomad Workload Identity and Task API #35

Open
gulducat opened this issue Jan 5, 2024 · 0 comments
Open

[FEATURE] Use Nomad Workload Identity and Task API #35

gulducat opened this issue Jan 5, 2024 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gulducat
Copy link

gulducat commented Jan 5, 2024

Heyaheya! Making an issue for ya as promised @protochron :)

A couple of associated Nomad features might help with folks running Nomad with ACLs enabled, and improve the scalability of Netreap's usage of Nomad API.

I don't think this requires any Go application code changes, except to make sure the nomad/api package is up to date to be able to use a unix:// NOMAD_ADDR, and could update your example job with an identity{}, and maybe some additional documentation showing how to set up Nomad policy for the job.

Workload identity provides Nomad tokens dynamically to tasks, rather than needing some static secret (or provisioned by Vault or such). This could also allow the task to read/write Nomad Variables if you wanted to, say, put Cilium policy in a Nomad var instead of Consul k/v, or do leader election with variable locks 😉

The Task API is basically "just" a unix domain socket for the Nomad API through the Nomad client process, which re-uses its open RPC connection to its server, which can reduce open network connections. It also removes the complexity of TLS, which sometimes can be unwieldy. The main caveat is that if the client agent is restarted, or otherwise goes away, the API won't be available until it comes back up.

These features can be used separately, but especially together they're quite nifty. Hopefully the linked documentation helps decide how you might like to implement it, and share with your community as you'd like.

Happy to answer questions or help if you'd like! <3

@gulducat gulducat added enhancement New feature or request help wanted Extra attention is needed labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant