Skip to content

agent: warn on unauthenticated server join request - #28176

Merged
tgross merged 1 commit into
mainfrom
warn-on-unauthenticated-agent-join
Jun 25, 2026
Merged

tgross merged 1 commit into
mainfrom
warn-on-unauthenticated-agent-join

Conversation

@tgross

@tgross tgross commented Jun 24, 2026 •

Copy link
Copy Markdown
Member

Using the API to join a new server agent via the nomad server join command is currently protected by Serf gossip encryption. Only once the agents are joined in the Serf cluster does mTLS come into play. Although both encryption types have been long-published to be required for secure configuration, we intend to make authentication mandatory for the server join API in a near-future version of Nomad (likely 2.1.0).

Add a warning to the request logs, to the API response, and to the command line when attempting to server join without an agent:write ACL. The warning doesn't specifically refer to this policy just in case we want to invent a new fine-grained capability by the time we remove anonymous access.

Ref: https://hashicorp.atlassian.net/browse/NMD-1507
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064

Testing & Reproduction steps

In addition to unit tests:

# unauthenticated
$ nomad server members
Error querying servers: Unexpected response code: 403 (Permission denied)

$ nomad server join 192.168.1.194:4668
Joined 1 servers successfully but got warning: anonymous server join is deprecated and will be removed in a future version of Nomad

# bootstrap ACLs so we can see the results
$ cat token | nomad acl bootstrap -
$ export NOMAD_TOKEN=$(cat token)

$ nomad server members
Name            Address        Port  Status  Leader  Raft Version  Build      Datacenter  Region
server0.philly  192.168.1.194  4648  alive   false   3             2.0.4-dev  dc1         philly
server1.philly  192.168.1.194  4658  alive   false   3             2.0.4-dev  dc1         philly
server2.philly  192.168.1.194  4668  alive   true    3             2.0.4-dev  dc1         philly

Contributor Checklist

Reviewer Checklist

  • Backport Labels note this will be backported to 2.0.x only because the breaking change will obviously not be backported either
  • Commit Type Ensure the correct merge method is selected which should be "squash and merge"
    in the majority of situations. The main exceptions are long-lived feature branches or merges where
    history should be preserved.
  • Enterprise PRs If this is an enterprise only PR, please add any required changelog entry
    within the public repository.
  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

@tgross tgross added theme/api HTTP API and SDK issues theme/cli type/enhancement backport/2.0.x backport to 2.0.x release line labels Jun 24, 2026
@tgross tgross added this to the 2.0.x milestone Jun 24, 2026
Using the API to join a new server agent via the `nomad server join` command is
currently protected by Serf gossip encryption. Only once the agents are joined
in the Serf cluster does mTLS come into play. Although both encryption types
have been long-published to be required for secure configuration, we intend to
make authentication mandatory for the server join API in a near-future version
of Nomad.

Add a warning to the request logs, to the API response, and to the command line
when attempting to server join without an `agent:write` ACL. The warning doesn't
specifically refer to this policy just in case we want to invent a new
fine-grained capability by the time we remove anonymous access.

Ref: https://hashicorp.atlassian.net/browse/NMD-1507
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064
@tgross
tgross force-pushed the warn-on-unauthenticated-agent-join branch from 3e4ebcb to 35f11d9 Compare June 24, 2026 20:37
@tgross
tgross marked this pull request as ready for review June 24, 2026 20:55
@tgross
tgross requested review from a team as code owners June 24, 2026 20:55

@gulducat gulducat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. I do kinda wonder how many workflows out there lean on the status quo, even just by happenstance.

@schmichael schmichael left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks Tim!

I do kinda wonder how many workflows out there lean on the status quo, even just by happenstance.

We have to assume lots because we just didn't care before. Being lax is great for usability, and this operation is particularly nice to be able to perform unauthenticated because it's probably either being done by automation or a panicked operator. It's never really part of a "normal" workflow where the service or user would be expected to have a token already.

All we can do is add warnings and document document document though. Despite not technically a problem for properly secured clusters, authed-everywhere is the right destination to move toward.

@tgross
tgross merged commit ca1d7ec into main Jun 25, 2026
53 of 54 checks passed
@tgross
tgross deleted the warn-on-unauthenticated-agent-join branch June 25, 2026 13:25
tgross added a commit that referenced this pull request Jun 25, 2026
Using the API to join a new server agent via the `nomad server join` command is
currently protected by Serf gossip encryption. Only once the agents are joined
in the Serf cluster does mTLS come into play. Although both encryption types
have been long-published to be required for secure configuration, we intend to
make authentication mandatory for the server join API in a near-future version
of Nomad.

Add a warning to the request logs, to the API response, and to the command line
when attempting to server join without an `agent:write` ACL. The warning doesn't
specifically refer to this policy just in case we want to invent a new
fine-grained capability by the time we remove anonymous access.

