Key Concepts
Authentication
Tokens authenticate requests to Vault. No token means no access.
Policies
Tokens inherit permissions from attached policies. More policies = more access.
TTL (Time To Live)
Tokens expire after their TTL. Renewable tokens can extend their lifetime.
Accessors
Public identifiers for tokens. Used to manage tokens without exposing the secret.
Token Properties
| Property | Description |
|---|---|
| Accessor | Public identifier for the token (safe to log/store) |
| Display Name | Human-readable label for identification |
| Policies | List of policies granting permissions |
| TTL | Time until token expires |
| Renewable | Whether the token can be renewed |
| Token Type | Service (default) or batch |
| Num Uses | Maximum number of times token can be used |
Required Permissions
| Action | Permission |
|---|---|
| View tokens | iam:project:cicd:vault:read |
| Create/Renew tokens | iam:project:cicd:vault:write |
| Revoke tokens | iam:project:cicd:vault:delete |
How to Create a Token
Configure Token Information
- Display Name: Human-readable identifier (e.g.,
ci-pipeline-token) - Policies: Comma-separated list of policies (e.g.,
default, app-read)
Set Time & Limits
- TTL: Token lifetime (e.g.,
24h,7d,30d) - Period: For periodic tokens (renewable indefinitely)
- Max TTL: Absolute maximum lifetime
- Num Uses: Limit usage count (0 = unlimited)
- Renewable: Toggle to allow renewal
TTL Format Reference
| Format | Example | Meaning |
|---|---|---|
| Hours | 24h | 24 hours |
| Days | 7d | 7 days |
| Weeks | 2w | 2 weeks |
| Months | 1M | 1 month |
| Years | 1y | 1 year |
| Combined | 1d12h | 1 day and 12 hours |
Token Types
Service Tokens (Default)
- Stored in Vault’s storage backend
- Can create child tokens
- Support all token features
- Best for: Long-lived applications, users
Batch Tokens
- Not stored in Vault (stateless)
- Cannot create child tokens
- Cannot be renewed
- Best for: High-performance, short-lived operations
How to Renew a Token
Renewable tokens can extend their TTL before expiration.Renewal extends the TTL by the token’s original TTL duration, up to the explicit max TTL if set. Non-renewable tokens cannot be renewed.
How to Revoke a Token
Revoked tokens immediately become invalid.Common Token Patterns
CI/CD Pipeline Token
Application Service Token
One-Time Bootstrap Token
Developer Token
Metadata Best Practices
Use metadata for:- Audit trail and compliance
- Token ownership tracking
- Debugging and troubleshooting
- Automated cleanup policies
Troubleshooting
Token not appearing in list
Token not appearing in list
- Refresh the page or click the refresh button
- Tokens may take a moment to propagate
- Verify you’re viewing the correct Vault instance
Cannot create token
Cannot create token
- You need write permission for Vault tokens
- The Vault instance must be active and reachable
- Check that policies specified exist
Token expired immediately
Token expired immediately
- TTL may have been set too short
- Server time may be out of sync
- Max TTL on the auth method may limit token lifetime
Cannot renew token
Cannot renew token
- Token may not be renewable (check the Renewable column)
- Token may have reached its explicit max TTL
- Batch tokens cannot be renewed
Lost token value
Lost token value
- Token values cannot be retrieved after creation
- Create a new token with the same configuration
- Revoke the lost token to prevent unauthorized use
Permission denied with valid token
Permission denied with valid token
- Check that required policies are attached
- Verify policies grant access to the specific path
- Token may have been revoked by another admin
FAQ
What's the difference between TTL and Max TTL?
What's the difference between TTL and Max TTL?
TTL is the initial lifetime. When renewed, the TTL resets. Max TTL is the absolute limit - the token cannot exist beyond this time regardless of renewals.
What is a periodic token?
What is a periodic token?
A token with a
period set. Instead of expiring, it must be renewed within each period. As long as it’s renewed, it lives indefinitely. Useful for long-running services.Should I use service or batch tokens?
Should I use service or batch tokens?
Use service tokens for most cases. Use batch tokens only for high-throughput scenarios where you need stateless tokens and don’t need renewal or child tokens.
What happens to child tokens when parent is revoked?
What happens to child tokens when parent is revoked?
All child tokens are automatically revoked. This is called “token revocation tree” behavior.
Can I see what a token can access?
Can I see what a token can access?
Check the attached policies. Each policy defines path-based permissions. Use the Policies page to review what each policy allows.
How do I rotate a token?
How do I rotate a token?
Create a new token with the same configuration, update your application to use it, then revoke the old token. There’s no in-place rotation.