Applies to: VaultKit 0.13.0-alpha (the admin fallback for groups with no members and recorded self-approvals are new in 0.13.0-alpha)
Nobody in VaultKit holds standing access to data. Every request is checked against your policies, and if it’s allowed, VaultKit issues a grant: permission to run that one query, for a limited time. When a policy says a person must sign off first, the request waits for an approval.
422 and recorded as Rejected. An unknown or
hidden dataset is answered 404 “Dataset not found”, and recorded as Rejected
or Denied.Every step is written to the audit log.
An approval policy names a group in approver_role, or several in approver_roles
with an approval_mode:
action:
require_approval: true
approver_role: payments_reviewer
reason: Payment records need sign-off from a payments reviewer.
ttl: 1h
action:
require_approval: true
approver_roles: [security, finance_manager]
approval_mode: any # all (the default): every group signs off; any: one does
reason: Agents reading financial rows need security or finance review.
Who can approve:
--for, or Acts for in the console) can approve that agent’s requests. This is
allowed, and recorded as a self-approval: the console shows “acting for you” on the
request and says approving it is recorded as a self-approval, the approval and the
sign-off carry self_approval: true in the API, and the audit events include it.admin, member, approver and agent can’t be
approval groups: a policy can’t name them, and a person can’t be put in them.Several policies, several groups:
financial_compliance
asking a finance_manager and ai_safety asking security or a finance_manager,
one finance sign-off approves the request.A group nobody active is in falls back to org admins:
vkit policy deploy warns
once per group: “data_owner has no members, so org admins will approve its requests
until someone is added.” vkit doctor reports it too.202 for a queued request says “Needs approval:
data_owner has no members, so an org admin will approve.”, and
admin_fallback_groups lists those groups.ai_safety’s security and
finance_manager rule, needs one admin. A group with members still needs one of
its members, and the admin still counts for only one such group.approval_mode: any, the admin signs for the set only when every group in
it has no members. If one of them has a member, that member (or another group’s)
signs.Users who can approve any request still sign for one group at a time, whether it has
members or not. Only admins sign for the built-in admin role, which an approval
policy with no approver falls back to (only bundles from before approvers were
required have such policies).
Progress reads the same in the console’s Approvals page, the approvals API
(progress), GET /requests/:id (approval_progress) and the agent’s
vaultkit_check_approval: “Needs 2 approvals: finance_manager ✓ Ada, security
waiting”. A set of groups any one of which will do is shown once (“security or
data_owner waiting”).
Deciding:
vkit approval:approve ID.
An approver can shorten the grant (--ttl), never lengthen it past the policy’s
TTL.While it waits:
A grant is bound to:
When its query fails to run: if a run fails, for example because a column was renamed in the database since the last scan, Activity shows the request as failed (“Approved · failed: column doesn’t exist”) and counts it under Failed. Admins see the failed run’s SQL. When the failure is about the schema (a missing column or table), the grant can’t run again as it stands. It’s marked “Fails: column doesn’t exist” on the Agents page and in the approvals history; revoke it there. It isn’t revoked automatically, because such failures are often temporary.
How long it lasts: the matching policy’s ttl, or one hour when the policy sets
none. The starter pack gives allowed requests four hours.
What stays with it: masking. A field masked by policy stays masked after approval: an approval lifts the approval requirement, not the masks.
Checked every time it’s used. A grant stops working when:
vkit grant:revoke --grant REF --reason TEXT or from the
console’s Agents or Activity page, revokes the agent token it was issued to, or removes
the requester from the team, which revokes all their grants;match.context (such as the requester’s role or region) and the tenant are checked
again on each use.Requests record the full query, the requester and their role, clearance, region and
tenant, the environment and the decision. Events include request.received,
policy.evaluated, request.rejected, request.denied, request.queued_for_approval,
approval.signed_off, approval.approved, approval.denied, grant.issued,
grant.reused, grant.fetch.executed and grant.revoked.
Approval events say how each sign-off was made:
approver_source: group for a member of the group, admin_fallback for an admin
signing for groups with no members. signed_roles lists the groups the sign-off
covered.admin_fallback_groups on request.queued_for_approval: the groups admins will
approve for.self_approval: true when the approver is the person the requesting agent acts for.
The key is left out for every other approval.{"event": "approval.approved", "approval_id": 1, "dataset": "customers",
"signed_roles": ["data_owner"], "approver_source": "admin_fallback", "self_approval": true}