# GreenOps AI Studio — Enterprise Security Architecture  
## Due Diligence Brief for Legal & IT (Purchase Negotiations)

| Field | Value |
| --- | --- |
| **Document ID** | `GO-DD-SEC-ARCH-1.0` |
| **Classification** | Confidential — Customer Legal / IT / Procurement |
| **Audience** | In-house counsel, DPO, CISO, enterprise procurement |
| **Provider** | COPYCOMP SRLS (Italy / European Union) — product **GreenOps AI Studio** |
| **Control Plane** | Cloudflare Workers · EU edge placement `gcp:europe-west1` |
| **Version** | 1.0.0-enterprise |
| **Effective** | 2026-11-04 |
| **Status** | Ready for counsel review (technical due diligence) |

> **Nature of this document.** This brief describes **technical and organisational measures (TOMs)** implemented by the GreenOps Control Plane. It is intended to accelerate security questionnaires and vendor risk assessments during enterprise acquisition. It is **not** legal advice, does not constitute a data processing agreement (DPA) by itself, and does not replace the Master Service Agreement (MSA) or the GDPR / EU AI Act attestation issued via `GET /v1/admin/legal-pack`.

---

## 1. Executive summary (for counsel)

GreenOps AI Studio is an **OpenAI-compatible LLM control plane** operated at the **European edge**. Before any request may reach an external model provider (Google Gemini, OpenAI) or an on-premises runtime (Ollama / GPU cluster), the Worker applies:

1. **Zero-Data Retention** toward external LLMs for sealed personal data (no plaintext PII egress).  
2. **Mandatory AES-256-GCM sealing** of sensitive spans (WASM / edge), with upstream masking.  
3. **Immutable SHA-256 hash chains** for (a) EU AI Act audit logs and (b) CSRD / ESRS E1 ESG efficiency ledger.  
4. **Departmental RBAC** (`X-User-Role`: User · FinOps · Compliance · Admin) separating chat text from cost/audit surfaces.  
5. **Multi-provider resilience** (millisecond failover / hedge) with optional **national air-gap** kill-switch that blocks 100% of cloud egress.

**Procurement takeaway:** the architecture is designed for **European data-protection alignment (GDPR)** and **AI traceability (EU AI Act)**, with cryptographic evidence exportable for Legal, Compliance, and Sustainability filings.

---

## 2. System boundary (what is in / out of scope)

### 2.1 In scope (GreenOps Control Plane)

| Component | Role |
| --- | --- |
| Cloudflare Worker (EU placement) | AuthN gateway, sanitisation, PII seal, routing, failover, telemetry |
| Cloudflare KV | Semantic cache fingerprints, analytics aggregates, audit/ESG chains, licences |
| Studio / Docs / OpenAPI | Operator UX; interactive spec; validation report |
| On-prem hop (optional) | Customer-reachable Ollama / vLLM / GPU HTTPS endpoint |

### 2.2 Out of scope (third-party / Customer)

| Party | Responsibility |
| --- | --- |
| Upstream LLM providers (Gemini, OpenAI) | Their own processing once a **masked** request is accepted |
| Customer prompts & uploaded documents | Lawful basis, content risk, internal policies |
| Customer local LLM cluster | Physical security, patching, network ACLs of on-prem nodes |

---

## 3. Zero-Data Retention (ZDR)

### 3.1 Policy statement

**GreenOps applies a Zero Retention edge policy for sealed personal data destined to external LLM providers.**

| Control | Implementation |
| --- | --- |
| Header attestation | Response `X-GreenOps-Retention: zero` |
| Edge policy label | `X-GreenOps-Edge-Policy: eu-zero-retention+premask` |
| Upstream mask | `X-GreenOps-Upstream-Mask: required` before Gemini / OpenAI |
| Cache | Semantic cache stores **token bags / digests**, not plaintext PII |
| Sealing | AES-256-GCM (`GOENC` tokens); open only with authorised key material |

### 3.2 What “Zero Retention” means in practice

1. Sensitive spans are **sealed or replaced with placeholders** before cloud upstream calls.  
2. The Control Plane does **not** persist raw PII plaintext in the semantic cache KV used for HIT routing.  
3. Chat history (when enabled) stores sealed content under tenant keys; FinOps / Compliance roles **never** receive chat bodies (`X-GreenOps-Privacy: chat_text_redacted` / `audit_only`).  
4. National **air-gap** mode (`POST /v1/sovereignty/air-gap`) can **disable all cloud egress**, forcing 100% traffic to Worker-reachable local nodes — used for geopolitical / national emergency isolation (`X-GreenOps-Data-Leakage: zero`).

### 3.3 Counsel note

Zero Retention describes **GreenOps edge behaviour**. Upstream providers may still process the **masked** prompt under their terms. Customer DPAs with those providers remain Customer’s responsibility unless otherwise contracted.

