Labels
Tag credentials, agents and API keys, then attach one policy to the label so it covers everything that carries it.
A label is a short tag. Put it on credentials, agents and API keys, then attach a policy to the label. The policy applies to every object that carries the label, now and later.
Labels never grant access
A label only groups things for policies. It does not give an agent access to a credential. Access stays an explicit grant per agent or key and credential.
Rules
| Rule | Value |
|---|---|
| Characters | lowercase letters, digits and hyphens: ^[a-z0-9-]{1,32}$ |
| Case | lower-cased for you |
| Per object | up to 10 labels |
| Put on | credentials, agents, API keys |
Set labels
Add them in the Labels field of Add credential (placeholder work, ai). The field shows "Policies from these labels apply at once: ..." so you see what you are about to inherit. Policies > Labels (/policies/labels) lists every label in use, and each label page shows its policies and the objects that carry it.
Removing a label that carries a policy loosens that policy. It needs policies:write, and a key or agent can never strip such a label from itself or from a credential it holds.
Worked example: label ai gets office hours
Goal: nothing tagged ai is usable outside 08:00 to 19:00, Mon to Fri.
# 1. a policy with one time_window rule (created in the web app), then attach it to the label
tvault policy attach 3f9c2a71e0b84d5f9a6c1d2e7b8f40a1 --label ai
# 2. tag a credential and an agent
tvault label add credential github ai
tvault label add agent cursor ai
# 3. grants are separate and still explicit
tvault grant cursor github=valueAt 22:15 on a Tuesday, cursor asks for github:
GET /api/agents/credentials?service=github
Authorization: Bearer tvagent_...
HTTP/1.1 403 Forbidden
{
"error": "Access denied by policy",
"policy": "office-hours",
"rule": "time_window",
"reason": "Access denied: current time 22:15 Europe/London is outside allowed window 08:00–19:00",
"code": "POLICY_DENIED",
"retryAfter": 35100
}The label is on both the agent and the credential. The policy is evaluated once, not twice. You, signed in, see more in Activity:
Outside allowed hours: Mon–Fri 08:00–19:00 Europe/London (policy office-hours, on label ai).
The label is on the agent and the credential. [Change the hours] [Detach from label ai]The tvault CLI under your own login prints:
denied: outside allowed hours Mon–Fri 08:00–19:00 Europe/London (policy office-hours, on label ai). Opens again in 10 h. The label is on the agent and the credential.
hint: to loosen it, edit policy office-hours in the web app, or run `tvault policy detach <policy-id> --label ai`Folders are retired
Folders (token groups) are retired from the app. You cannot create new ones. A folder that already exists still applies, with its policies and grants, until it is converted to a label. Labels replace them.
Policies
Write ABAC rules (time window, rate limit, lifetime cap, IP, country, channel), attach them to credentials, labels, agents, keys or MCP servers, and read the denials.
Activity
The feed of every credential access, tool call, policy decision and config change, with filters, plain-words denials, export and 90-day retention.