A Periodic Token is a service token that stays valid as long as you keep explicitly renewing it. It is well suited to long-running daemons and agents.
At the same time, you need solid operations, monitoring, and governance to contain the blast radius when renewals fail or a token is stolen.
A Periodic Token is a variant of service token that requires an explicit renewal on every period. As long as you renew before expiry, it never hits a max TTL and never ages out. If a renewal fails, the token is invalidated immediately.
There are two main ways to create one. Either issue it via auth/token with an explicit period, or set token_period on the role of an auth method (such as AppRole or Kubernetes) and let it issue Periodic tokens. Both produce service tokens — Batch Tokens cannot be made Periodic.
Combining Periodic with orphan (no parent/child relationship) shields the token from parent revocation cascades, which is ideal for stable long-lived operation. The token is still affected by explicit revocation, role changes, and policy updates.
| Item | Periodic Service | Regular Service | Batch |
|---|---|---|---|
| Renewable? | Yes (must renew before expiry) | Yes (capped by max_ttl) | No |
| Lifetime | Unlimited (as long as you keep renewing) | From ttl up to max_ttl | Fixed ttl only |
| Use case | Long-lived daemons and Agent | General apps, short-to-medium lifetime | High-throughput, ephemeral |
| Creation example | period flag / token_period | ttl/max_ttl flags | token_type=batch |
| Parent/child | Optional (orphan recommended) | Parent/child tree (default) | None (lightweight) |
Basic creation and inspection (CLI)
vault token create -policy=app -period=24h -orphan
vault token lookup <TOKEN>
# Example output: renewable: true, period: 24h, orphan: trueStable operation of long-lived tokens requires automating renewal — never rely on humans. Use Vault Agent's Auto-Auth plus automatic renewal and hand the token to your app safely via a file sink or environment variable. On Kubernetes, the sidecar pattern is the clearest fit; systemd services can host the same long-running renewal loop.
Choose the parent/child relationship based on operational policy. Use orphan when you do not want the token disrupted by rotation of a parent token or upstream job. Skip orphan and keep the hierarchy when you want a single upstream revocation to bring everything down.
Periodic Token acquisition and renewal flow (orphan recommended)
Automatic renewal with Vault Agent (excerpt)
auto_auth {
method "approle" {
mount_path = "auth/approle"
config = {
role_id_file_path = "/etc/vault/role_id"
secret_id_file_path = "/etc/vault/secret_id"
}
}
sink "file" {
config = { path = "/run/secrets/vault.token" }
}
}
cache { use_auto_auth_token = true }When creating directly via auth/token, set period. For repeatable operations, the standard approach is to define a role under auth/token/roles and issue from that role. Auth method roles such as Kubernetes and AppRole also support a token_period setting.
Renewing with renew-self (the token's own renewal) is the safest path. Renewing someone else's token requires privileged access to auth/token/renew.
CLI and HTTP API examples
# 1) Create a token role (forcing periodic)
vault write auth/token/roles/longlife \
allowed_policies="app" \
orphan=true \
period=24h
# 2) Issue a periodic token from the role
vault token create -role=longlife
# 3) Create one with period directly (if you have the capability)
vault token create -policy=app -period=24h -orphan
# 4) Renew (yourself)
VAULT_TOKEN=<TOKEN> vault token renew -increment=24h
# 5) Renewing over the HTTP API (self)
curl -s \
--header "X-Vault-Token: $TOKEN" \
--request POST \
--data '{"increment":"24h"}' \
"$VAULT_ADDR/v1/auth/token/renew-self"
# 6) Set period on the AppRole role instead
vault write auth/approle/role/webapp \
token_policies="app" \
token_type="service" \
token_period="24h"
# 7) Inspect the token
vault token lookup $TOKENThe key to stable Periodic Token operation is monitoring whether renewals reliably succeed well before the deadline. With Agent, watch the process and its logs; with direct in-app renewal, wire up metrics and alerts. Track success of auth/token/renew-self in Vault's audit logs and keep a runbook ready for failover and re-acquisition when something goes wrong.
Common failure modes include accidentally using a non-renewable token (Batch or renewable=false), getting caught up in a parent token revocation, mis-specifying the increment, clock skew, and network partitions.
Choosing between self-renewal and renewing other tokens (policy and API)
# Renewing yourself (no privilege needed, as long as renewable=true)
curl -s -H "X-Vault-Token: $TOKEN" -X POST \
-d '{"increment":"12h"}' \
"$VAULT_ADDR/v1/auth/token/renew-self"
# Renewing another token is an admin operation (needs sudo-equivalent rights)
# A reference policy (keep it tightly scoped)
path "auth/token/renew" {
capabilities = ["update", "sudo"]
}
# Inspect the token attributes
curl -s -H "X-Vault-Token: $TOKEN" \
"$VAULT_ADDR/v1/auth/token/lookup-self"Long-lived tokens magnify the impact of theft, so minimize the distribution and storage paths and enforce strict least-privilege policies. Where CIDR or num_uses constraints apply, layer them on to further reduce risk.
Periodic Tokens cannot be combined with max_ttl or explicit_max_ttl. In role settings, token_period and token_max_ttl are mutually exclusive. If you need a lifecycle with a hard cap, use a regular service token.
For organizational governance, formalize role-definition review, audit-log preservation, and the leak-response process (auth/token/revoke-self plus immediate role rotation).
Least-privilege policy example (HCL)
path "secret/data/app/*" {
capabilities = ["read", "list"]
}
# Allow self-renewal only (self depends on per-token evaluation)
path "auth/token/renew-self" {
capabilities = ["update"]
}
# Apply CIDR restrictions on the role or at token creation (example)
# vault write auth/token/roles/longlife token_bound_cidrs="10.0.0.0/8,192.168.0.0/16"Periodic Tokens are service tokens with no maximum lifetime as long as you keep renewing them. Batch Tokens are non-renewable and cannot be made Periodic. Lock down the precise meaning of token_period on a role, period on auth/token, and orphan.
The difference between renew-self and renew, the impact of parent/child relationships, and whether Vault Agent automates renewal come up frequently at the Associate and Ops levels.
Cheat Sheet
# Issuing a periodic token (via a role)
vault write auth/token/roles/ll allowed_policies=app orphan=true period=24h
vault token create -role=ll
# Issuing a periodic token (via an AppRole role)
vault write auth/approle/role/app token_type=service token_period=24h token_policies=app
# Self-renew and verify
vault token renew -increment=24h $TOKEN
vault token lookup $TOKENAssociate / Ops
Question 1
You want a long-running daemon to maintain its credentials safely throughout operation, unaffected by renewals or revocations of any upstream token, and renewed automatically for stable long-term operation. Which configuration is the best fit?
Correct answer: A
To balance long lifetime with safety, the standard play is to set period on a service-type Periodic Token, isolate it with orphan, and automate renew-self via Vault Agent or similar. Batch is non-renewable, reusing a root token is unacceptable, and stretching a regular token's max_ttl carries both expiration risk and governance problems.
How long does a Periodic Token stay valid?
It stays valid indefinitely with no max TTL as long as the client keeps renewing inside the period. The token becomes invalid the moment a renewal fails.
Can a Periodic Token be combined with token_max_ttl?
No. token_period (or period) and the max_ttl family are mutually exclusive at the role or issue-time level. If you need a hard upper bound on the lifetime, use a regular service token instead.
Can a Batch Token be made Periodic?
No. Batch Tokens are lightweight, non-renewable, and fixed-TTL by design. Only service tokens support the Periodic mode.
Practice with certification-focused question sets
Try free questionsNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Vault Core Concepts: Sealed/Unsealed, Auth, Secrets (2026)
Vault fundamentals — sealed/unsealed state, auth methods, se...
Vault Operations Professional (VOP-003): Complete Guide (2026)
Pass the Vault Operations Professional exam — enterprise pat...
Vault Path-Based Routing: API URL Structure (2026)
How Vault's path-based routing works — mount points, sub-pat...
Vault Tokens: Auth Token Mechanics (2026)
Token fundamentals — service vs. batch tokens, accessor, ren...
Vault Token Types: Service, Batch, Periodic (2026)
Service vs. batch tokens compared — performance, ACL behavio...