---

## 4. Cryptographic integrity — Audit trail & ESG Ledger (SHA-256)

> **Precision for IT security reviewers:** SHA-256 is used for **cryptographic hashing / chain integrity** (tamper-evident logs), not as a bulk data encryption cipher. **Confidentiality of PII** relies on **AES-256-GCM**. Integrity of compliance artefacts relies on **SHA-256 linked blocks**.

### 4.1 EU AI Act audit chain — `GET /v1/audit/logs`

| Property | Detail |
| --- | --- |
| Algorithm | SHA-256 |
| Structure | Each block includes `prevHash` → `hash` (genesis = 64 zero hex) |
| Fields (representative) | timestamp, requestId, model, tokens, costUsd, co2Grams, piiCount, risk metadata, role |
| Verification | Response `chainValid` recomputes the chain; head in `X-Audit-Hash` |
| Access | **Compliance** and **Admin** only (`rbac_denied` otherwise) |
| Immutability claim | Append-only logical chain; alteration breaks verification |

### 4.2 ESG / CSRD ledger — `GET /v1/esg/ledger`

| Property | Detail |
| --- | --- |
| Framework | CSRD · standard **ESRS E1** · disclosure **E1-6** |
| Integrity | Per-credit `blockHash` / `prevHash` (SHA-256); `verification.chainValid` |
| Response headers | `X-GreenOps-Esg-Ledger-Hash`, `X-Export-Reports: csrd-ledger` |
| Purpose | Verifiable ecological-efficiency credits (cache HIT, smart routing, RAG compression) for sustainability reporting |
| Related | `GET /v1/esg/savings-chain` — SHA-256 savings chain (CO₂ / energy) |

### 4.3 Document integrity for Legal packs

MSA and GDPR/EU AI Act attestation HTML documents include a printed **`contentSha256`** digest for counsel countersignature workflows (`GET /v1/admin/legal-pack`).

---

## 5. GDPR alignment (Reg. EU 2016/679) — TOMs summary

| GDPR theme | GreenOps measure |
| --- | --- |
| Data minimisation | Only operational fields needed for routing, quota, FinOps/ESG aggregates |
| Confidentiality | AES-256-GCM seal; mandatory pre-mask; RBAC privacy boundaries |
| Integrity & availability | SHA-256 chains; multi-provider failover; EU edge placement |
| Accountability | Audit logs; OpenAPI validation report; Admin legal pack with hash |
| Access control | Bearer / `X-Proxy-Auth` + departmental `X-User-Role` |
| International transfers | Prefer EU edge; Customer may force **local-only** / **air-gap** to avoid cloud providers |
| Data subject rights | Customer is controller of prompt content; GreenOps supports export/deletion of Studio chat KV per contractual process |

**Roles (RBAC matrix — abbreviated)**

| Role | Chat text | FinOps / analytics | Audit / ESG ledger | Admin legal / air-gap |
| --- | --- | --- | --- | --- |
| User | Yes | Own / limited | No | No |
| FinOps | **No** | Global costs / export | Ledger (export) | No |
| Compliance | **No** | No dashboards | **Yes** | Air-gap status (read) |
| Admin | Yes | Yes | Yes | **Yes** |

Denied calls return HTTP **403** with `code: rbac_denied` and `allowedRoles`.

---

## 6. EU AI Act — traceability & risk signals

| Expectation | Control Plane evidence |
| --- | --- |
| Logging of relevant events | Immutable audit blocks (model, tokens, risk, sanitize outcome) |
| Human oversight surfaces | Compliance-only audit API; Admin legal attestation |
| Transparency to operators | Response headers: route, sanitize, retention, carbon, failover |
| Security against misuse | Heuristic prompt sanitisation (`X-GreenOps-Sanitize`); jailbreak block path |
| High-risk process support | Customer remains responsible for classifying its own AI use case; GreenOps supplies the **technical trail** |

Machine-readable OpenAPI compliance stamp:  
`GET /v1/openapi/validation` · header `X-GreenOps-OpenApi-Validated`.

---

## 7. Multi-provider resilience & continuity

### 7.1 Design goal

Enterprise continuity class **99.999%** (declared uptime class header `X-GreenOps-Uptime-Class`) via:

| Mechanism | Behaviour |
| --- | --- |
| Smart routing | Complexity-aware Flash / local / premium selection |
| Carbon-aware routing | Prefer lower gCO₂/kWh EU grids for non-urgent tasks |
| Failover cascade | Primary → alternate cloud → local GPU safety net |
| Hedge | Second hop starts in ~280 ms without waiting full primary timeout |
| Hybrid confidentiality | Header `X-GreenOps-Confidentiality` values: hybrid, local-only, confidential |
| Circuit breaker | Temporary open on repeated provider failures |

