Skip to main content

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

EXTERNAL ZONEClaude.aiAPI ConsumersWeb ConsoleDMZ β€” INGRESS LAYERNginx Ingress ControllerINTERNAL ZONE β€” KUBERNETES CLUSTERSTOA Control PlaneFastAPIAdmin APIUAC Contract ManagerREST β€’ GraphQL β€’ gRPC β€’ KafkaMCP GatewayTool DiscoveryJWT Context InjectionwebMethods GatewayAPI ProxyingPolicy EnforcementKeycloakOAuth2/OIDCMulti-tenant RBACDATA LAYERPostgreSQLContracts β€’ TenantsOpenSearchAPI Logs β€’ AnalyticsRedisCache β€’ SessionsKafka/RedpandaEvents β€’ AuditπŸ”’ INTERNAL ONLYVaultSecrets
Control Plane
MCP Gateway
Internal Only
Authentication

Overview​

STOA Platform follows a cloud-native architecture deployed on Kubernetes (or Docker Compose for local evaluation) with the following principles:

Security Zones​

ZoneTrust LevelComponents
ExternalUntrustedAPI Clients, AI Agents (Claude.ai, MCP clients), Browser UIs
DMZSemi-trustedIngress Controller, STOA Gateway (Rust), Envoy + STOA Link xDS (ADR-073)
InternalTrustedControl 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): MCP 2025-11-25, contract REST routes, fail-closed tenant policies, and optional gRPC ExtAuthzService
  • Upstream Envoy + STOA Link (stoa-connect) β€” Target L4/L7 data plane via explicit opt-in loopback mTLS ADS (ADR-073), alongside stoa-connect route 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 stoa realm, top-level /<tenant_id> groups, OIDC/OAuth2, and verified tenant_id JWT claims (ADR-074)

Data Layer​

  • PostgreSQL β€” Shared schema scoped by tenant_id (PostgreSQL 15 in full Compose / production catalog, 16 in minimal R1 quickstart/)
  • 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:

CI/CD Pipeline​

The delivery pipeline follows a GitOps approach:

  1. Source β€” stoa-platform/stoa on GitHub (monorepo including charts/stoa-platform and charts/stoa-observability)
  2. Build & Test β€” GitHub Actions (lint, unit/integration tests, security scans, plus a manual workflow_dispatch offline Envoy + Link xDS acceptance harness)
  3. Package β€” Signed, digest-pinned container images on GHCR (ghcr.io/stoa-platform/*@sha256:...)
  4. 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​

  1. AI agent sends POST /mcp (tools/call) with a Bearer JWT
  2. STOA Gateway verifies the RS256 JWKS signature, STOA_MCP_AUDIENCE, and tenant_id claim (ADR-074)
  3. Gateway evaluates the signed per-tenant policy bundle fail-closed (ADR-070) and OPA policies
  4. Authorized request is forwarded to the upstream API or MCP server
  5. 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:*

Additional Resources​

Cookies and privacy

With your permission, we use cookies to measure visits and understand navigation to improve the site.

Learn more

Google Analytics measures visits and useful clicks. Microsoft Clarity provides masked interaction replays. No advertising use. Your choice is saved for six months. You can change or withdraw it at any time using the β€œCookies” button.

Read the audience measurement details