sbarbase
Contents

Signing key

Each environment has its own JWT signing key. Its Auth signs every session with it, and REST, Storage, Realtime and Edge Functions check tokens against it. Rotate it when it may have leaked, for example after it was pasted somewhere or someone who knew it left.

Rotate it

  1. Open the environment in the console, then Sign-in settings.
  2. Under Signing key, press Rotate signing key, then confirm.
  3. Wait until it shows Rotated. It takes about a minute; longer when Realtime is on.

What changes:

What does not change:

For a few seconds while Auth and REST restart, some requests to this environment may be refused. Other environments are not touched.

If the rotation stops halfway, the console shows Not finished. Press Rotate signing key again, or restart Sbarbase: the change is finished with the same new key.

Through the API

curl -X POST -H "authorization: Bearer $TOKEN" https://your-console/management/v1/environments/$ENVIRONMENT/signing-key/rotate

GET .../signing-key shows the state and when it was last rotated. Neither ever answers the key itself.

Limits

CI rotates the key of an environment on a clean machine with every change and checks the old session, refresh token and service_role token are refused while a new sign-in works everywhere (evidence).

Edit on GitHub