Architecture
This section presents the architecture diagrams of STOA Platform, illustrating the core components, data flows, and security decisions.
Interactive Diagramsβ
Architecture Globale
Vue d'ensemble des composants et flux de donnΓ©es
Overviewβ
STOA Platform follows a cloud-native architecture deployed on Kubernetes (or Docker Compose for local evaluation) with the following principles:
Security Zonesβ
| Zone | Trust Level | Components |
|---|---|---|
| External | Untrusted | API Clients, AI Agents (Claude.ai, MCP clients), Browser UIs |
| DMZ | Semi-trusted | Ingress Controller, STOA Gateway (Rust), Envoy + STOA Link xDS (ADR-073) |
| Internal | Trusted | Control Plane API, stoa-operator, Keycloak, Data Layer |
Main Componentsβ
- STOA Control Plane β Python 3.11 / FastAPI management API, UAC contracts, catalog, 6 gateway adapters (Kong, Gravitee, webMethods, Apigee, AWS API Gateway, Azure APIM β ADR-035), and signed Ed25519 policy bundle issuance
- STOA Gateway (
stoa-gateway) β Rust/axum runtime (Production / Maintenance under ADR-073): MCP2025-11-25, contract REST routes, fail-closed tenant policies, and optional gRPCExtAuthzService - Upstream Envoy + STOA Link (
stoa-connect) β Target L4/L7 data plane via explicit opt-in loopback mTLS ADS (ADR-073), alongsidestoa-connectroute adapters for Kong, Gravitee, and webMethods (Link policy sync is active for webMethods and Envoy ADS v1 filters, and rejected for Kong/Gravitee) - Keycloak β Single
stoarealm, top-level/<tenant_id>groups, OIDC/OAuth2, and verifiedtenant_idJWT claims (ADR-074)
Data Layerβ
- PostgreSQL β Shared schema scoped by
tenant_id(PostgreSQL 15 in full Compose / production catalog, 16 in minimal R1quickstart/) - OpenSearch β Structured API logs, analytics, and audit search
- Redpanda (Kafka API) β Asynchronous events and metering (π Internal Only, ADR-005)
- OpenBao (Vault API) β Secrets and credentials (ADR-075, MPL 2.0, partial rollout; compatible with HashiCorp Vault)
(Note: STOA does not deploy Redis.)
Architecture Decision Records (ADRs)β
Key architectural decisions are documented in the ADR Index:
- ADR-073: Adopt Envoy as Primary Data Plane β Upstream Envoy + STOA Link xDS + external services
- ADR-074: Single Keycloak Realm & Tenant Group Model β Shared
stoarealm, per-tenant groups,tenant_idscoping - ADR-075: Secrets Backend β OpenBao via Vault API β Self-hosted MPL 2.0 secrets store via Vault HTTP API
- ADR-070: Gateway Fail-Closed Posture β Signed Ed25519 per-tenant policy enforcement
- ADR-005: Event-Driven Kafka Architecture β Internal-only Redpanda/Kafka event streaming
- ADR-035: Gateway Adapter Pattern β Unified multi-gateway orchestration
- ADR-019: Business Model & Moat Strategy β Open-core & Apache 2.0 governance
- ADR-018: Security Hardening P0 β Baseline security controls
CI/CD Pipelineβ
The delivery pipeline follows a GitOps approach:
- Source β
stoa-platform/stoaon GitHub (monorepo includingcharts/stoa-platformandcharts/stoa-observability) - Build & Test β GitHub Actions (lint, unit/integration tests, security scans, plus a manual
workflow_dispatchoffline Envoy + Link xDS acceptance harness) - Package β Signed, digest-pinned container images on GHCR (
ghcr.io/stoa-platform/*@sha256:...) - Deploy β Argo CD declarative sync (ADR-007)
Supply Chain Securityβ
- SBOM β Software Bill of Materials generated in CI
- Cosign β Keyless OIDC container image signatures
- SLSA β Build provenance attestations and digest-pinned Helm deployments
MCP Gatewayβ
The MCP Gateway enables governed AI agent integration:
Execution Flowβ
- AI agent sends
POST /mcp(tools/call) with a Bearer JWT - STOA Gateway verifies the RS256 JWKS signature,
STOA_MCP_AUDIENCE, andtenant_idclaim (ADR-074) - Gateway evaluates the signed per-tenant policy bundle fail-closed (ADR-070) and OPA policies
- Authorized request is forwarded to the upstream API or MCP server
- Response is returned with trace correlation and recorded in audit/metering pipelines
Multi-Tenant Isolationβ
On stoa-gateway, MCP tools/list always filters tools by the caller's verified tenant_id claim (even when the caller holds cpi-admin; cross-tenant cpi-admin visibility applies only to Control Plane administrative APIs):
- Parzival (
ioi) βstoa_*,ioi:billing:*,ioi:inventory:* - Sorrento (
gregarious) βstoa_*,greg:oasis:*,greg:sixers:*