Aller au contenu principal

Design Decisions Ratification

This document records the ratified design decisions that underpin the Noxys platform. It is the canonical entry point for new contributors who need to understand why the system is built the way it is — not just how.

Every decision below is backed by an Architecture Decision Record (ADR) in the internal vault (Noxys/03 - Decisions/). When an ADR ID is cited (e.g. ADR-010), it is the authoritative source; this page is a curated digest.

Reviewing this document

Tech leads ratify changes via PR. Open an RFC issue in noxys-doc before proposing an amendment. Out-of-band changes (Slack, email) are non-binding.


1. Architecture

1.1 Three-Deployment-Method Model

Noxys ships in exactly three deployment topologies. Any proposal for a fourth is rejected by default to keep the contract surface small.

MethodWhere it runsPrimary use caseLatency cost
Browser ExtensionUser device (Chrome/Edge/Firefox/Safari)Shadow-AI discovery, prompt interception on consumer SaaS AI toolsNone (in-browser)
Endpoint AgentUser device (Windows/macOS/Linux)Native LLM clients, IDE plugins, terminal-based AI< 5 ms local hook
Forward / Reverse ProxyCustomer network or Noxys SaaS edgeServer-to-AI traffic, agent platforms, batch pipelines< 30 ms p95

Rationale: each method addresses a distinct interception point; covering all three guarantees no AI egress channel escapes policy enforcement.

Refs: ADR-005, ADR-019.

1.2 Multi-Tenant Isolation via Postgres RLS

All tenant data is isolated through PostgreSQL Row-Level Security (RLS) policies driven by current_setting('app.tenant_id'). Application code never filters by tenant_id directly — RLS is the floor.

  • Single shared database, schema-level isolation per logical concern.
  • SET LOCAL app.tenant_id is enforced at every connection checkout (Go middleware) and tested in CI via a "tenant escape" fuzz suite.
  • Cross-tenant queries (admin only) require an explicit BYPASSRLS role with audit logging.

Refs: ADR-002, ADR-018.

1.3 Stack

LayerChoiceWhy
APIGo 1.22+Predictable latency, native concurrency for proxy, small binary, mature TLS
Console (web UI)TypeScript + React + ViteEcosystem, i18n maturity, fast HMR for design iteration
Browser extensionTypeScript + Manifest v3 (Plasmo)Cross-browser parity, modern service-worker model
Endpoint agentGo (shared with API)One language across server-side surfaces
DatabasePostgreSQL 16+Native RLS, partial indexes, JSONB, logical replication
Cache / queueRedis 7+Token-bucket rate limiting, ephemeral session state
Object storageS3-compatible (MinIO self-hosted, AWS S3 SaaS)Portability, EU regions
BillingStripeEU VAT MOSS, SCA, established

Refs: ADR-001, ADR-003, ADR-009.


2. AI Provider Strategy

2.1 EU-Sovereign First

The default upstream LLM for detection, classification, and coaching is Mistral (EU-hosted, FR jurisdiction). Customer-facing AI features may use other providers only via an opt-in policy.

2.2 Internal Engineering AI

Internal code generation (developer tooling, not customer data) is permitted to use Anthropic Claude. No customer prompts or PII ever leave the EU detection pipeline through this channel.

2.3 Multi-Provider Routing

The proxy supports policy-driven routing across providers via the PROXY-6 adapter layer. Supported providers as of 2026-Q2:

  • EU: Mistral, Aleph Alpha, OVHcloud AI Endpoints
  • US (opt-in): OpenAI, Anthropic, Google Gemini, AWS Bedrock
  • Self-hosted: vLLM, Ollama, llama.cpp endpoints

Refs: ADR-007, ADR-021, PROXY-6 sprint spec.


3. Data Residency

  • Default: EU-only. All databases, object stores, queues, and inference endpoints reside in EU regions (FR/DE/NL primary).
  • Tenant choice: Enterprise tenants may pin region (eu-fr, eu-de, us-east-1) at provisioning. Migration between regions is a paid service.
  • Sub-processor map: Live at /legal/sub-processors. Updated within 30 days of any change per GDPR Art. 28.

Refs: ADR-004, /legal/sub-processors.


4. Compliance Frameworks Supported

