VAULT_TOKEN stored anywhere. This works with self-managed Vault and HCP Vault.
Follow the OIDC prerequisites, then go to the OIDC page for your environment and copy the issuer URL and subject.
Configure Vault
Enable the JWT auth method and point it at your issuer’s discovery document:bound_audiences is the audience your task requests; vault is an example, any value works if both sides match. See the JWT auth API for every role option.
Read a secret in your task
/trigger/read-from-vault.ts
auth.client_token. On HCP Vault or Vault Enterprise, add an X-Vault-Namespace header to both requests. Log in inside run, and log in again if the run outlives token_ttl.
Remove the old credential
Once runs in every deployed environment log in this way, deleteVAULT_TOKEN from those environments on the Environment Variables page and revoke the old token with vault token revoke.
Local Development runs can’t mint OIDC tokens. Use your own Vault login there when ctx.environment.type === "DEVELOPMENT".
