Proposal
Background (to whom it may concern 😄)
After review my nomad/consul/vault ACLs on the weekend, I lernend on the hard way that I need an consul {} block in my job specs if I want to use the template block (my default agent token was waaaayyy to permissive so I missed that change).
Problem here was that the second example in the consul-token-for-templates suggest you can leave out the consul and identity blocks when using consul.task_identity in the server which doesn't work (and is wrong?) but the Workload identities in the identity block stated that template blocks are not provided with default identities.
Real Proposal
After inserting the consul {} block to my job specs for using the template blocks, the task has always CONSUL_TOKEN in the env the token saved to secrets/consul_token.
This isn't always desired and should be configurable like in the vault block:
consul {
env = false
disable_file = true
}
Use-cases
If the Consul Token is only needed for the templating and the task themself doesn't need it, this could be seen as an security enhancement for example in case of the identity could read parts of the K/V store.
Also there are cases where the Application inside react on the Environment and preferred it over an for example configured file with another key so you have to unset the env first.
Attempted Solutions
I did not finde an included way to disable the environment or File generation.
Proposal
Background (to whom it may concern 😄)
After review my nomad/consul/vault ACLs on the weekend, I lernend on the hard way that I need an
consul {}block in my job specs if I want to use the template block (my default agent token was waaaayyy to permissive so I missed that change).Problem here was that the second example in the consul-token-for-templates suggest you can leave out the
consulandidentityblocks when usingconsul.task_identityin the server which doesn't work (and is wrong?) but the Workload identities in the identity block stated that template blocks are not provided with default identities.Real Proposal
After inserting the
consul {}block to my job specs for using the template blocks, the task has alwaysCONSUL_TOKENin the env the token saved tosecrets/consul_token.This isn't always desired and should be configurable like in the vault block:
Use-cases
If the Consul Token is only needed for the templating and the task themself doesn't need it, this could be seen as an security enhancement for example in case of the identity could read parts of the K/V store.
Also there are cases where the Application inside react on the Environment and preferred it over an for example configured file with another key so you have to unset the env first.
Attempted Solutions
I did not finde an included way to disable the environment or File generation.