Set the administrative user’s API key
Vault always has an administrative user account that has the user name of Admin
. This is referenced throughout the documentation simply as the user named Admin
or the Admin user. The Admin user’s API key provides a “break the glass” mechanism that enables you to regain control of Vault when all other API keys fail (e.g., when you lose your admin API key).
Unlike other user accounts, the Admin
user’s API key is set using one of these two methods:
- The environment variable
PVAULT_SERVICE_ADMIN_API_KEY
- The API Set Admin API key
The Admin API key can’t be authenticated using JWT access tokens.
Set the Admin API key using the environment variable
The environment variable and, therefore, the key have a default value of pvaultauth
. It’s recommended that you change the value of the Admin API key to a unique value when deploying Vault to production.
Change the API key by updating the value of the environment variable and restarting Vault.
Note that the Admin API key is not updated during startup if the