Security
How we protect your credentials, your data, and your request path.
1. No-proxy architecture
ModelBrake never sits between your application and your provider. We poll provider usage APIs on a schedule — every 15 minutes for OpenAI, Anthropic, and Vercel AI Gateway, every 6 hours for AWS Bedrock. Your prompts, completions, and model inputs/outputs never touch our infrastructure. We cannot read them, store them, or slow them down.
This means we add zero latency to your inference calls and have zero access to your application data. The tradeoff is a detection gap: spend that occurs between polls is not visible until the next poll completes. For most teams, 15 minutes is fast enough to catch a four-figure spike before it becomes a five-figure invoice.
2. Credential encryption
Every provider credential you store with ModelBrake is encrypted with AES-256-GCM before it reaches the database. The encryption key is held as an environment variable on the application server, never in the database itself. What the database stores is ciphertext and a per-record initialization vector.
The dashboard displays only the last 4 characters of each key — enough to identify which key you are looking at, not enough to reconstruct it. The full key is decrypted only at poll time, in memory, for the duration of the API call.
3. Read-only by default, write-scoped only by opt-in
The credential you give ModelBrake for monitoring is a read-only admin or usage key. On OpenAI and Anthropic, this is an organization-level key that can read usage data but cannot call models or manage application keys. On Vercel, it is a read-scoped API token. On Bedrock, it is an IAM role with only ce:GetCostAndUsage and sts:AssumeRole permissions.
If you opt in to the kill switch (revoke-on-breach), you provide a second, write-scoped credential that can revoke a named application key. This credential is stored separately, encrypted with the same AES-256-GCM scheme, and used only when a spend ceiling is crossed. ModelBrake never asks for a single credential that can both read usage and call models.
4. Authentication
ModelBrake uses passwordless magic-link authentication. When you sign in, we email a one-time link valid for a short window. There are no passwords to store, leak, or brute-force. Sessions are managed by Supabase Auth with secure, httpOnly cookies.
5. Row-level security
Every table in the database is protected by Supabase row-level security (RLS) policies. Each account can only read and write its own rows. Even if an application bug bypassed our authorization checks, the database itself enforces isolation — a query for another account's data returns zero rows, not an error.
6. Bedrock IAM trust
For AWS Bedrock monitoring, you create a cross-account IAM role in your AWS account and grant ModelBrake's AWS account permission to assume it. The trust policy includes an external ID unique to your ModelBrake account — this prevents the confused-deputy problem, where a third party could trick ModelBrake into assuming a role it should not have access to.
The role you create has a read-only policy: it can call Cost Explorer to read aggregated spend data, nothing else. It cannot invoke models, manage resources, or access any other AWS service.
7. Transport
All traffic between your browser and ModelBrake is served over HTTPS. The application runs on Vercel's edge network with automatic TLS. API calls to providers use HTTPS with the provider's own certificate chain.
8. Third-party processors
- Supabase — database and authentication (hosted in AWS us-east-1).
- Stripe — payment processing. We store your Stripe customer ID and subscription ID; we never see or store card numbers.
- Resend — transactional email delivery.
- Vercel — application hosting.
- AWS — for Bedrock cost polling via STS AssumeRole and Cost Explorer (cross-account, read-only).
We do not sell, rent, or share your data with anyone else.
9. Data retention and deletion
We retain your data for as long as your account is active. If you cancel, we delete your provider keys (including encrypted credentials) and usage snapshots within 30 days. Your email stays on file only for billing records required by law. To request immediate deletion of all your data, contact us.
10. Incident contact
If you discover a security issue or suspect unauthorized access to your account, contact us with the subject “Security”. We will acknowledge within 24 hours and provide a timeline for resolution.