FrameworkScopeStatus
GDPREU personal data, DPIA, Art. 30 registerNative
NIS2Critical entities, incident reportingNative
DORAFinancial sector ICT riskNative (Enterprise)
EU AI ActHigh-risk AI use, transparency obligationsNative
ISO/IEC 22989AI concepts and terminologyAligned
ISO/IEC 23053AI/ML frameworkAligned
OECD AI PrinciplesTrustworthy AIAligned
HIPAAUS healthcare PHIOptional add-on (US region)
PCI-DSS v4.0Payment card dataInherited via Stripe; PAN never stored
SOC 2 Type IISecurity & availabilityRoadmap 2026-Q4

Refs: /security/compliance, ADR-012.


5. Authentication & Identity

5.1 JWT with jti Revocation

API tokens are short-lived JWTs (15 min) with a refresh token (7 days). Every JWT carries a jti claim checked against a Redis revocation set on each request — enabling instant logout and breach response.

Refs: ADR-013, AGENT-3 sprint.

5.2 MFA — TOTP Mandatory for Admins

TOTP (RFC 6238) is the mandatory second factor for any console role with write scope. WebAuthn/passkey support is planned for 2026-Q3.

Refs: ADR-014, CON-8 sprint.

5.3 SSO

Supported IdPs: Microsoft Entra ID, Google Workspace, Okta, generic SAML 2.0, generic OIDC. SCIM 2.0 for provisioning.

Refs: ADR-015, /integrations/sso-configuration.


6. Pricing & Packaging

Three tiers (post-ADR-010, which collapsed the prior 4-tier Starter/Business split into a single Pro tier).

TierPriceSeatsTarget
Free€0Up to 8 usersDiscovery, individuals, evaluation
Pro€12 / user / monthUnlimitedSMB and mid-market
EnterpriseCustomUnlimitedRegulated industries, self-hosted, custom DPA

Refs: ADR-010.


7. Detection Layer

Noxys uses a multi-method ensemble for prompt risk detection. No single method gates a decision — votes are weighted by signal class.

MethodStrengthLatency budget
Regex (curated rule packs)Deterministic, fast, explainable< 1 ms
Microsoft Presidio (analyzers)Mature PII NER, broad locale coverage< 20 ms
Mistral classifier (small distilled model)Context-aware, multilingual semantic risk< 80 ms
Z-score baseline (per-user behavioural)Anomaly detection on prompt volume, length, topic shiftAsync (offline)

The orchestrator merges signals and emits a single decision: allow, coach, redact, or deny.

Refs: ADR-016, ADR-022.


8. DLP & SIEM Integrations

Out-of-the-box egress to external security tooling:

  • CEF over Syslog (UDP/TCP/TLS) — Splunk, QRadar, ArcSight, Sekoia, HarfangLab
  • Generic webhook (HMAC-signed) — any downstream
  • Microsoft Purview — labels, DLP policies, incidents
  • Microsoft Sentinel — Log Analytics ingestion
  • Microsoft Defender for Cloud Apps — Shadow-AI catalog sync

Refs: ADR-017, /integrations/overview.


9. Prompt Storage Tiers

Captured prompts are stored under one of four storage classes, tier-gated and per-tenant KMS-encrypted. By default, no Noxys staff has raw access.

ClassContent retainedDefault tierKMS
AggregateCounts and risk-class histograms onlyFreePlatform KMS
HashedSHA-256 of normalised prompt; no plaintextProPlatform KMS
RedactedPrompt with detected entities replaced by tagsPro / EnterprisePer-tenant KMS
RawFull plaintext prompt + responseEnterprise (opt-in)Per-tenant KMS, dual-control unseal

Refs: ADR-020.


10. API Contract Discipline

10.1 OpenAPI 3.1 Mandatory

Every public API endpoint must ship with an OpenAPI 3.1 spec in the same PR that adds it. CI gate (openapi-lint + oasdiff breaking) blocks merges that violate this rule.

Backfill obligation: ADRs 014 through 024 carry a backfill task for any pre-existing endpoint missing a spec.

10.2 Versioning

URI-versioned (/v1/, /v2/). Breaking changes require:

  1. New major version path.
  2. Old version supported for 12 months minimum.
  3. Deprecation notice in Sunset HTTP header per RFC 8594.

Refs: ADR-023, ADR-024.


11. Where to Go Next


Change log

DateChangeAuthor
2026-05-13Initial ratification doc (DOC-5, closes #20).Tech leads