Skip to main content
This document defines AgentVault’s security goals, enumerates threat actors, identifies high-value assets, and maps each threat scenario to specific mitigations. Honest limitations are documented alongside protections.

Security Goals

High-Value Assets

These are the assets an attacker would target, ranked by impact:

Threat Actors

External Attacker

Capability: Network access, public endpoint probing, credential stuffing.

Malicious Tenant Member

Capability: Valid authentication within their tenant.

Compromised Device

Capability: Full access to one device’s keys and state.

Rogue Administrator

Capability: Tenant admin privileges (invite, approve, revoke devices).

Backend Breach

Capability: Full database access and/or server code control.
This is the scenario AgentVault is specifically architected to survive. A full backend compromise exposes only ciphertext, public keys, and metadata. No message content can be recovered.

Network Attacker (MITM)

Capability: Intercept and modify network traffic.

Key Threat Scenarios

1. Backend Database Breach

Mitigation: Ciphertext-only storage. No server-side keys. BYTEA columns for all cryptographic material.

2. Compromised Agent Device

Mitigation: Owner revokes the device, which immediately closes WebSocket connections and returns 403 on all API calls. Owner re-enrolls with a new invite. New X3DH key agreement establishes fresh keys.

3. RLS Misconfiguration

Mitigation: RLS is enforced at the database level, independent of application code. Even a query that omits tenant_id in its WHERE clause is filtered by the RLS policy. The app.current_tenant_id session variable is set by middleware on every request.

4. Enrollment Social Engineering

Mitigation: Device fingerprint verification during approval. Fingerprints are displayed as hex-encoded BLAKE2b hashes that the owner compares against the agent’s console output. Short-lived invites (10-minute expiry) limit the attack window. Single-use tokens prevent reuse.

Rate Limits

Non-Goals

Being explicit about what AgentVault does not protect against is a deliberate security practice. Overstating security claims erodes trust; honest limitations build it.

Security Validation Checklist

These properties are verified continuously:
  • Only ciphertext exists in the messages table (no TEXT columns)
  • Only ciphertext traverses the wire (WebSocket payloads are BYTEA)
  • RLS blocks cross-tenant access (verified via integration tests)
  • Expired and reused invite tokens are rejected
  • Revoked devices receive 403 on all endpoints
  • No key material appears in server logs
  • Rate limits enforce enrollment and messaging boundaries
  • npm audit and pip audit show no critical vulnerabilities