Security Architecture

Last updated: December 2026

Built to keep your Cloudflare credentials encrypted, your sessions hardened against token replay, and your production traffic off our servers.

01

Data at Rest — AES-256-GCM

Cloudflare credentials (Account ID, API token, and OAuth tokens) and TOTP secrets are encrypted with AES-256-GCM before being persisted to MongoDB Atlas.

Each encrypted field stores its own IV and GCM authentication tag alongside the ciphertext. ENCRYPTION_KEY must be an exact 32-byte (64-hex-character) secret in the server environment — the backend fails fast at startup if it is missing or invalid.

Immutable Session snapshots store origin URLs, weights, routing strategies, and generated Worker scripts — never plaintext credentials.

02

Data in Transit & Session Hardening

All browser, API, Cloudflare, and MCP traffic uses TLS encryption. Dashboard authentication uses JWTs stored in httpOnly cookies with SameSite=Strict and a 24-hour expiry.

Two-factor login challenges use a separate 5-minute eb_2fa cookie carrying a stage claim. Authenticated endpoints strictly reject any token with a stage claim, preventing challenge-token escalation.

CORS is locked to configured client origins, and API error responses never leak stack traces, internal secrets, or raw credentials.

03

Two-Factor Authentication (TOTP & Passkeys)

EdgeBalancer supports authenticator TOTP apps and WebAuthn Passkeys. 2FA is active only when at least one confirmed device is registered.

TOTP codes are protected by a 90-second single-use replay lock in Redis so an intercepted code cannot be reused within the same verification window.

04

MCP OAuth 2.0 + PKCE & Concurrency Locks

External AI clients connecting to https://apiedge.nexoral.in/mcp authenticate via OAuth 2.0 with PKCE and Dynamic Client Registration, scoped to mcp:read and mcp:write.

Every Worker create/update/delete operation claims a distributed Redis lock (lb:create:{accountId}:{scriptName}) and executes automatic rollback only while holding that lock.

05

Zero Traffic Proxying & Instant Revocation

EdgeBalancer is strictly a control plane. Production traffic flows directly between Cloudflare edge PoPs and your origin servers — we never inspect or store request payloads.

One Cloudflare account maps to one EdgeBalancer account. Rotating your Cloudflare token or revoking OAuth access in Cloudflare cuts control-plane access immediately while deployed Workers continue running.

06

Responsible Vulnerability Disclosure

Discovered a security issue in EdgeBalancer? Please report it privately with reproduction steps so we can investigate and patch promptly.