Approval Workflows
Human-in-the-loop gates for sensitive and critical credentials. Agents request access; humans approve or deny in real time.
Access tiers
Every secret is assigned an access tier that controls the approval requirement when an agent requests a scoped token to read it.
Standard
Auto-approvedTokens are issued instantly. No human approval required. Suitable for non-sensitive operational credentials like internal API keys.
Examples
- › Internal service URLs
- › Development API keys
- › Feature flags
- › Non-secret configuration
Sensitive
1 approval requiredOne designated approver must approve within the request TTL. On approval, the token is issued automatically.
Examples
- › Production API keys
- › OAuth client secrets
- › Database credentials
- › LLM provider keys
Critical
1 approval requiredThe tenant owner must approve before the token is issued. Use for credentials with high blast radius or irreversible side effects.
Examples
- › Payment processor keys
- › Infrastructure credentials
- › Master database passwords
- › Signing keys
Approval flow
Approval thresholds
Approval requirements are derived from the highest access tier matched by the requested scopes. Sensitive and critical secrets always require an explicit human approval before the token is issued.
| Matched tier | Token behavior | Typical use |
|---|---|---|
| standard | Auto-issued | Low-risk operational credentials |
| sensitive | Requires 1 approval | Production model provider keys and OAuth client secrets |
| critical | Requires 1 approval | Payment, infrastructure, signing, and production database credentials |
Configuring access tiers
Set the access tier when you store or update a secret. Future token requests that match sensitive or critical secrets will return an approval ID instead of a token until a human approves the request.
# Access tiers are assigned per secret.
ass secrets set production/gemini/GEMINI_API_KEY "$GEMINI_API_KEY" \
--type api_key \
--tier sensitive
ass secrets set production/stripe/STRIPE_SECRET_KEY "$STRIPE_SECRET_KEY" \
--type api_key \
--tier criticalHandling approvals in code
import asyncio
import os
from agentsecretstore import AgentVault, ApprovalRequiredError
SCOPE = "secrets:read:production/stripe/*"
SECRET_PATH = "production/stripe/STRIPE_SECRET_KEY"
async def wait_for_approval(vault: AgentVault, approval_id: str) -> None:
while True:
status = await vault.get_approval_status(approval_id)
if status.status == "approved":
return
if status.status in {"denied", "expired"}:
raise RuntimeError(f"Approval {status.status}: {approval_id}")
await asyncio.sleep(5)
async def main():
async with AgentVault(agent_key=os.environ["ASS_AGENT_KEY"]) as vault:
try:
await vault.request_token(scopes=[SCOPE], ttl="5m")
except ApprovalRequiredError as exc:
print(f"Approval required. Request ID: {exc.approval_id}")
print("Approvers review the request in the dashboard.")
await wait_for_approval(vault, exc.approval_id)
await vault.request_token(scopes=[SCOPE], ttl="5m")
secret = await vault.get_secret(SECRET_PATH)
print(secret)
asyncio.run(main())Non-blocking pattern
For production agents, don't block on approval. Instead, queue the task and resume after get_approval_status() returns an approved status.
Checking approval status
Approval decisions are made by humans in the dashboard. Agents receive an approval ID, then poll until the request is approved, denied, or expired.
Poll status
# Agents can poll an approval request by ID.
curl -X GET https://api.agentsecretstore.com/v1/approvals/agent/0b2e1c98-5ef3-4d2c-a7aa-45a91a18a201 \
-H "Authorization: Bearer $ASS_AGENT_KEY"Status payload
{
"id": "0b2e1c98-5ef3-4d2c-a7aa-45a91a18a201",
"tenant_id": "0e92b4ed-8e0e-4d83-b35a-a936fda75834",
"agent_id": "0fd78c7f-53dd-4a87-8a0c-74b5a4c9a2db",
"status": "pending",
"requested_scopes": ["secrets:read:production/stripe/*"],
"access_tier": "critical",
"required_approvals": 1,
"current_approvals": 0,
"approvers": [],
"reason": null,
"denial_reason": null,
"expires_at": "2026-06-01T11:00:00Z",
"created_at": "2026-06-01T10:30:00Z",
"resolved_at": null
}Human action
# Human approvers approve or deny requests in the dashboard:
https://agentsecretstore.com/dashboard/approvals