Consul ACL Tokens
Command: consul acl token
The acl token
command is used to manage Consul's ACL tokens.
It exposes commands for creating, updating, reading, deleting, and listing tokens.
This command is available in Consul 1.4.0 and newer.
ACL tokens may also be managed via the HTTP API.
Note: All of the example subcommands in this document will require a valid
Consul token with the appropriate permissions. Either set the
CONSUL_HTTP_TOKEN
environment variable to the token's secret ID or pass the
secret ID as the value of the -token
parameter.
Usage
Usage: consul acl token <subcommand>
For the exact documentation for your Consul version, run consul acl token -h
to view the complete list of subcommands.
For more information, examples, and usage about a subcommand, click on the name of the subcommand in the sidebar.
Identifying Tokens
Several of the subcommands need to operate on a specific token. Those
subcommands support specifying the token by its ID using the -id
parameter.
The ID may be specified as a unique UUID prefix instead of the entire UUID. As
long as it is unique it will be resolved to the full UUID and used. Additionally
builtin token names will be accepted as the value of the -id
.
Builtin Tokens:
Token UUID | Token Name |
---|---|
00000000-0000-0000-0000-000000000002 | anonymous |
Basic Examples
Create a new ACL token:
List all tokens:
Update a token:
Read a token with an accessor ID:
Delete a token