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:
Once authenticated, you’ll see the Vault dashboard and can begin managing secrets, policies, and more.
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.