Skip to main content

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).
Administrator Access Required — This operation requires the admin role. Contact your Polystack administrator if you do not have sufficient permissions.

Token Format Reference

Fernet is the recommended format for all deployments. JWT tokens are useful when you need to validate tokens outside of Polystack (e.g., in a sidecar proxy or API gateway).

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:
Rotate Fernet keys
After rotation, the deployment console synchronizes the new key set to all Identity API nodes.

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.
Rotate keys on all Identity API nodes simultaneously. Keys not in sync across nodes cause token validation failures. The deployment console’s rotation playbook handles synchronization automatically.

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.