Table of Contents
- Overview of Token Authentication
- Logging In with a Token
- Copying Your Active Token
- Examples: CLI & API Usage
- References
Overview of Token Authentication
Vault’s Token auth method is the simplest form of authentication. It’s most commonly used when:- You have the initial root token after deploying a new Vault cluster.
- You generated a token via the Vault CLI or another auth method.
Treat Vault tokens like passwords. Never share them publicly or commit them to version control. Always store tokens securely (e.g., in a secrets manager).
Logging In with a Token
Follow these steps to authenticate in the Vault UI using a token:| Step | Action |
|---|---|
| 1 | Navigate to the Vault UI and click Token under “Authenticate”. |
| 2 | Paste your token into the input field. |
| 3 | Click Sign In to access the UI. |
Copying Your Active Token
After signing in (via Token, LDAP, Okta, OIDC, etc.), you can quickly retrieve your current token for use in scripts or API calls:- Click the user menu in the top-right corner of the Vault UI.
- Select Copy Token.
Copying the token from the UI is ideal for one-off CLI commands or testing API endpoints without re-authenticating.