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

consul: allow non-root Nomad to rewrite token #24410

Merged
merged 1 commit into from
Nov 19, 2024
Merged

Conversation

tgross
Copy link
Member

@tgross tgross commented Nov 8, 2024

When a task restarts, the Nomad client may need to rewrite the Consul token, but it's created with permissions that prevent a non-root agent from writing to it. While Nomad clients should be run as root (currently), it's harmless to allow whatever user the Nomad agent is running as to be able to write to it, and that's one less barrier to rootless Nomad.

(Note that the Vault token already has u+rw permissions.)

Ref: #23859 (comment)

@tgross tgross added this to the 1.9.x milestone Nov 8, 2024
@tgross tgross added theme/consul theme/rootless Run Nomad Client without root type/bug labels Nov 8, 2024
When a task restarts, the Nomad client may need to rewrite the Consul token, but
it's created with permissions that prevent a non-root agent from writing to
it. While Nomad clients should be run as root (currently), it's harmless to
allow whatever user the Nomad agent is running as to be able to write to it, and
that's one less barrier to rootless Nomad.

Ref: #23859 (comment)
@tgross tgross force-pushed the b-consul-token-permissions branch from f3fbba2 to 0a369ec Compare November 8, 2024 21:15
@tgross tgross marked this pull request as ready for review November 15, 2024 19:40
@tgross tgross added 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 Nov 19, 2024
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

LGTM!

@tgross tgross merged commit a420732 into main Nov 19, 2024
35 checks passed
@tgross tgross deleted the b-consul-token-permissions branch November 19, 2024 15:21
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.9.x backport to 1.9.x release line theme/consul theme/rootless Run Nomad Client without root type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants