Tenant isolation
Every database query is workspace-scoped. PostgreSQL Row-Level Security (RLS) is used as defense-in-depth — even if application-level authorization has a bug, cross-tenant data access is blocked at the database layer.
- All usage events are keyed by workspace_id
- PostgreSQL RLS policies enforce workspace boundaries on every table
- Ingestion keys are scoped to a specific workspace and integration
- API validates and resolves workspace from the authenticated ingestion key — not from client-supplied fields
Privacy by default
Model Meter does not collect prompts or completions by default. The SDK only captures metadata needed for cost and usage tracking.
- No prompt text or completion text is transmitted or stored
- UsageEventV1 captures: provider, model, token counts, latency, status, and operation label
- No personally identifying data is collected
- No telemetry — Model Meter does not phone home from your application
Ingestion key security
Ingestion keys are created per-integration and scoped to a workspace. Only the SHA-256 hash of each key is stored — the plaintext is shown once at creation and never stored.
- Only the key hash is stored in the database (SHA-256)
- Keys are scoped to a workspace and cannot access data across workspaces
- INGESTION_KEY_SECRET is used to derive key identifiers — stored in environment variables, not source code
- Rotate keys in the admin UI without affecting other integrations
Transport and infrastructure
Standard TLS and infrastructure controls are used in production deployments.
- TLS in transit for all API communication
- Postgres credentials stored in environment variables via .env or a secrets manager
- Telemetry is sent asynchronously — it never blocks your AI requests
- AWS deployment (documented in docs/DEPLOYMENT.md) uses ECS Fargate in private subnets, RDS in private subnets, Secrets Manager for credentials
Vulnerability reporting
Report security vulnerabilities via the GitHub security advisory process at https://github.com/jayanti-prajapati/model-meter/security. Do not open public issues for security bugs. Response and patch timeline are documented in SECURITY.md in the repository.