Skip to main content

Snowflake Documentation

Rotating the JSON web token (JWT) secret

The API tokens and the login tokens in Unravel are JSON web tokens (JWT). The JWT secret, which is used to sign the JWT token should be periodically rotated to increase security. You can set the rotation of JWT secret to prevent the violation of the JWT secret.

To rotate the JWT secret, do the following:

  1. Stop Unravel.

    <Unravel installation directory>/unravel/manager stop
  2. Run the following command:

    <Unravel installation directory>/unravel/manager support reset-jwt-key

    Note

    The existing API and login tokens get automatically invalidated after you execute this command.

  3. Apply the changes.

    <Unravel installation directory>/unravel/manager config apply
  4. Start Unravel.

    <Unravel installation directory>/unravel/manager start

Tip

Unravel recommends rotating the JWT secret every six months.