Skip to content

Support uploading client ACL tokens - #27741

Merged
allisonlarson merged 7 commits into
mainfrom
f-provide-client-tokens
May 22, 2026
Merged

allisonlarson merged 7 commits into
mainfrom
f-provide-client-tokens

Conversation

@allisonlarson

@allisonlarson allisonlarson commented Mar 24, 2026 •

Copy link
Copy Markdown
Contributor

Description

Adds support for uploading client ACL tokens by supplying the accessorID and secretID during creation. The command nomad acl token create now takes an optional -accessor flag, and the secretID is provided either by a filepath or through stdin (-), following how nomad acl bootstrap accepts the secretID. If the accessor is provided, the secretID is required; similarly, if the secretID is passed, the accessor is required. Management tokens are not allowed to be uploaded in this way.

I've added a new ACLTokens.Upload function to the api package for clarity and clear validation message, but it still uses the same http path & requests. I can collapse this into the same ACLTokens.Create, but the specificity felt nicer.

Testing & Reproduction steps

tests were added, and tested manually

Links

Issue: #24457
Internal ref: https://hashicorp.atlassian.net/browse/NMD-352

Contributor Checklist

  • Changelog Entry If this PR changes user-facing behavior, please generate and add a
    changelog entry using the make cl command.
  • Testing Please add tests to cover any new functionality or to demonstrate bug fixes and
    ensure regressions will be caught.
  • Documentation If the change impacts user-facing functionality such as the CLI, API, UI,
    and job configuration, please update the Nomad product documentation, which is stored in the
    web-unified-docs repo. Refer to the web-unified-docs contributor guide for docs guidelines.
    Please also consider whether the change requires notes within the upgrade
    guide
    . If you would like help with the docs, tag the nomad-docs team in this PR.

Reviewer Checklist

  • Backport Labels Please add the correct backport labels as described by the internal
    backporting document.
  • 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 the backport/2.0.x backport to 2.0.x release line label May 19, 2026
tgross
tgross previously approved these changes May 19, 2026

@tgross tgross 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've left a few minor comments but once those are resolved this should be ready-to-go!

Comment thread command/acl_token_create.go Outdated
Comment thread command/agent/acl_endpoint_test.go Outdated
Comment thread command/agent/acl_endpoint_test.go Outdated
Comment thread command/agent/acl_endpoint_test.go Outdated
Comment thread command/agent/acl_endpoint_test.go Outdated
Comment thread nomad/acl_endpoint_test.go Outdated
@tgross tgross modified the milestones: 2.0.1, 2.0.x May 19, 2026
@allisonlarson

Copy link
Copy Markdown
Contributor Author

@tgross All updated & ready for another look. I'm not sure why I didn't catch the testing library mishap during the original dev; thank you for pointing it out! I also added an UUID check where you suggested.

@tgross tgross 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!

@allisonlarson
allisonlarson merged commit faf1833 into main May 22, 2026
39 checks passed
@allisonlarson
allisonlarson deleted the f-provide-client-tokens branch May 22, 2026 17:38
aimeeu added a commit to hashicorp/web-unified-docs that referenced this pull request Jun 2, 2026
<!--
**Merge branch**

Make sure you create your PR against the correct **base** branch. For
instructions, refer to
GitHub's **Change the branch range and destination repository guide**
(https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).

If your content is an update to:

- Currently published content

Choose **base: main** when you are updating published documentation, and
you
want your changes published when the PR is merged. We publish Nomad
content
  from the `main` branch.

- Upcoming Nomad release

Choose the branch for the Nomad release that your content is for. Nomad
release branches use the `nomad/<exact-release-number>` format. If you
are not
able to find the upcoming Nomad release branch that you are looking for,
  contact the tech writer that works with the Nomad team.

- Upcoming Nomad release but not sure which one

  - Choose the `main` branch.
  - Add the "do not merge" label.
  - Convert the PR to a DRAFT.
  - Put an explanation in the **Description** section.

  The tech writer coordinates with Nomad engineering and updates
the docs PR base branch when the code is slotted into an upcoming
release.

**Backports**

This repo stores previous version docs in folders instead of branches.
There are
no backport labels. If you backported your code PR to previous branches,
update
the docs content in the corresponding folders. For example, if the
current
release is 1.10.x and you backported your code to 1.9.x and 1.8.x,
update the docs content
in the v1.10.x, v1.9.x, and v1.8.x folders. If you can't find the
relevant files in previous versions,
add a note to your PR description. The tech writer will help ensure that
the previous versions
receive the correct updates.
-->

## Description

<!-- 
Please describe why you're making this change and point out any
important details the reviewers
should be aware of. A robust description helps the tech writer create a
fabulous release note.
If your code PR has a splendid description, link to the code PR in the
links section so that
the tech writer can update this PR's description. 

Include the target release as well as prior versions if applicable.
-->

Adds information about how to upload client ACL tokens using the `acl
token create` command

## Links
<!--
**Please link to the related Nomad repo code PR!** if there is one. 
The tech writer does look at the code PR description, Jira ticket,
and/or GH issue before reviewing docs content.

Include links to GitHub issues, documentation, or similar which is
relevant to this PR. If
this is a docs bug fix, please ensure related issues are linked so they
will close when this PR is
merged.

// GH-Jira integration generates the link and updates the Jira ticket.
Jira: [<jira-ticket-number>]  // for example, Jira: [NMD-1234] 

GitHub Issue: <issue-link>

Deploy previews: The bot does publish a root-level link to the deploy
preview, but the preview URL changes with each build.
-->

Nomad Code PR: hashicorp/nomad#27741
Jira: https://hashicorp.atlassian.net/browse/NMD-352
GitHub Issue: hashicorp/nomad#24457

## Contributor checklists

Review urgency:

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

Pull request:

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

Content:

- [ ] I added redirects for any moved or removed pages
- [ ] I followed the [Education style
guide](https://github.com/hashicorp/web-unified-docs/tree/main/docs/style-guide)
- [ ] 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.


[NMD-1234]:
https://hashicorp.atlassian.net/browse/NMD-1234?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
@github-actions

Copy link
Copy Markdown

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Sep 25, 2026

This branch was successfully deployed

1 active deployment
Preview — 485bf414 Deployed May 21, 2026 by vercel[bot]
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/2.0.x backport to 2.0.x release line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants