Rotation Strategies
Regularly rotating credentials and configurations is critical for security. KnoxCall provides tools to rotate everything with minimal downtime.What Can Be Rotated?
KnoxCall supports rotating:- 🌐 Subdomain Hash: Regenerate your tenant’s unique subdomain URL
- 🔑 API Keys: Create new keys, revoke old ones
- 🔐 Secrets: Add new versions of encrypted credentials
- 🛣️ Routes: Duplicate route configurations
- 🌍 Environments: Clone environment overrides
Why Rotate?
Security Best Practices
Rotate when:- ✅ Credentials are compromised or suspected compromise
- ✅ Employee leaves or loses access
- ✅ Compliance requirements (e.g., 90-day rotation)
- ✅ Moving from development to production
- ✅ Deprecating old integration
- 🔒 Limit window of exposure from leaked credentials
- 📊 Audit trail of when credentials changed
- 🎯 Zero-trust architecture (regular rotation = no long-lived secrets)
- 🛡️ Compliance with security frameworks (SOC 2, ISO 27001)
Rotation Strategy 1: Subdomain Hash
What It Is
Your KnoxCall tenant has a unique subdomain:https://a1b2c3d4.DunderMifflin.knoxcall.com
Rolling the subdomain hash regenerates the {hash} portion with a new random value.
When to Roll
Rotate subdomain hash when:- 🚨 Subdomain leaked publicly (e.g., hardcoded in open-source repo)
- 🔒 Maximum security required (prevents URL-based attacks)
- 🏢 Transferring tenant ownership
- ⚠️ Active integrations depend on the URL
- ⚠️ No security incident occurred
How to Roll Subdomain Hash
Step 1: Document All Integrations
Before rolling, list everywhere the subdomain is used: Example checklist:- Production server API calls (EC2 instance)
- Staging server API calls
- Development laptops
- Mobile app config
- CI/CD pipelines
- Monitoring tools (Datadog, New Relic)
- Documentation/wiki pages
Step 2: Navigate to Profile
- Go to Settings (gear icon in sidebar)
- Scroll to Base URL section
- Current subdomain is displayed:
Step 3: Click “Roll Base URL”
You’ll see two confirmation dialogs: First warning:Step 4: Update All Clients
KnoxCall generates a new subdomain:Step 5: Verify
Test each integration:Zero-Downtime Subdomain Rotation
Problem: Rolling subdomain causes downtime Solution: Use environment variables + phased rollout Step 1: Preparex9y8z7w6
Step 3: Update Environment Variables
Update each environment one at a time:
Rotation Strategy 2: API Keys
What It Is
KnoxCall API keys authenticate requests:When to Rotate
Rotate API keys when:- ✅ Every 90 days (security best practice)
- ✅ Key exposed (logs, screenshots, public repo)
- ✅ Employee departure
- ✅ Service migration (dev → prod)
- ✅ Suspect unauthorized access
- Limit blast radius of compromised keys
- Clear audit trail of which key made which requests
- Different keys per environment (dev/staging/prod)
How to Rotate API Keys
Method 1: Create-Before-Revoke (Zero Downtime)
Step 1: Create New Key- Navigate to Settings → Profile
- Scroll to API Keys section
- Click + Create API Key
- Name it (e.g., “Production Key 2025 Q1”)
- Copy the key immediately (you’ll only see it once!)
tk_def456ghi789jkl012mno345pqr567stu890
Step 2: Update One Client
Deploy new key to one client first (canary):
- Production servers
- Staging servers
- Development environments
- CI/CD pipelines
- Navigate to Settings → Profile → API Keys
- Find old key:
tk_abc123... - Click Revoke
- Confirm
Method 2: Blue-Green Key Rotation
Use two keys in rotation: Setup:- Blue Key:
tk_blue_abc123...(currently active) - Green Key:
tk_green_def456...(standby)
- Always have backup key ready
- Predictable rotation schedule
- Easy to automate
API Key Rotation Schedule
Recommended rotation frequencies:| Environment | Rotation Frequency | Reason |
|---|---|---|
| Production | Every 90 days | Compliance, security |
| Staging | Every 180 days | Lower risk, less traffic |
| Development | Annually | Minimal risk |
| CI/CD | Every 90 days | Automated, can’t leak via human |
| Third-party integrations | When integration changes | Control scope |
Rotation Strategy 3: Secrets
What It Is
Secrets (API keys, passwords, tokens) stored in KnoxCall support versioning. Example:When to Rotate
Rotate secrets when:- ✅ Secret exposed or leaked
- ✅ Third-party service rotates their keys (e.g., Stripe rotates automatically)
- ✅ Regular compliance schedule (90 days)
- ✅ Employee with access leaves
- ✅ Moving from test to production
- Zero-downtime rotation (new version immediately active)
- Version history for rollback
- Audit trail of when secrets changed
How to Rotate Secrets
Step 1: Generate New Secret (Third-Party)
First, generate the new credential in the external service: Stripe example:- Log in to Stripe Dashboard
- Navigate to Developers → API keys
- Click Create secret key
- Name it: “KnoxCall Production Key 2025”
- Copy the key:
sk_live_new789xyz456abc123def789ghi012jkl
Step 2: Add New Version in KnoxCall
- Navigate to Secrets
- Click the secret (e.g., “stripe-prod-key”)
- Click Add New Version
- Paste new secret value:
- Click Save
- New version (v2) becomes active immediately
- All routes using
{{secret:stripe-prod-key}}now use v2 - Old version (v1) preserved for rollback
Step 3: Test
Immediately test routes that use this secret:- Navigate to Routes → Find routes using this secret
- Click Test Route
- Send test request
- Verify backend receives new secret (check backend logs)
- Navigate to Secrets → secret detail
- Click Rollback to v1
- Investigate issue
Step 4: Monitor
Watch logs for 15-30 minutes:Step 5: Revoke Old Secret (Third-Party)
After 24-48 hours of successful usage:- Log in to third-party service (Stripe)
- Revoke old key:
sk_live_old123... - Confirm
Grace period: Keep old secret active in third-party service for 24-48 hours. This gives time to catch any missed integrations before revoking.
Secret Rotation Patterns
Pattern 1: Immediate Rotation (Security Incident)
Scenario: Secret leaked publicly (e.g., committed to GitHub) Steps:- Add new version in KnoxCall (0-downtime)
- Test immediately (< 5 minutes)
- Revoke old secret in third-party immediately (don’t wait)
Pattern 2: Scheduled Rotation (Compliance)
Scenario: Quarterly 90-day rotation policy Steps:- Schedule rotation date (e.g., first Monday of quarter)
- Generate new credentials 1 day before
- Add new version in KnoxCall
- Monitor for 48 hours
- Revoke old credentials
Pattern 3: Rolling Window Rotation
Scenario: Multiple secrets to rotate Strategy: Stagger rotations over days/weeks Example schedule:- Spread risk (don’t rotate everything at once)
- Easier to identify issues
- Less overwhelming for team
Secret Rotation Checklist
Before rotating a secret:- Identify all routes using the secret
- Generate new credential in third-party service
- Add new version in KnoxCall
- Test all affected routes (Route Tester)
- Monitor logs for 15-30 minutes
- Document rotation (when, why, who)
- Schedule revocation of old secret (24-48 hours)
- Verify old secret revoked in third-party service
Rotation Strategy 4: Routes
What It Is
Duplicating a route creates a copy with the same configuration. Use cases:- 🔄 Create v2 of API while keeping v1 alive
- 🌍 Duplicate production route for staging
- 🧪 Test configuration changes without affecting live route
- 📦 Clone route to different tenant
How to Duplicate Routes
Method: Duplicate via UI
Currently, routes can be duplicated by creating a new route and manually copying configuration. Steps:- Navigate to Routes → Click route to duplicate
- Note all configuration:
- Target URL
- Headers
- Body injection
- Secrets used
- Assigned clients
- Click Create Route
- Enter new route name (e.g.,
stripe-payments-v2) - Fill in same configuration
- Save
Method: Duplicate via API
Coming soon: API endpoint for route duplication.Route Migration Pattern
Scenario: Migrating API from v1 to v2 Steps: 1. Duplicate route:- Assign test clients only
- Send test requests
- Verify responses
- V1 requests declining
- V2 requests increasing
- Disable v1 route
- Monitor for errors
- Delete v1 route after 30 days
Rotation Strategy 5: Environments
What It Is
Environment duplication copies environment override configuration. Use cases:- 📋 Clone production config to create new environment
- 🧪 Test environment changes before deploying
- 🌍 Create region-specific environments (US, EU)
How to Duplicate Environments
Step 1: Navigate to Route- Go to Routes → Click route
- Switch to Environments tab
- Select environment to copy (e.g., “production”)
- Click ⋯ (more options)
- Select Duplicate Environment
- Enter new environment name:
production-eu - Click Duplicate
- ✅ Target URL override
- ✅ Header injection overrides
- ✅ Body injection overrides
- ✅ Rate limit overrides
- ✅ Signature settings overrides
- ❌ Assigned clients (you assign separately)
- Go to Environment Clients tab
- Select
production-eu - Assign appropriate clients (e.g., EU servers)
Environment Migration Pattern
Scenario: Migrating to new backend infrastructure Steps: 1. Duplicate environment:- Check logs for errors
- Compare response times
- Verify data integrity
- Update base route configuration to point to new infra
- Delete
production-new-infraenvironment (no longer needed)
Best Practices
1. Document Rotation Events
Keep a rotation log:| Date | Asset | Old Value | New Value | Reason | By |
|---|---|---|---|---|---|
| 2025-01-15 | stripe-prod-key | sk_live_old… | sk_live_new… | Scheduled 90-day rotation | John |
| 2025-02-01 | API Key (prod) | tk_abc… | tk_def… | Key leaked in logs | Sarah |
| 2025-03-01 | Subdomain hash | a1b2c3d4 | x9y8z7w6 | Security incident | John |
- Audit compliance
- Troubleshooting
- Team awareness
2. Test Before Revoking
Always: ✅ Add new credential ✅ Test thoroughly ✅ Monitor for 24-48 hours ✅ Then revoke old credential Never: ❌ Revoke old credential immediately ❌ Skip testing ❌ Assume it works3. Use Grace Periods
After adding new credential, keep old one active:- Low risk: 24 hours
- Medium risk: 48 hours
- High risk (leaked): 1 hour minimum
4. Automate Where Possible
Automatable:- Scheduled secret rotation (every 90 days)
- API key rotation (every 90 days)
- Monitoring for rotation events
- Subdomain hash rotation (high impact)
- Route duplication (business logic)
5. Use Separate Keys Per Environment
Good:Rotation Frequency Recommendations
| Asset | Frequency | Notes |
|---|---|---|
| API Keys (prod) | Every 90 days | Compliance standard |
| API Keys (staging) | Every 180 days | Lower risk |
| Secrets (payment APIs) | Every 90 days | High sensitivity |
| Secrets (internal) | Every 180 days | Lower sensitivity |
| Subdomain Hash | Only when compromised | High impact |
| Routes | As needed | For versioning |
| Environments | As needed | For infrastructure changes |
Troubleshooting
Issue: “Rotation caused downtime”
Cause: Revoked old credential before new one was deployed everywhere Prevention:- Always deploy new credential first
- Monitor for 24-48 hours
- Then revoke old
Issue: “Can’t find which routes use a secret”
Solution:- Navigate to Secrets → Click secret
- View Used By Routes section
- Lists all routes using this secret
Issue: “Rotated secret but old one still being used”
Cause: Route has method-specific config using old secret Check:- Route → Method Configs tab
- Check each HTTP method
- Some methods might override with old secret
Issue: “Rolled subdomain but clients still using old URL”
Cause: Hardcoded URLs, not environment variables Prevention:Related Features
- Secret Versioning: Manage multiple versions of secrets
- API Key Management: Create and revoke keys
- Environment Overrides: Per-environment configuration
- Audit Logs: Track all configuration changes
Next Steps
Secret Management
Learn about secret versioning
Audit Logs
Track rotation events
API Keys
Manage authentication keys
Environments
Configure environment overrides
📊 Statistics
- Level: intermediate to advanced
- Time: 20 minutes
🏷️ Tags
security, rotation, compliance, credentials, zero-downtime