What is key rotation?
Key rotation replaces an existing API key with a new one while keeping the old key active for a temporary overlap window. BabySea calls that overlap window the grace period. In the current dashboard, you can choose a grace period from 1 hour to 168 hours. The select defaults to 24 hours.How rotation works
Choose Grace period
In the dialog Rotate API key, choose Grace period. The available values are 1 hour, 6 hours, 12 hours, 24 hours (default), 48 hours (2 days), 72 hours (3 days), and 168 hours (7 days).
New key created
BabySea creates a replacement key with the same name, scopes, and IP allowlist as the original key.
Grace period begins
The original key keeps working until the selected grace period ends, so you can update your applications without an immediate break.
Copy the new key
After success, BabySea opens the confirmation view Key rotated successfully and shows the new key one time.
Update your services
Replace the old key in all your services, environment variables, and secrets managers with the new key.
What the rotation dialog says
Before you confirm rotation, the dialog explains that BabySea will create a replacement key, keep the old key active during the selected grace period, and stop the old key automatically after that period. The confirm action is Rotate key. The secondary action is Cancel. After rotation, the success view shows:- the title Key rotated successfully
- the field label New API key
Show valueandHide value- a copy button
- the action Done
What is preserved
The replacement key inherits these properties from the original key:| Property | Inherited |
|---|---|
| Name | Yes |
| Scopes | Yes |
| IP allowlist | Yes |
Dashboard indicators
After rotation, the Status column reflects the key state:| Key state | Status shown |
|---|---|
| New key | Active |
| Old key during the grace period | Rotated |
| Old key after the overlap ends | Expired |
| Manually disabled key | Revoked |
Rotated instead of another rotate action.
Rotation rules
| Rule | Detail |
|---|---|
| Only active keys can rotate | Revoked, expired, and already rotated keys cannot start another rotation. |
| One rotation at a time | The old key keeps a rotated marker, so the dashboard does not offer another rotate action for that row. |
| Grace period bounds | The selected grace period must be between 1 and 168 hours. |
| Owner access required | Team members can view the page but cannot rotate keys. |
Example workflow
A typical quarterly rotation for a production key using the default value:- Monday 10:00 AM: Rotate the
prod-api-workerkey in the dashboard. Copy the new key. - Monday 10:05 AM: Update the key in your secrets manager.
- Monday 10:10 AM: Deploy your services. They pick up the new key from the secrets manager.
- Monday 10:30 AM: Verify the new key is working with
GET /v1/statusor a normal application request. - Tuesday 10:00 AM: Grace period expires. The old key stops working. No action needed.
Rotation vs. revocation
| Action | Old key | New key created | Use case |
|---|---|---|---|
| Rotate | Active during grace period | Yes | Planned key refresh |
| Revoke | Immediately disabled | No | Compromised or leaked key |
Revoke a key
Revoking a key immediately disables it. All requests using the revoked key returnBSE1002 with HTTP 401 from the moment of revocation.
The confirmation dialog is Revoke API key. Its confirm action is Revoke key.
| Detail | Value |
|---|---|
| Effect | Immediate, the key stops working at once |
| Reversible | No |
| Logs preserved | Yes, until the key is deleted |
| When to use | Key is compromised, leaked, or no longer needed |
Delete a key
Deleting a key permanently removes it and all associated API key logs. The key is also immediately revoked if it was still active. The confirmation dialog is Delete API key. Its confirm action is Delete key.| Detail | Value |
|---|---|
| Effect | Immediate removal of the key and all associated key logs |
| Reversible | No |
| Logs preserved | No |
| When to use | Cleanup when you no longer need the key or its audit trail |
Before deleting, consider whether you still need the API logs for auditing. If you only want to stop the key from working, revoke it instead.
Action availability
Not all actions are available for every key status:| Action | Active | Rotated | Expired | Revoked |
|---|---|---|---|---|
| Rotate | Yes | No | No | No |
| Revoke | Yes | Yes | No | No |
| Delete | Yes | Yes | Yes | Yes |