config: remove consul.template_identity in lieu of task_identity (#18540)

The original thinking for Workload Identity integration with Consul and Vault
was that we'd allow `template` blocks to specify their own identity. But because
the login to Consul/Vault to get tokens happens at the task level, this would
involve making the `template` block a new WID watcher on its own rather than
using the Consul and Vault hooks we're building at the group/task level.

So it doesn't make sense to have separate identities for individual `template`
blocks rather than at the level of tasks. Update the agent configuration to
rename the `template_identity` to the more accurate `task_identity`, which will
be used for any non-service hooks (just `template` today).

Update the implicit identities job mutation hook to create the identity we'll
need as well.
This commit is contained in:
Tim Gross
2023-09-20 15:43:08 -04:00
committed by GitHub
parent fdc6c2151d
commit d7bd47d60f
8 changed files with 141 additions and 29 deletions

View File

@@ -250,7 +250,7 @@ consul {
file = true
ttl = "1h"
}
template_identity {
task_identity {
aud = ["consul.io"]
env = true
file = false