CLI application authentication
authentik: 2025.12.0+
The authentik Agent can authenticate to CLI applications such as:
- the AWS CLI (
aws) - the Kubernetes CLI (
kubectl) - the HashiCorp Vault and OpenBao CLIs (
vaultandbao) - Claude Code, by exchanging the developer's authentik token for a short-lived Anthropic access token
How CLI authentication works
First, authentik-agent and authentik-cli request an authentik token from the authentik-cli OAuth Provider and exchange it for a token from the provider of the target application, such as Kubernetes, AWS, or Vault.
This token is cached until expiration. This improves performance by eliminating repeated token requests.
More information
For more information, refer to each of the topics below:
AWS
You can use the authentik Agent to authenticate to the AWS CLI with authentik credentials. The Agent exchanges them for temporary AWS credentials through one of two federation methods:
Kubernetes
You can use the authentik Agent to authenticate to kubectl with authentik credentials.
Vault and OpenBao
You can use the authentik Agent to run the HashiCorp Vault CLI (vault) or the OpenBao CLI (bao) with your authentik credentials, without running vault login.