Skip to content

Rotate a client token

Rotate a client's token when it may have leaked (it showed up in a log, or someone who had it left), or on a regular schedule.

The old token stops working immediately

There's no overlap. Have the new token ready to paste into the pipeline's secret before you rotate, and expect installs with the old token to fail with 401 until it's replaced.

This is one reason to give every pipeline its own client: rotating one token then affects only that pipeline.

Rotate in the console

You need the admin role in the workspace.

  1. Open Clients.
  2. Find the client and select Rotate token.
  3. Copy the new token. It's shown only once.
  4. Replace the secret where the client uses it, for example the PROVENIX_NPM_TOKEN_BUILD secret in GitHub Actions.
  5. Re-run the pipeline and check npm whoami still prints the client's name.

Rotate with the API

curl -sSf -X POST "https://provenix.example.com/api/v1/clients/<client id>/rotate-token" \
  -H "Authorization: Bearer $PROVENIX_ADMIN_KEY" | jq -r .token

Retire a client instead

If the pipeline or machine is gone, select Deactivate on the client instead. Its token stops working at once, and its install history is kept.