Help topics

Help · Guide

If a key leaks

If one of your company's keys turns up where it shouldn't, such as a public repository, a ticket or a chat, you can stop it in the console right away. Then you give your developers a new key and check what the old one did.

Before you begin: sign in to the console as an owner or admin. If you have two-factor on, the console asks for your passkey or code before it revokes a key.

1. Know what Provenance does on its own

When a key is reported, Provenance acts straight away and tells owners and admins by email and in the console's Inbox, with where the key was found.

What leakedWhat Provenance does
A live API keyRevokes it at once, unless you chose to be told only
A sandbox API keyTells you. It keeps working until you revoke it
A webhook signing secretReplaces it. For 24 hours deliveries are signed with both the old and new secret, so nothing is dropped

Choose what a leaked live key does under Settings → Agents → Takeover protection.

2. Revoke the key

Open Developers → API keys, find the key by its name and last characters, and choose Revoke. The key stops working at once. Revoking can't be undone, and it never locks you out: you sign in to the console without a key.

3. Give your developers a new key

Choose Create key on the same page, name it and pick the products it's for. The new key is shown once; pass it to your developers through a safe channel, never in chat or email.

For a webhook secret, open Developers → Webhooks, pick the endpoint and choose Rotate secret.

4. Check what the key did

Developers → Logs lists every request with its result, and Developers → Events lists what happened on the account. Look at the time around the leak for requests you don't recognize.

If an agent may have been used, pause it or every agent, as in Stop an agent.

Errors you might see

You seeWhat it meansWhat to do
You don't have access to this pageOnly owners and admins can revoke keysAsk an owner or admin.
The console asks for your passkey or codeRevoking a key needs a recent second-factor checkConfirm it, and the key is revoked.
The key still shows as active after a leak reportIt's a sandbox key, or you chose to be told onlyRevoke it yourself.

See also