Rotate Secrets

Manage and rotate OAuth client secrets for security.

Why Rotate Secrets?

  • Secret may have been exposed

  • Regular security policy compliance

  • Employee departure

  • Security audit requirement

Rotation Methods

Method 1: Admin Dashboard

  1. Navigate to Admin DashboardOAuth Clients

  2. Select the client

  3. Click Rotate Secret

  4. Copy the new secret immediately

  5. Update your application configuration

  6. The old secret is immediately invalidated

Method 2: API

Response:

Zero-Downtime Rotation

For production applications, use a two-step rotation:

Step 1: Add New Secret

Some systems support multiple active secrets. If Authority supports this:

Step 2: Update Application

Update your application to use the new secret.

Step 3: Remove Old Secret

Rotation Without Dual Secrets

If you must rotate immediately:

1. Prepare New Configuration

Have the new secret ready to deploy.

2. Rotate Secret

3. Deploy Immediately

Update your application within seconds:

Automation

Scheduled Rotation

Create a rotation script:

Cron Schedule

Secret Expiration

Configure secrets to expire automatically:

Monitor expiring secrets:

Audit Trail

All secret rotations are logged:

Event
Description

client.secret_rotated

Secret was rotated

client.secret_expired

Secret expired

Query the audit log:

Notification

Set up alerts for secret events:

Recovery

Lost Secret

If you lose a client secret:

  1. Log into admin dashboard

  2. Rotate to generate new secret

  3. Update application immediately

Compromised Secret

If a secret is compromised:

  1. Rotate immediately

  2. Review audit logs for unauthorized access

  3. Revoke any suspicious tokens

  4. Update application with new secret

Best Practices

circle-check
circle-exclamation

Next Steps

Last updated

Was this helpful?