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

cli: remove default for ACL token type on update #18689

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/18689.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
cli: Fixed an unexpected behavior of the `nomad acl token update` command that could cause a management token to be downgraded to client on update
```
4 changes: 2 additions & 2 deletions command/acl_token_update.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Update Options:
Sets the human readable name for the ACL token.
-type="client"
Sets the type of token. Must be one of "client" (default), or "management".
Sets the type of token. Must be one of "client" or "management".
-global=false
Toggles the global mode of the token. Global tokens are replicated to all regions.
Expand Down Expand Up @@ -70,7 +70,7 @@ func (c *ACLTokenUpdateCommand) Run(args []string) int {
flags := c.Meta.FlagSet(c.Name(), FlagSetClient)
flags.Usage = func() { c.Ui.Output(c.Help()) }
flags.StringVar(&name, "name", "", "")
flags.StringVar(&tokenType, "type", "client", "")
flags.StringVar(&tokenType, "type", "", "")
flags.BoolVar(&global, "global", false, "")
flags.Var((funcVar)(func(s string) error {
policies = append(policies, s)
Expand Down
3 changes: 1 addition & 2 deletions website/content/docs/commands/acl/token/update.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ The `acl token update` command requires an existing token's accessor ID.

- `-name`: Sets the human readable name for the ACL token.

- `-type`: Sets the type of token. Must be one of "client" (default), or
"management".
- `-type`: Sets the type of token. Must be one of "client" or "management".

- `-global`: Toggles the global mode of the token. Global tokens are replicated
to all regions. Defaults false.
Expand Down
Loading