Rotate a webhook signing key
This article describes how to rotate a webhook signing key in Cerby when a key is compromised or as part of a regular key rotation policy.
As a workspace Owner, Super Admin, or Admin, you can rotate the signing key of a webhook when a key is compromised or as part of a regular key rotation policy. During rotation, Cerby dual-signs requests with both the old and new keys for 24 hours, giving your system time to update its stored key before the old key expires. You cannot start a second rotation while a grace period is active.
During the 24-hour grace period, each delivery includes two X-Cerby-Signature headers and two X-Cerby-Signature-Key-Id headers, with the new key first. Accept the request if either signature validates.
To rotate a signing key, you must complete the following steps:
Log in to your Cerby workspace.
Select Settings from the left navigation. The Workspace Configuration page is displayed.
Select the Webhooks left tab.
Click the name of the webhook whose key you want to rotate. The webhook detail page is displayed.
Locate the Signing and verification card. The card displays the signing algorithm and the current key of the webhook.
Click the rotate button for your signing algorithm:
Ed25519: Click Rotate public key.
HMAC-SHA256: Click Rotate secret.
The Rotate signing key? confirmation dialog box is displayed, describing the 24-hour dual-sign grace period.
Click the confirm button for your signing algorithm:
Ed25519: Click Rotate public key.
HMAC-SHA256: Click Rotate secret.
For Ed25519, the rotation begins immediately and the new public key appears in the Signing and verification card.
For HMAC-SHA256, a dialog box is displayed showing the new signing secret.
Update the stored key in your verification system. Your receiver can now validate signatures made with the new key.
Click the Done button. Cerby begins dual-signing requests with both the old and new keys, and expires the old key automatically after 24 hours.
Now you are done.
Related articles
Feature guides:
Developer reference:
Troubleshooting:
Last updated
Was this helpful?

