# Stanza Infrastructure — Enterprise Security Architecture & Compliance Whitepaper
**Document Version:** 2026.1 (Current)  
**Classification:** Public Security & Compliance Disclosure  
**Target Audience:** Chief Information Security Officers (CISO), Enterprise Architects, Compliance Officers  
**Platform URL:** https://stanzaapi.com/tools/  

---

## Executive Summary
Stanza Infrastructure operates a portfolio of high-velocity, pure-compute microservices and regulatory transformation engines (ANSI X12, ISO 20022, IBAN, DSCSA, UDI, VAT, LEI, GS1, IATA) running on Cloudflare Workers global Anycast edge isolates across 330+ data centers in 100+ countries.

Every microservice operates under a **Zero Data Retention ($f(x)=y$) Ephemeral Compute Architecture**:
- **0 Bytes of Request Payloads Stored:** Inbound transactional data exists solely in transient V8 isolate RAM for the milliseconds required to compute arithmetic transformations, after which it is immediately garbage collected.
- **0 Database Writes for Payload Processing:** No relational databases, document stores, or object storage buckets (S3/R2) are attached to hot payload pipelines.
- **0 External Subrequests:** Processing is 100% deterministic pure compute ($f(x)=y$). The worker cannot leak data through third-party outbound API calls.

---

## 1. Data Protection & Cryptography

### 1.1 Data in Transit
- **Protocols Enforced:** TLS 1.3 (with strict fallback to TLS 1.2 minimum). Older cipher suites (SSLv3, TLS 1.0, TLS 1.1) are rejected at the edge proxy.
- **Cipher Suites:** Modern AEAD ciphers only (`TLS_AES_128_GCM_SHA256`, `TLS_AES_256_GCM_SHA384`, `TLS_CHACHA20_POLY1305_SHA256`).
- **HSTS:** HTTP Strict Transport Security enabled with `max-age=31536000; includeSubDomains; preload`.

### 1.2 Data at Rest
- **Customer Payloads:** Zero persistence. Request bodies are never written to disk, cold storage, or application log files.
- **Metadata & Counters (D1):** Customer account IDs and integer monthly request counters are stored in Cloudflare D1 with AES-256 at-rest encryption. Zero payload strings are stored.

### 1.3 Authentication & Timing-Safe Verification
- **API Key Verification:** Authenticated via `Authorization: Bearer nk_live_...` or `x-api-key: nk_live_...` tokens hashed using cryptographic SHA-256 before verification.
- **Isolate Fast-Path:** In-memory V8 isolate caching with 60-second TTL guarantees constant-time validation without cold database lookups on hot paths.

---

## 2. Regulatory Compliance & Industry Standards

### 2.1 HIPAA (Health Insurance Portability and Accountability Act) — PROGRAM IN PROGRESS
- **Current Status: NOT HIPAA COMPLIANT.** Do not process live PHI or PII on any tier until compliance is formally announced on this page. Use synthetic, test, or fully de-identified payloads only.
- **Data Minimization Architecture:** PHI-bearing ANSI X12 transactions (837P, 835, 270/271) are processed entirely in volatile memory with zero retention — a necessary architectural foundation, not a compliance certification.
- **Business Associate Agreement (BAA):** Not yet available. BAA execution is on the compliance roadmap for Ultra and Mega enterprise subscribers.
- **Zero Logging of PHI:** Cloudflare Workers access logs record only HTTP metadata (status code, timing mark, IP routing); request and response bodies are excluded by design.

### 2.2 GDPR (General Data Protection Regulation) & EU Data Sovereignty
- **Article 28 Data Processing Agreement (DPA):** DPA and Privacy Policy are currently in progress. Contact us to be notified when self-serve DPAs become available. Do not route personal data under GDPR obligations until a DPA is in place.
- **Local Anycast Execution:** EU-originating requests are routed and executed directly inside European Cloudflare data centers (Frankfurt, Paris, London, Amsterdam).

---

## 3. Infrastructure & Resilience

### 3.1 High Availability & Disaster Recovery
- **Global Anycast Footprint:** 330+ data centers worldwide. Automated BGP Anycast routing routes around local ISP or data center failures in under 1 second.
- **Uptime Commitment:** 99.9% Service Level Agreement (SLA) with contractual 10%–50% financial penalty credits.

### 3.2 Denial of Service (DDoS) & Rate Limiting
- **Cloudflare Edge DDoS Shield:** Automated layer 3/4/7 DDoS mitigation absorbing multi-terabit volumetric attacks.
- **Per-Second Edge Rate Limiting:** Enforced via Cloudflare Rate Limiting bindings before requests reach compute logic.
- **Strict 512KB Payload Boundary:** Rejects bodies $>512\text{KB}$ with HTTP 413, preventing memory exhaustion and ReDoS vulnerabilities.

---

## 4. Vulnerability Management & Code Integrity

- **Deterministic Pure Functions:** All business logic is structured as linear data transformation pipelines without ambient global state.
- **Automated Anti-Cheat Test Suite:** 100% real black-box HTTP testing with strict $\ge 95\%$ branch coverage gates enforced in CI/CD.
- **Linear Regex Safety:** All parsers use anchored single-quantifier regular expressions with $O(N)$ linear complexity, eliminating Regular Expression Denial of Service (ReDoS).

---

## 5. Contact & Audits
- **Primary Security Contact:** `support@stanzaapi.com`
- **Compliance Portal:** https://stanzaapi.com/tools/compliance
- **Live Status & Telemetry:** https://stanzaapi.com/tools/status
