How rotation works
- You call
POST /webhooks/subscriptions/{id}/rotate-secret. - OpenFX generates a new signing secret and returns it in the response.
- For the next 24 hours, OpenFX signs deliveries with the new secret, but your endpoint can verify using either the old or the new secret.
- After 24 hours, the old secret is permanently invalidated.
During the 24-hour grace period, OpenFX signs webhook deliveries with the new
secret. However, it will also accept verification using the old secret. This gives you
time to deploy the new secret to your application without any dropped deliveries.
Rotating the secret
CallPOST /webhooks/subscriptions/{id}/rotate-secret to generate a new signing secret.
signingSecret:
Migration procedure
Follow these steps for a zero-downtime rotation:Step 1: Update your verification code to accept both secrets
Before rotating, modify your webhook handler to try verification with multiple secrets:Step 2: Rotate the secret
Call the rotate endpoint as shown above. Store the new secret.Step 3: Deploy the new secret
Add the new secret to your application’s secret list. Your verification code now tries both:Step 4: Wait for the grace period to expire
After 24 hours, the old secret is no longer valid. Remove it from your configuration:Step 5: Simplify your verification code (optional)
Once you are back to a single secret, you can optionally simplify back to single-secret verification. However, keeping the multi-secret pattern makes future rotations smoother.Your rotation is complete. The old secret is invalidated and only the new secret
is in use. Repeat this process periodically (e.g., every 90 days) as a security
best practice.
Rotation frequency recommendations
| Scenario | Recommended frequency |
|---|---|
| Routine security hygiene | Every 90 days |
| Suspected compromise | Immediately |
| Employee offboarding | Within 24 hours of departure |
| Security incident response | Immediately |
| Compliance requirement | Per your security policy |
Important notes
- Only one rotation at a time. Do not call rotate-secret again before the 24-hour grace period from the previous rotation has expired. The behavior of overlapping rotations is undefined.
- Signing secret is write-only. It is returned only when the subscription is created and when the secret is rotated. There is no endpoint to retrieve an existing secret.
- The old secret works for 24 hours. If you need to cut over faster, update your verification code before calling rotate. If you need to extend the window, do not — the 24-hour period is fixed.
- Test after rotation. Use
POST /webhooks/subscriptions/{id}/testto send a test delivery and verify that your updated handler works with the new secret.