Before deploying FrontMCP authentication to production, review this comprehensive checklist covering security, configuration, and operational requirements.Documentation Index
Fetch the complete documentation index at: https://docs.agentfront.dev/llms.txt
Use this file to discover all available pages before exploring further.
Pre-Deployment Checklist
Configure Persistent Token Storage
Replace in-memory storage with Redis or another persistent store.
Enable Refresh Token Flow
For In remote mode, token TTLs are controlled by the upstream identity provider — FrontMCP does not mint its own access/refresh tokens. In local mode, FrontMCP acts as the authorization server and mints its own tokens (signed with
local and remote modes, opt into automatic token refresh.local.signKey).Security Requirements
Required
HTTPS only - Never expose auth endpoints over HTTP in production
Persistent token storage - Redis with TLS for multi-instance deployments
Stable signing keys - Provide keys via environment or secrets manager
PKCE enforcement - OAuth 2.1 requires PKCE (S256 only)
Refresh token rotation - Always rotate refresh tokens on use
Audience validation - Validate
aud claim in transparent modeRecommended
Machine ID - Set
MACHINE_ID env var for multi-instance session portabilityRate limiting - Protect token endpoints from brute force
Monitoring - Alert on auth failures, unusual patterns
Key rotation - Rotate signing keys periodically (30-90 days)
Scope minimization - Request only necessary scopes
Consent UI - Let users see what they’re authorizing
Configuration Reference
Minimum Production Configuration
Environment Variables
Token Lifetime Guidelines
| Environment | Access Token | Refresh Token | Rationale |
|---|---|---|---|
| Development | 1 hour | 7 days | Developer convenience |
| Staging | 30 min | 7 days | Balance testing/security |
| Production | 15 min | 7-30 days | Security with usability |
| High Security | 5 min | 1 day | Minimize exposure window |
Key Management
Generating Production Keys
Key Rotation Strategy
Configuration for Key Rotation
Thelocal block accepts a single signKey (and optional jwks containing previous keys for validation during rollover). Rotation is performed by deploying a new server build with an updated signKey while keeping the old key in jwks until in-flight tokens expire.
Redis Configuration
Secure Redis Connection
Redis Data Stored
| Key Pattern | Data | TTL |
|---|---|---|
{prefix}pending:{id} | Pending authorization | 10 min |
{prefix}code:{code} | Authorization code | 60 sec |
{prefix}refresh:{token} | Refresh token | 7-30 days |
{prefix}session:{id} | Session data | Configurable |
{prefix}vault:{session} | Token vault | Session TTL |
Monitoring & Alerting
Key Metrics to Monitor
| Metric | Alert Threshold | Description |
|---|---|---|
| Auth failures/min | > 100 | Possible brute force |
| Token refresh rate | > 10x normal | Possible token theft |
| JWKS fetch errors | Any | IdP connectivity issue |
| Redis connection errors | Any | Storage unavailable |
| Token issuance latency | > 500ms | Performance degradation |
Logging Configuration
Common Production Issues
Tokens invalid after deployment
Tokens invalid after deployment
Cause: Auto-generated keys changed after restart.Solution: Provide persistent signing keys via environment variable:
Session not found errors across instances
Session not found errors across instances
Cause: Using in-memory storage with multiple instances.Solution: Configure shared Redis storage:
JWKS fetch fails intermittently
JWKS fetch fails intermittently
Cause: Network issues or IdP rate limiting.Solution:
- Increase JWKS cache TTL
- Consider inline JWKS for critical IdPs
- Add retry logic with exponential backoff
High latency on token endpoint
High latency on token endpoint
Cause: Redis connection issues or key generation overhead.Solution:
- Use Redis connection pooling
- Pre-generate signing keys (don’t generate on-demand)
- Monitor Redis latency
Security Hardening
Disable Insecure Options
providerConfig:
HTTP Security Headers
Configure your reverse proxy to add security headers:Rate Limiting
FrontMCP includes a built-in session rate limiter with a sliding window algorithm:| Setting | Default | Description |
|---|---|---|
| Window | 60 seconds | Sliding window duration |
| Max requests | 100 | Maximum requests per window per key |
| Cleanup interval | Configurable | Auto-cleanup of expired entries |
wouldAllow(key)— pre-check without consuming quotagetStats()— monitoring statistics
Deployment Patterns
- Single Instance
- Multi-Instance
- Stateless
Quick Reference
OAuth 2.1 Compliance Checklist
PKCE required for all clients (S256 only)
Refresh token rotation enabled
No implicit grant flow
Authorization codes single-use
Redirect URI exact match
State parameter required
Pre-Production Verification
Next Steps
Authorization Modes
Choose the right mode for your deployment
Tokens & Sessions
Configure token lifetimes and storage
Local OAuth
Built-in OAuth server setup
Remote OAuth
External IdP integration