Credential Resolution Protocol (CRP)
CRP is the protocol by which AI agents discover, request, and receive credentials from SanctumAI at runtime. Itβs the glue between the MCP tool interface and the vaultβs policy engine.
How CRP Works
When an AI agent needs a secret, the following sequence occurs:
AI Agent (via MCP) SanctumAI Daemon
β β
β 1. sanctum_list_credentials() β
ββββββββββββββββββββββββββββββββββββββΆβ
β [available credentials] β
βββββββββββββββββββββββββββββββββββββββ
β β
β 2. sanctum_get_credential(path) β
ββββββββββββββββββββββββββββββββββββββΆβ
β β β
β β 3. Authenticate agent β
β β (Ed25519 challenge) β
β β β
β β 4. Evaluate policies β
β β (deny-by-default) β
β β β
β β 5. Create lease β
β β (time-limited) β
β β β
β { value, lease_id, expires_at } β
βββββββββββββββββββββββββββββββββββββββ
β β
β 6. Use credential β
β β
β 7. Lease expires β value zeroized βResolution Steps
- Discovery β The agent calls
sanctum_list_credentialsto see whatβs available (filtered by its policies) - Request β The agent requests a specific credential by path
- Authentication β The daemon verifies the agentβs Ed25519 identity
- Authorization β The policy engine checks if any policy grants this agent access to this credential for this action
- Lease Creation β On success, a time-limited lease is created with the decrypted value
- Usage β The agent uses the credential value
- Expiration β When the lease TTL expires, the value is zeroized from daemon memory
MCP Tools
CRP is exposed through MCP as a set of tools that AI editors can call:
| Tool | Description |
|---|---|
sanctum_list_credentials | List credentials the agent has access to |
sanctum_get_credential | Retrieve a credential value (creates a lease) |
sanctum_store_credential | Store a new credential |
sanctum_delete_credential | Delete a credential |
sanctum_search_credentials | Search credentials by pattern |
sanctum_get_audit_log | View recent audit entries |
sanctum_check_policy | Simulate a policy decision |
Why a Protocol?
CRP exists because raw vault access isnβt safe for AI agents. The protocol adds:
- Identity verification β The agent must prove who it is before every request
- Policy enforcement β Access is checked against the policy engine, not just βcan you connectβ
- Time-limiting β Secrets are leased, not permanently exposed
- Audit trail β Every resolution attempt is logged, whether it succeeds or fails
- Rate limiting β Agents canβt brute-force access to secrets
Without CRP, an AI agent with MCP access would have unrestricted access to the entire vault β the equivalent of giving every employee the root password.