Skip to content

How to govern API keys and service accounts ​

MIA Pro feature

Requires a MIA Pro subscription.

An API key gives access to an application without anyone signing in, and it keeps working when the person who created it leaves. Governing keys means knowing which ones exist, who answers for them and which ones to cut off. MIA does this for Claude and OpenAI: it inventories their API keys and service accounts, gives them an owner and flags the ones that need action. Creating, rotating or revoking a key remains a task for the provider's console.

What is an API key? ​

An API key is a secret a program presents to an API to authenticate: it then acts with the rights of the account that holds the key. A service account is a non-human account, created for an application or a script, that holds its own keys. Together, they are called non-human identities.

Unlike an employee's account, a key does not close on its own when its creator leaves, and a key without an expiration date works indefinitely. A forgotten key is therefore an open access.

Inventory the keys of Claude and OpenAI ​

On a Claude or OpenAI application connected to MIA, the Non-human identities tab lists its API keys and Service accounts. For each key: its name and hint (its first and last characters), its type, its status, its last use, its owner and its signals. MIA never reads the key itself. The list is read again at each synchronization, once an hour.

See Non-human identities.

Give each key an owner ​

A key's owner is the person to ask whether it is still in use. A personal key has its holder as owner by default. For a service account, a workspace key or a key whose holder is not a MIA user, set the owner in the key's Owner of window, from the pencil on its line or from its details. This is the key's owner; the application has its own, who receives the user access review link.

See API key owner.

Handle risky keys ​

Each key can carry signals, explained on hover:

  • Cutoff ahead and MIA cutoff ahead: the upcoming closing of its holder's account will cut the key off (for the latter, the key MIA reads the application with);
  • To reassign: its owner is leaving or has left;
  • Orphan: no holder, and created by someone whose account no longer exists;
  • No owner: nobody answers for the key;
  • Dormant: not used for more than 90 days;
  • Never expires: a finding rather than a task.

The API keys to handle line of the To do page counts the keys carrying a signal other than Never expires, and leads to each application's tab, filtered with Only the keys to handle.

See Signals on risky keys.

Prepare for a holder's departure ​

When a user's account is about to be closed, on a set date or after a departure detected by the leader application, their personal keys carry Cutoff ahead; after a detected departure, the Deprovisioning cascade scheduled email flags them too. Before the date, replace in the provider's console the keys a program still uses (see Employee offboarding checklist).

See A user's departure and API keys.

Review, rotate and revoke keys ​

A user access review of Claude or OpenAI also covers its API keys and service accounts: the application's owner approves or rejects them like people's access. MIA creates, disables and revokes no key: a rejected or dormant key is revoked in the provider's console, and API key rotation (replacing a key with a new one) happens there too. At the next synchronization, access traceability records the new key as appeared and the old one as removed.

Reference pages ​