Encryption at Rest
All sensitive data stored by Raven is encrypted using AES-256-GCM, the industry standard for authenticated encryption.- Algorithm —
aes-256-gcmwith a 16-byte initialization vector and 16-byte authentication tag - Key derivation — PBKDF2 with SHA-512 and 100,000 iterations ensures encryption keys are resistant to brute-force attacks
- What is encrypted — Provider API keys, webhook signing keys, and any credentials stored in the platform
AES-256-GCM provides both confidentiality and integrity. The authentication tag ensures that ciphertext cannot be tampered with without detection.
Encryption in Transit
All traffic to and from Raven is encrypted with TLS 1.2+.- API endpoints enforce HTTPS — plaintext HTTP connections are rejected
- Upstream requests to LLM providers use TLS
- Internal service-to-service communication uses encrypted channels
API Key Hashing
Virtual keys issued to your applications are hashed before storage. Raven never stores the raw key material in the database.PBKDF2 Key Derivation
Provider API keys are encrypted before storage using a key derived via PBKDF2:| Parameter | Value |
|---|---|
| Algorithm | PBKDF2 |
| Hash function | SHA-512 |
| Iterations | 100,000 |
| Key length | 256 bits (32 bytes) |
| Salt | Application-scoped constant |
Security Headers
Every response from Raven includes security headers to protect against common web attacks:| Header | Value | Purpose |
|---|---|---|
Strict-Transport-Security | max-age=31536000 | Forces HTTPS |
X-Content-Type-Options | nosniff | Prevents MIME sniffing |
X-Frame-Options | DENY | Prevents clickjacking |
X-XSS-Protection | 1; mode=block | Legacy XSS protection |
Referrer-Policy | strict-origin-when-cross-origin | Limits referrer leakage |
Request Body Size Limits
Raven enforces a 10 MB maximum request body size to prevent abuse and denial-of-service attacks. Oversized requests are rejected with a413 Payload Too Large response before any processing occurs.
Rate Limiting
Every virtual key can have independent rate limits. See Rate Limiting for details.- Requests per minute (RPM) — Short-term burst protection
- Requests per day (RPD) — Long-term usage caps
- Backed by Redis for distributed, low-latency enforcement
Multi-Layer Security Architecture
Requests pass through multiple security layers before reaching a provider:Guardrail Evaluation
Content is scanned for PII, prompt injection, and custom rules. See Prompt Injection Detection.
Data Protection
- Base64 filtering — Image data is automatically stripped from request logs to reduce storage and prevent sensitive image data from persisting
- Request ID tracking — Every request is assigned a unique ID for tracing
- Audit logging — All administrative actions are recorded with actor, timestamp, and details
Infrastructure Security
| Component | Security Feature |
|---|---|
| PostgreSQL | Encrypted connections, role-based access |
| Redis | Memory-limited with LRU eviction, used for rate limits and caching |
| API | Hono framework with security middleware stack |
| Web | Next.js with CSP headers |
Next Steps
Rate Limiting
Control request throughput per key.
Prompt Injection
Detect and block injection attacks.