What Are Batch Tokens?
Batch tokens are encrypted binary large objects (BLOBs) that Vault issues directly to clients without persisting them to storage. They excel in scenarios requiring:- High-volume cryptographic operations (e.g., Transit encrypt/decrypt)
- Frequent KV reads and writes
- Replication to performance and DR clusters

Batch tokens are never written to the storage backend. This makes them faster to create and cheaper to replicate across performance clusters.
Service Tokens vs. Batch Tokens
Batch tokens trade off some features for speed and replication agility. Key differences include:- Renewability & Revocation: Batch tokens are not renewable, listable, or manually revocable.
- Accessors & Cubbyholes: They lack token accessors and cubbyholes.
- Child Tokens: You cannot create child tokens from batch tokens.
- TTL Configuration: No periodic issuance or explicit max TTL.
- Replication: Orphan batch tokens replicate to performance and DR clusters; non-orphans do not.


Identifying Token Types
Starting with Vault 1.10, tokens are prefixed to indicate their type:| Prefix | Token Type |
|---|---|
| hvs. | Service Token |
| hvb. | Batch Token |
| hvr. | Recovery Token |


Batch Token Replication
Vault supports two replication modes for batch tokens:Non-Orphan Tokens
Batch tokens created with a parent token remain bound to the original cluster. Performance secondaries cannot validate the parent, so these tokens do not replicate.
Orphan Tokens
Orphan batch tokens have no parent and are automatically replicated to all performance and DR clusters. Use these when you need a single token valid across multiple clusters.
Creating Batch Tokens
Direct Token Creation
Use thevault token create command:
The
-orphan=true flag ensures this token replicates across performance and DR clusters.Via AppRole
Configure an AppRole to issue batch tokens:DR Operations Batch Token
A DR operations batch token lets you promote a DR secondary without needing unseal or recovery keys. Grant it the following permissions:
- Create an orphan batch token with the
dr-opspolicy: - Use it to promote the DR secondary:
Summary
- Batch tokens are lightweight, non-persistent tokens for high-throughput workloads.
- Only orphan batch tokens replicate to performance and DR clusters.
- Token prefixes (
hvs.,hvb.,hvr.) and lengths help identify types. - Create batch tokens directly or via auth methods like AppRole.
- Use DR operations batch tokens to streamline disaster recovery promotions.