Overview
Polystack Identity uses Fernet tokens by default — stateless, symmetric-key-encrypted tokens that do not require a database lookup on every validation request. This guide covers token format selection, Fernet key rotation procedures, and lifetime configuration. Proper token configuration balances security (short lifetimes) with operational convenience (longer windows for automation pipelines).Token Format Reference
Fernet Key Rotation
Fernet uses a key repository with three key roles:Configure rotation schedule
the deployment console manages Fernet key rotation automatically via a scheduled cron job.
Configure the rotation interval in your deployment globals:
Fernet key rotation schedule
Rotate keys manually
To trigger an immediate rotation outside the scheduled window:After rotation, the deployment console synchronizes the new key set to all Identity API nodes.
Rotate Fernet keys
Verify key synchronization
All nodes must have identical key files:
Check key file timestamps on all nodes
All nodes report the same key files with matching timestamps.
Token Lifetime Configuration
Token lifetime is configured in the deployment console globals. Shorter lifetimes improve security but increase re-authentication overhead for users and automation pipelines.Token lifetime settings
For long-running automation jobs, use application credentials
rather than increasing token lifetime. Application credentials can be scoped, restricted,
and rotated independently of user accounts.
Verify Token Configuration
Issue a token and inspect its expiry
Next Steps
Security Hardening
Enforce MFA requirements and audit token usage patterns.
Architecture
Understand how Fernet keys flow through the distributed Identity service.
Admin Troubleshooting
Diagnose token validation failures caused by key synchronization issues.
Application Credentials
Create long-lived automation credentials as an alternative to extended token lifetimes.
