Zero-Trust Security for AI Infrastructure
Security is a core design constraint, not a feature. Every request is authenticated, every secret is encrypted, every action is audited.
Zero-trust by design
AI Gateway follows zero-trust principles: verify explicitly, use least-privilege access, and assume breach. No implicit trust — every request proves its identity.
Verify every request explicitly
Every API call is authenticated — no implicit trust. User sessions use Ed25519-signed JWTs (EdDSA) with short-lived expiry. API keys are validated via SHA-256 hash lookup through a Redis cache with PostgreSQL fallback. No request reaches a provider without passing the auth middleware chain.
Least-privilege access control (RBAC)
Granular role-based access control with 9 permission scopes (keys:read, keys:write, configs:read, configs:write, audit:read, audit:export, stats:read, read-only, admin) and 4 predefined roles (super-admin, admin, operator, viewer). API key scopes restrict each integration to exactly the operations it needs.
AES-256-GCM encryption at rest
Provider credentials are encrypted with AES-256-GCM using authenticated additional data (AAD) binding each ciphertext to its tenant, provider, and credential ID. Virtual keys are stored in an in-memory AES-256-GCM vault. API keys are persisted as SHA-256 hashes only — plaintext is never stored after initial issuance.
Tenant isolation & data segregation
Each tenant receives its own isolated gateway instance with independent routing configuration and provider credentials. Tenant IDs propagate through every request context ensuring data queries are always scoped. Cross-tenant data access is architecturally impossible.
Security controls across every layer
TLS everywhere + HSTS preload
All traffic encrypted with TLS 1.2+. Strict-Transport-Security enforced at max-age=2 years with includeSubDomains and preload. Content-Security-Policy restricts frame-ancestors to 'none', X-Frame-Options set to DENY, and Referrer-Policy set to strict-origin-when-cross-origin.
Ed25519 JWT with key rotation
Authentication tokens are signed with Ed25519 (EdDSA) — faster and more secure than RSA. Hot-reloading key rotation allows zero-downtime key changes. A JWKS endpoint publishes verification keys. Token revocation uses a hybrid Redis + PostgreSQL deny-list so logged-out tokens cannot be reused.
SSO: OIDC & SAML 2.0 federation
Enterprise SSO via OpenID Connect and SAML 2.0 with configurable role mapping, claim extraction, and clock-skew tolerance. Social OAuth supported for GitHub, Google, LinkedIn, and Microsoft. Centralised identity federation means no shared passwords across services.
Immutable audit logging
Every control-plane action is recorded with actor identity, timestamp, source IP, resource type, and action taken. Audit logs are queryable by tenant, actor, action, resource, and time range. Exportable for SIEM integration (Splunk, Datadog, Elastic) with Ed25519-signed export payloads.
Multi-layer rate limiting
Redis-backed sliding-window rate limiter using atomic Lua scripts. Separate rate-limit tiers for authentication endpoints (per-IP) and gateway proxy requests (per-API-key). Standard X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers on every response.
AI guardrails & prompt injection defence
Built-in evaluators detect prompt injection attacks (system override, role manipulation, instruction leakage, delimiter attacks), scan for PII (emails, phone numbers, SSNs, credit card numbers), and run content moderation. Custom guardrail rules via CEL expressions or external webhook evaluators.
No payload training — data sovereignty
Request and response payloads proxied through AI Gateway are never used to train machine-learning models. Plan-based retention policies automatically purge logs after 3, 30, or 90 days. Enterprise customers can configure custom retention windows.
Hardened container runtime
Production containers run as a non-root user on minimal Alpine images with CGO disabled. No shell access in production. Dependencies are pinned and scanned for CVEs on every CI build. Docker HEALTHCHECK ensures only healthy instances serve traffic.
Security headers & CORS allowlist
Every response includes X-Content-Type-Options: nosniff, X-Frame-Options: DENY, Content-Security-Policy, Permissions-Policy (camera, microphone, geolocation denied), and HSTS. CORS origins are explicitly allowlisted — wildcard origins log a warning in production.
Data integrity monitoring
Background integrity monitor continuously validates that analytics pipelines reflect actual request traffic. Detects all-zero anomalies in global stats while tenants have active traffic and emits automated data integrity alerts for investigation.
Password security & credential hygiene
Passwords require minimum 10 characters with uppercase, digit, and special character. Common-password blocklist prevents weak credentials. Refresh tokens are SHA-256 hashed before storage. API key rotation is a single REST call with zero downtime.
Adversarially tested auth stack
The authentication middleware is covered by a dedicated adversarial test suite (internal, not a third-party penetration test) validating: missing headers, empty bearers, Basic auth injection, token prefix attacks, SQL injection in bearer tokens, header injection, duplicate auth headers, path traversal, and scope escalation attempts.
AES-256
Encryption Standard
Ed25519
JWT Signing
9
RBAC Scopes
12
Guardrail Evaluators
Responsible Disclosure Programme
We welcome security researchers who responsibly disclose vulnerabilities. If you believe you have found a security issue in any Ferro Labs product or infrastructure, please report it to us before publicly disclosing it.
Contact: security@ferrolabs.ai
Please include a clear description of the vulnerability, the affected component, steps to reproduce it, and your assessment of impact. We will acknowledge receipt within 2 business days and provide a resolution timeline as quickly as possible.
Scope
In-scope assets include:
- ferrolabs.ai and all subdomains (app, api, docs, status).
- github.com/ferro-labs/ai-gateway — the open-source gateway.
- FerroCloud — the hosted multi-tenant platform.
Out of scope: social engineering attacks, physical security, third-party services (AWS, Cloudflare, etc.).
Our Commitments
- We will not pursue legal action against researchers who follow this policy in good faith.
- We will keep you informed of progress toward resolving the issue.
- We will credit you in our security advisories unless you prefer to remain anonymous.
Compliance Roadmap
Ferro Labs is actively working toward formal compliance certifications. Our current roadmap includes:
- SOC 2 Type II remains on the compliance roadmap. No completed report or certification is currently published.
- GDPR and data-processing (DPA) requests are handled through our privacy review path and customer agreement process.
- HIPAA/BAA requirements are evaluated for enterprise deployments and depend on product surface, hosting model, and contractual scope.
The Trust Center is the canonical, always-current source for compliance status. For enterprise compliance documentation or custom security reviews, contact security@ferrolabs.ai.
Need a security review?
Request our enterprise security whitepaper, schedule a compliance walkthrough, or discuss your specific security requirements.