Agent Approval Protocol v1
Overview
Section titled “Overview”Defines how AI agents request permission for sensitive actions and how users grant or deny them securely.
Design principles:
- Server-side truth: approval stored server-side, client gets opaque request ID
- Action binding: exact action/payload hashed at creation, verified at execution
- Single-use, short-lived
- Defense in depth
MCP Tools
Section titled “MCP Tools”| Tool | Description |
|---|---|
request_approval | Create an approval request (actions, risk level, Standard/Strong) |
get_approval_card | Approval card data for a request |
check_approval_status | Poll the decision status (pending / approved / rejected / expired) |
create_trusted_session | 30-min trusted session after a Strong approval |
The decision itself is not a tool call: the user approves or denies on the approval card or at auth.anuka.pro/approve/<token>, and the decision is recorded server-side from the user’s own session. Agents learn the outcome via check_approval_status.
Security Properties
Section titled “Security Properties”Action Binding
Section titled “Action Binding”action_hash = SHA-256(canonical_json(actions)) at creation. Server validates selected_action_ids ⊆ actions[].id. Re-verified at execution.
Single-Use
Section titled “Single-Use”consumed_at set on first decision. Subsequent attempts → “Already consumed”.
Short-Lived
Section titled “Short-Lived”Risk-based TTL: critical 15m, high 1h, medium 4h, low 24h.
Anti-Replay
Section titled “Anti-Replay”Token is single-use opaque (128-bit). token_hash stored, raw token never persisted.
Anti-Race
Section titled “Anti-Race”Only pending → approved/rejected transitions. Atomic status update.
Confused Deputy Prevention
Section titled “Confused Deputy Prevention”Approval bound to user_id + project_id at creation. Execution context must match.
Brute-Force Protection
Section titled “Brute-Force Protection”Max 5 attempts per approval → auto-lock. Rate limit: 10 pending per user.
Anomaly Detection
Section titled “Anomaly Detection”Auto-escalate to Strong Approval when:
- Unusual hour (0–5 AM)
- Burst activity (5+ approvals/hour)
- High or critical risk level
Approval Receipts
Section titled “Approval Receipts”Each decision generates HMAC-signed receipt: base64(payload).hex(signature). Provides cryptographic proof of who approved what and when.
Time-Lock
Section titled “Time-Lock”Critical approvals require 10-minute delay after approval before execution. Protects against accidental clicks.
Threat Model
Section titled “Threat Model”| Threat | Mitigation |
|---|---|
| Token theft | Short TTL, single-use, HTTPS only |
| Code brute-force | 5 attempts → lock |
| Payload substitution | action_hash verification |
| Replay | consumed_at, single-use token |
| Race condition | Atomic transitions |
| Confused deputy | user_id + project_id binding |
| DB direct write | RLS, edge-function-only |