### 7.2 Sovereignty air-gap (national / geopolitical emergency)

| Endpoint | `GET/POST /v1/sovereignty/air-gap` |
| --- | --- |
| Effect when armed | **100%** traffic diverted to local Ollama/cluster; Gemini/OpenAI hops removed |
| Headers | `X-GreenOps-Air-Gap: active`, `X-GreenOps-Cloud-Egress: blocked`, `X-GreenOps-Data-Leakage: zero` |
| Config | Runtime KV flag + optional env hard-lock `SOVEREIGNTY_AIRGAP=forced` |
| Failure mode | HTTP 503 `airgap_local_endpoint_required` if no Worker-reachable local URL — **prefer fail-closed over cloud leakage** |

---

## 8. Evidence pack for vendor questionnaires (copy/paste)

Counsel / IT may cite the following **live artefacts**:

| Artefact | URL / API |
| --- | --- |
| Interactive docs | `https://greenops-ai-proxy.copycomp-ai.workers.dev/docs` |
| **This due diligence brief** | `https://greenops-ai-proxy.copycomp-ai.workers.dev/docs/enterprise-due-diligence` |
| Markdown source | same path with `?format=md` |
| OpenAPI 3.0.3 | `GET /v1/openapi.json` |
| Spec validation report | `GET /v1/openapi/validation` |
| Health + sovereignty posture | `GET /v1/health` |
| Audit chain | `GET /v1/audit/logs` (Compliance/Admin) |
| ESG ledger | `GET /v1/esg/ledger` |
| MSA + GDPR/EU AI Act pack | `GET /v1/admin/legal-pack` (Admin) |
| Air-gap control | `GET/POST /v1/sovereignty/air-gap` |
| Studio | `https://www.greenopsstudio.com/` |

Suggested questionnaire answers (short form):

1. **Where is processing?** EU edge Worker (`gcp:europe-west1` placement).  
2. **Is PII encrypted?** Yes — AES-256-GCM seal before external LLM calls.  
3. **Do you retain prompts at providers?** Edge policy Zero Retention for sealed PII; masked prompts only.  
4. **Auditability?** SHA-256 linked audit + ESG ledger with verification flags.  
5. **Can we go fully on-prem?** Yes — local-only confidentiality or sovereignty air-gap.  
6. **Separation of duties?** RBAC: FinOps never sees chat; Compliance limited to trails.

---

## 9. Limitations & reservations (mandatory for Legal)

1. This brief **does not** create warranties beyond the executed MSA / Order Form.  
2. Upstream model providers are **independent controllers/processors** for accepted upstream payloads.  
3. Cryptographic chain integrity assumes correct Worker/KV operation; Customers should periodically call verification endpoints.  
4. Air-gap effectiveness requires a **Worker-reachable** local endpoint (not `localhost` on the Cloudflare isolate).  
5. CSRD narrative support is **technical evidence**, not a substitute for the Customer’s statutory sustainability reporting obligations.  
6. Italian / EU law and Milan courts apply as per MSA unless otherwise agreed.

---

## 10. Document control & contact

| Item | Detail |
| --- | --- |
| Provider legal entity | COPYCOMP SRLS |
| Product | GreenOps AI Studio / GreenOps AI Control Plane |
| Legal / enterprise contact | support@greenopsstudio.com · legal@greenopsstudio.com |
| Philosophy | Made in Italy — quality, ethics, transparency |
| Change control | Version bumps with Worker release notes; hash of this Markdown may be requested for archival |

---

## 11. Sintesi in italiano (per Legale & IT aziendali)

**GreenOps AI Studio** è un control plane LLM sull’**edge UE** che, prima di qualsiasi chiamata a Gemini/OpenAI (o a nodi Ollama on-prem):

- applica **Zero-Data Retention** sul PII sigillato (`X-GreenOps-Retention: zero`);  
- cifra gli span sensibili in **AES-256-GCM** e maschera obbligatoriamente l’upstream;  
- mantiene catene **SHA-256** immutabili per **audit EU AI Act** e **ledger ESG CSRD (ESRS E1)**;  
- separa i reparti via **RBAC** (FinOps senza testo chat; Compliance sugli audit);  
- garantisce **resilienza multi-provider** (failover/hedge) e un **kill-switch air-gap** nazionale a zero egress cloud.

Questo documento è la **scheda di due diligence tecnica** da allegare alle trattative d’acquisto. Per i contratti eseguibili usare `GET /v1/admin/legal-pack` (MSA + attestato). Per la prova live: `/docs/enterprise-due-diligence`.

---

*End of Enterprise Security Architecture — Due Diligence Brief (`GO-DD-SEC-ARCH-1.0`).*
