sanctum policy
Manage access policies.
Subcommands
add
Create a new access policy.
sanctum policy add <name> \
--principal "agent:<pattern>" \
--resources "<glob>,<glob>" \
--actions <action>[,<action>] \
--max-ttl <seconds>sanctum policy add cursor-access \
--principal "agent:cursor-agent" \
--resources "openai/*,anthropic/*" \
--actions retrieve \
--max-ttl 300âś… Policy 'cursor-access' created
Principal: agent:cursor-agent
Resources: openai/*, anthropic/*
Actions: retrieve
Max TTL: 300slist
List all policies.
sanctum policy listremove
Delete a policy.
sanctum policy remove <name>simulate
Test a policy decision without making a real request.
sanctum policy simulate \
--agent <name> \
--resource <path> \
--action <action>sanctum policy simulate \
--agent cursor-agent \
--resource openai/api_key \
--action retrieveâś… ALLOWED by policy 'cursor-access'
Lease TTL: 300sPolicy Fields
| Field | Description |
|---|---|
name | Unique policy identifier |
principal | Agent pattern (glob): agent:cursor-* |
resources | Credential path patterns (glob, comma-separated) |
actions | retrieve, list, store, delete |
max-ttl | Maximum lease duration in seconds |