Ref: https://hashicorp.atlassian.net/browse/NMD-1507
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064
tgross added a commit that referenced this pull request Jun 25, 2026
…) (#28179)

Using the API to join a new server agent via the `nomad server join` command is
currently protected by Serf gossip encryption. Only once the agents are joined
in the Serf cluster does mTLS come into play. Although both encryption types
have been long-published to be required for secure configuration, we intend to
make authentication mandatory for the server join API in a near-future version
of Nomad.

Add a warning to the request logs, to the API response, and to the command line
when attempting to server join without an `agent:write` ACL. The warning doesn't
specifically refer to this policy just in case we want to invent a new
fine-grained capability by the time we remove anonymous access.

Ref: https://hashicorp.atlassian.net/browse/NMD-1507
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064

Co-authored-by: Tim Gross <tim@0x74696d.com>
tgross added a commit to hashicorp/web-unified-docs that referenced this pull request Jun 25, 2026
As part of an effort to harden Nomad server join, we're deprecating
the unauthenticated server join API and requiring authentication as of Nomad
2.1.0. In the process, we'll also be removing long-deprecated server
configuration fields related to server join.

Ref: hashicorp/nomad#28176
Ref: https://hashicorp.atlassian.net/browse/NMD-1506
Ref: https://hashicorp.atlassian.net/browse/NMD-1508
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064
aimeeu added a commit to hashicorp/web-unified-docs that referenced this pull request Jul 2, 2026
As part of an effort to harden Nomad server join, we're deprecating the
unauthenticated server join API and requiring authentication as of Nomad
2.1.0. In the process, we'll also be removing long-deprecated server
configuration fields related to server join. This changeset also updates
documentation for the join process to steer users into the right
direction for the future deprecation.

(Note: no backports on this.)

Ref: hashicorp/nomad#28176
Ref: https://hashicorp.atlassian.net/browse/NMD-1506
Ref: https://hashicorp.atlassian.net/browse/NMD-1508
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064

## Contributor checklists

Review urgency:

- [ ] ASAP: Bug fixes, broken content, imminent releases
- [x] 3 days: Small changes, easy reviews
- [ ] 1 week: Default expectation
- [ ] Best effort: No urgency

Pull request:

- [x] Verify that the PR is set to merge into the correct base branch
- [x] Verify that all status checks passed
- [x] Verify that the preview environment deployed successfully
- [ ] Add additional reviewers if they are not part of assigned groups

Content:

- [x] I added redirects for any moved or removed pages
- [x] I followed the [Education style
guide](https://github.com/hashicorp/web-unified-docs/tree/main/docs/style-guide)
- [x] I looked at the local or Vercel build to make sure the content
rendered correctly

## Reviewer checklist

- [ ] This PR is set to merge into the correct base branch.
- [ ] The content does not contain technical inaccuracies.
- [ ] The content follows the Education content and style guides.
- [ ] I have verified and tested changes to instructions for end users.
mismithhisler pushed a commit that referenced this pull request Jul 15, 2026
Using the API to join a new server agent via the `nomad server join` command is
currently protected by Serf gossip encryption. Only once the agents are joined
in the Serf cluster does mTLS come into play. Although both encryption types
have been long-published to be required for secure configuration, we intend to
make authentication mandatory for the server join API in a near-future version
of Nomad.

Add a warning to the request logs, to the API response, and to the command line
when attempting to server join without an `agent:write` ACL. The warning doesn't
specifically refer to this policy just in case we want to invent a new
fine-grained capability by the time we remove anonymous access.

Ref: https://hashicorp.atlassian.net/browse/NMD-1507
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064
tgross added a commit that referenced this pull request Sep 11, 2026
tgross added a commit that referenced this pull request Sep 15, 2026
schmichael pushed a commit to vercel/nomad that referenced this pull request Sep 25, 2026
Using the API to join a new server agent via the `nomad server join` command is
currently protected by Serf gossip encryption. Only once the agents are joined
in the Serf cluster does mTLS come into play. Although both encryption types
have been long-published to be required for secure configuration, we intend to
make authentication mandatory for the server join API in a near-future version
of Nomad.

Add a warning to the request logs, to the API response, and to the command line
when attempting to server join without an `agent:write` ACL. The warning doesn't
specifically refer to this policy just in case we want to invent a new
fine-grained capability by the time we remove anonymous access.

Ref: https://hashicorp.atlassian.net/browse/NMD-1507
Ref: https://hashicorp.atlassian.net/browse/SECVULN-44064
schmichael pushed a commit to vercel/nomad that referenced this pull request Sep 25, 2026

This branch was successfully deployed

1 active deployment
Preview — 35f11d90 Deployed Jun 24, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport/2.0.x backport to 2.0.x release line theme/api HTTP API and SDK issues theme/cli type/enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants