AgentIdentity
An AgentIdentity gives an agent’s ServiceAccount short-lived Vault tokens,
limited to the paths you list and cut off by its AgentPolicy’s kill switch.
Short name: aid. Setting up Vault itself is in Vault credentials.
apiVersion: leash.simplyzee.dev/v1alpha1kind: AgentIdentitymetadata: name: claude-agent namespace: agentsspec: serviceAccountName: claude-agent policyRef: name: claude-agent vault: ttl: 10m secretPaths: - secret/data/agents/claude/* - database/creds/claude-agent revokeOnFreeze: - database/creds/claude-agent| Field | What it does |
|---|---|
serviceAccountName |
The ServiceAccount the agent pods run as. |
policyRef |
The AgentPolicy whose kill switch also freezes this identity. |
vault.secretPaths |
Paths the agents may read. * and + globs are allowed; sys/, auth/ and identity/ are refused. |
vault.ttl |
Token lifetime, from 1m to 24h. Default 15m. |
vault.authMount |
The Kubernetes auth mount. Default kubernetes. |
vault.revokeOnFreeze |
Lease prefixes to revoke on freeze. Each must be one of secretPaths or under one. |
What Leash creates in Vault
An ACL policy, a Kubernetes auth role and an entity, all named
leash.<namespace>.<name>. Agents log in with that role. Freezing disables the
entity, so their tokens are rejected at once.
Warnings
The identity also checks the pods around it:
UnguardedPods: pods run as its ServiceAccount without being selected by its AgentPolicy. They could read its Vault secrets with no egress allowlist or kill switch.PodsWithoutIdentity: agent pods selected by the policy run as some other ServiceAccount, so they can’t log in as this identity.