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

docs: clarify requirements for Consul token policies and TTLs #24167

Merged
merged 1 commit into from
Oct 11, 2024

Conversation

tgross
Copy link
Member

@tgross tgross commented Oct 10, 2024

As of #24166, Nomad agents will use their own token to deregister services and checks from Consul. This returns the deregistration path to the pre-Workload Identity workflow. Expand the documentation to make clear why certain ACL policies are required for clients.

Additionally, we did not explicitly call out that auth methods should not set an expiration on Consul tokens. Nomad does not have a facility to refresh these tokens if they expire. Even if Nomad could, there's no way to re-inject them into Envoy sidecars for Consul Service Mesh without recreating the task anyways, which is what happens today. Warn users that they should not set an expiration.

Closes: #20185 (wontfix)
Ref: https://hashicorp.atlassian.net/browse/NET-10262

@tgross tgross added theme/docs Documentation issues and enhancements backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.9.x backport to 1.9.x release line labels Oct 10, 2024
@tgross tgross added this to the 1.9.x milestone Oct 10, 2024
@tgross tgross added backport/1.7.x backport to 1.7.x release line backport/1.8.x backport to 1.8.x release line labels Oct 10, 2024
@tgross tgross marked this pull request as ready for review October 10, 2024 18:52
Copy link
Contributor

@aimeeu aimeeu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update!
a few style guide nits and a broken link

website/content/docs/configuration/consul.mdx Outdated Show resolved Hide resolved
website/content/docs/configuration/consul.mdx Outdated Show resolved Hide resolved
website/content/docs/configuration/consul.mdx Outdated Show resolved Hide resolved
website/content/docs/configuration/consul.mdx Show resolved Hide resolved
@tgross tgross force-pushed the docs-consul-auth-method-ttl branch from c18b8ea to 29f61e0 Compare October 10, 2024 19:39
As of #24166, Nomad agents will use their own token to deregister services and
checks from Consul. This returns the deregistration path to the pre-Workload
Identity workflow. Expand the documentation to make clear why certain ACL
policies are required for clients.

Additionally, we did not explicitly call out that auth methods should not set an
expiration on Consul tokens. Nomad does not have a facility to refresh these
tokens if they expire. Even if Nomad could, there's no way to re-inject them
into Envoy sidecars for Consul Service Mesh without recreating the task anyways,
which is what happens today. Warn users that they should not set an expiration.

Closes: #20185 (wontfix)
Ref: https://hashicorp.atlassian.net/browse/NET-10262
Comment on lines +346 to +348
permissions vary slightly between Nomad servers and clients. The following
Consul ACL policies represent the minimal permissions Nomad servers and clients
need.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we include the (optional) kv permissions on the client?

Copy link
Member Author

@tgross tgross Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The client doesn't read from KV anymore using its own token; that's only done via Workload Identity.

@tgross tgross merged commit 7381f84 into main Oct 11, 2024
15 checks passed
@tgross tgross deleted the docs-consul-auth-method-ttl branch October 11, 2024 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/ent/1.7.x+ent Changes are backported to 1.7.x+ent backport/ent/1.8.x+ent Changes are backported to 1.8.x+ent backport/1.7.x backport to 1.7.x release line backport/1.8.x backport to 1.8.x release line backport/1.9.x backport to 1.9.x release line theme/consul theme/docs Documentation issues and enhancements theme/workload-identity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consul ACL token is not recreated if deleted
3 participants