Skip to main content

Level 3 — Components: noxys-api

The Component view zooms inside a single container. We document noxys-api here because it is the authoritative control plane and the most frequently modified backend service.

Diagram

Components

HTTP / API layer

ComponentResponsibility
Middleware chainAuthentication (JWT / API key), tenant resolution, rate limiting, request-id propagation, structured logging, OpenTelemetry tracing.
Extension handlersHigh-volume endpoints called by browser / VS Code extensions — event ingest, policy sync, catalog lookup. Optimised for low latency.
Admin handlersConsole-facing CRUD for policies, users, tenants, audit, reports.
Webhook handlersInbound webhooks from Stripe and IdP. Signed and replay-protected.

Domain services

ComponentResponsibility
Policy EngineEvaluates an AIInteraction against the active policy graph and returns a verdict (Block / Coach / Log). Implements default-deny (S2 sprint).
Audit ServiceIngests audit events, ensures prompt content is never persisted in raw form, fans out to SIEM connectors and the local audit store.
Catalog ServiceManages the AI service catalog (sanctioned / under review / blocked). Powers extension policy decisions about which AI service is being used.
Tenant ServiceProvisions tenants, enforces isolation, manages quotas, integrates with SCIM for user provisioning.
Report ServiceCompiles DPIA, transparency reports, audit exports. Delegates rendering to the PDF Renderer.
Detection OrchestratorRoutes prompts that need Tier 2 (synchronous) or Tier 3 (asynchronous) detection, applies short-lived verdict caching in Redis.

Data access (Repository Pattern)

Each repository encapsulates a single aggregate. All queries are parameterised and row-level-security policies enforce tenant isolation at the database layer.

RepositoryAggregate
TenantRepoTenant, plan, quota, SCIM mapping
PolicyRepoPolicy graph, rules, snapshots
UserRepoUser, role, group membership
AuditRepoAuditEvent metadata (no raw prompt content)
CatalogRepoAI service entries, sanction status

Integrations

ClientTargetNotes
Presidio Clientnoxys-presidio sidecarTier 2 PII / Risk Signal detection. Sends tokenised payloads.
AI Forge Clientnoxys-ai-forgeProducer of async Tier 3 jobs via Redis stream.
SIEM ConnectorCustomer SIEMPluggable backend — syslog RFC 5424, Splunk HEC, generic webhook, Sentinel, Sekoia.
Stripe ClientStripeSubscription state, invoices.
IdP ClientEntra ID / Okta / WorkspaceOIDC, SAML, SCIM.
Email ClientPostmark / SESInvitations, password reset, alert digests.
PDF Renderer Clientnoxys-pdf-rendererHTML → signed PDF for DPIA, transparency, audit packs.

Cross-cutting concerns

  • OpenAPI 3.1 — every endpoint exposed by an *Handlers component MUST have a matching spec shipped in the same PR (see OpenAPI policy).
  • Observability — every component emits OpenTelemetry traces; request-id flows from middleware through services to integrations.
  • Multi-tenancy invariant — every query goes through a repository; raw SQL outside the repository layer is forbidden (enforced in code review).
  • No raw prompt persistence — the Audit Service hashes prompts at the boundary; downstream stores see only metadata (per ADR-002).