Why Use Orphan Tokens?
| Token Type | Parent Relationship | Expiry Behavior |
|---|---|---|
| Child Token | Linked | Expires automatically when its parent token expires. |
| Orphan Token | Unlinked | Expires only when its own TTL elapses or isn’t renewed. |
Orphan tokens can still be revoked manually or automatically when their own
max_ttl is reached. Make sure to configure TTL settings according to your security requirements.Required Privileges
To create an orphan token, your Vault policy must grant access to theauth/token/create-orphan endpoint with sudo capabilities, along with general token creation rights:
Creating orphan tokens typically requires a root token or a token with elevated
sudo privileges. Use with caution to avoid unintended privilege escalation.Creating an Orphan Token
Run thevault token create command with the -orphan flag to generate an orphan token. You can also attach policies at creation:
Inspecting an Orphan Token
Verify that your token is indeed an orphan by usingvault token lookup:
orphan = true field confirms the token is not part of the parent–child hierarchy.