Create personal API keys that carry your identity!
Shared org API keys don’t really tell your auditors who did what, and they keep working after the person who created them leaves. Personal API keys solve both problems. Each key belongs to one user, gets exactly that user’s access, and stops working when the user is deactivated or removed.
How it works
Create keys from Personal settings > Personal API keys, or with the personalApiKeyCreate GraphQL mutation. Each user can have up to 100 keys, so you can give spacectl, the Terraform module and provider registries, and your GraphQL scripts their own keys. Every key needs an expiry: three months by default, 180 days maximum. For spacectl, set SPACELIFT_API_KEY_ID and SPACELIFT_API_KEY_SECRET.
A personal key has no roles of its own. When it’s exchanged for a token, Spacelift applies the owner’s current role assignments and IdP group roles. Role changes take effect immediately, and group changes take effect at the owner’s next login. A personal key can’t create API keys, change role bindings, or sign in to the web UI. Audit trail entries show the key as the actor with the owner’s username next to it.
You can rename a key, reset its secret, or delete it. Reset and delete take effect immediately, including for tokens already in use. Expired and revoked keys can only be deleted.
Revocation
A revoked key stops working and can’t be restored. Keys are revoked when a root admin revokes them, when the owner is deactivated or removed, or when the account switches to Login Policies. A root admin who turns the feature off can choose to deactivate all existing keys.
Root admins see every active personal key under Organization settings > API keys > Personal, and each user’s keys under Organization settings > Users. They can revoke any key, but they can’t assign it roles, change its owner, or use it.
Requirements
The account uses Identity Access Management. Accounts on Login Policies can’t create personal keys.
A root admin turns on Personal API keys under Organization settings > API keys > Settings. It’s off by default, and users can request it from Personal settings.
The user creating a key has at least one role.
Personal keys are secret keys only. OIDC isn’t supported.
Org API keys will continue to work exactly as they do today. Keep using them for CI, bots, and anything that has to keep running after a person leaves. As always, take it for a spin, and let us know what you think!