consul/website/pages/commands/acl/set-agent-token.mdx
Jasmine W a9df6ac50b
docs: update structure (#8506)
- moved and renamed files/folders based on new structure
- updated docs navigation based on new structure
- moved CLI to top nav (created commands.jsx and commands-navigation.js)
- updated and added redirects
- updating to be consistent with standalone categories
- changing "overview" link in top nav to lead to where intro was moved (docs/intro)
- adding redirects for intro content
- deleting old intro folders
- format all data/navigation files
- deleting old commands folder
- reverting changes to glossary page
- adjust intro navigation for removal of 'vs' paths
- add helm page redirect
- fix more redirects
- add a missing redirect
- fix broken anchor links and formatting mistakes
- deleted duplicate section, added redirect, changed link
- removed duplicate glossary page
2020-09-01 11:14:13 -04:00

50 lines
1.5 KiB
Plaintext

---
layout: commands
page_title: 'Commands: ACL Set Agent Token'
sidebar_title: set-agent-token
---
# Consul ACL Set Agent Token
Command: `consul acl set-agent-token`
This command updates the ACL tokens currently in use by the agent. It can be used to introduce
ACL tokens to the agent for the first time, or to update tokens that were initially loaded from
the agent's configuration. Tokens are not persisted, so will need to be updated again if the
agent is restarted.
## Usage
Usage: `consul acl set-agent-token [options] TYPE TOKEN`
### Token Types
- `default` - The default token is the token that the agent will use for
both internal agent operations and operations initiated by the HTTP
and DNS interfaces when no specific token is provided. If not set the
agent will use the anonymous token.
- `agent` - The token that the agent will use for internal agent operations.
If not given then the default token is used for these operations.
- `master` - This sets the token that can be used to access the Agent APIs in
the event that the ACL datacenter cannot be reached.
- `replication` - This is the token that the agent will use for replication
operations. This token will need to be configured with read access to
whatever data is being replicated.
### API Options
@include 'http_api_options_client.mdx'
@include 'http_api_options_server.mdx'
## Examples
Set the `default` token:
```shell-session
$ consul acl set-agent-token default c4d0f8df-3aba-4ab6-a7a0-35b760dc29a1
```