Aller au contenu principal

Architecture Overview

"Two architectures, one vision" β€” Current implementation + Target state for v1.0

STOA Platform is designed as a cloud-native, multi-tenant gateway platform built for both traditional APIs and AI agents. This document maintains two distinct views:

  1. Live β€” What is actually deployed and running in production
  2. Target β€” The architecture we are converging toward (v1.0 Q3 2026)

Last updated: February 2, 2026 β€” Post Cycle 5 (CAB-668)


Live Architecture (February 2026)​

What runs in production on *.stoa.cab-i.com

Live Services β€” Status 02/02/2026​

ServiceURLStatusStack
Portalportal.stoa.cab-i.comβœ… LiveReact
Control Plane APIapi.stoa.cab-i.comβœ… LiveFastAPI (Python)
Consoleconsole.stoa.cab-i.comβœ… LiveReact
MCP Gatewaymcp.stoa.cab-i.comβœ… LiveFastAPI (Python)
Keycloakkeycloak.stoa.cab-i.comβœ… LiveKeycloak (OIDC)
Grafanagrafana.stoa.cab-i.comβœ… LiveGrafana + Loki
OpenSearchopensearch.stoa.cab-i.comβœ… LiveOpenSearch
Docsdocs.gostoa.devβœ… LiveDocusaurus (Vercel)
Kafka BridgeInternal onlyβœ… LiveFastAPI (CAB-485)
Error Snapshot ConsumerInternal onlyβœ… LivePython (CAB-485)

Live Features β€” Implemented (Post Cycle 5)​

  • βœ… Auth: Keycloak OIDC + TOTP 2FA + RBAC multi-tenant
  • βœ… Subscriptions: Tool β†’ User β†’ Tenant with API Keys (Vault-backed)
  • βœ… MCP Gateway: list_tools, call_tool, list_resources β€” Claude.ai integration fixed (JSON-RPC bugs resolved)
  • βœ… Multi-Tenant Tool Discovery: Tenant-scoped tools with JWT context injection
  • βœ… GitOps Multi-Gateway: ArgoCD + Gateway Adapter Pattern (STOA, Kong, Gravitee, webMethods)
  • βœ… ArgoCD Foundation: GitOps continuous deployment for stoa-system
  • βœ… Error Snapshots: Capture β†’ Kafka β†’ MinIO β†’ API retrieve (CAB-397 + CAB-485)
  • βœ… Observability: Prometheus + Grafana + Loki centralized
  • βœ… Search: OpenSearch catalog + audit trail
  • βœ… Webhooks: subscription.created/renewed/revoked notifications
  • βœ… Security: Vault secrets management, Keycloak RBAC, mTLS groundwork

Git Repositories​

RepositoryHostPurpose
stoa-platform/stoaGitHub (public)Core platform code (Apache 2.0)
stoa-platform/stoa-docsGitHub (public)Documentation site
stoa-platform/stoa-webGitHub (public)Landing page (gostoa.dev)
stoa-platform/stoa-helmGitHub (public)Helm charts
PotoMitan/stoa-gitopsGitLab (private)ArgoCD apps, Ansible playbooks, infra
PotoMitan/stoa-catalogGitLab (private)Tenant API definitions, webMethods configs
PotoMitan/stoa-opsGitLab (private)Terraform, operational scripts

Deployment Flow (Live)​

Important

The deployment flow is NOT Kafka-driven. The Control Plane API orchestrates gateway synchronization directly via the Gateway Adapter Pattern (ADR-035).

Kafka is used exclusively for internal event streaming (error snapshots, metering), never for deployment orchestration. See ADR-017: Kafka Internal-Only.

Kubernetes Namespace​

All components run in the stoa-system namespace on EKS:

kubectl get pods -n stoa-system

Target Architecture (v1.0 β€” Q3 2026)​

Vision: eBPF-native, CLI-first, AI-ready

Live β†’ Target Differences​

ComponentLive (Feb 2026)Target (Q3 2026)Cycle
GatewaywebMethods (Java)stoa-proxy (Rust)Cycle 15
Rate LimitingUser-space (slowapi)XDP/eBPF (kernel)Cycle 15
Control PlaneFastAPI (Python)stoa-api (Go)Cycle 15
CLIβ€”stoa-cli (Go)Cycle 15
Operatorβ€”stoa-operator (Go)Cycle 15
GitOpsArgoCD + Gateway AdaptersArgo CD + RolloutsCAB-483
CacheIn-memoryRedis distributedCAB-306
B2B ProtocolsREST onlyEDI/SWIFT/Euro Num.Cycle 13
AI GatewayBasic MCPSemantic cache + routingCycle 17

CRDs β€” Roadmap v1.0​

Not Yet Deployed

The following Custom Resource Definitions are planned for v1.0 and are not currently deployed. They will be managed by the stoa-operator:

# ROADMAP - Not deployed yet
apiVersion: stoa.io/v1alpha1
kind: Tool
metadata:
name: billing-api
namespace: tenant-acme
spec:
protocol: rest
upstream: https://api.acme.com/billing
auth:
type: oauth2
issuer: https://keycloak.stoa.cab-i.com/realms/acme
---
apiVersion: stoa.io/v1alpha1
kind: ToolSet
metadata:
name: acme-tools
namespace: tenant-acme
spec:
tools:
- billing-api
- inventory-api
policies:
rateLimit: 1000/min
auth: required

Migration Roadmap​

Jan 2026       Feb 2026       Mar 2026       Q2 2026        Q3 2026
β”‚ β”‚ β”‚ β”‚ β”‚
β–Ό β–Ό β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”
β”‚v0.1.0 β”‚ β”‚v0.2.0 β”‚ β”‚v0.3.0 β”‚ β”‚v0.5.0 β”‚ β”‚v1.0.0 β”‚
β”‚MVP │────►│Demo │────►│Proxy │────►│eBPF │────►│GA β”‚
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”‚Live β”‚ β”‚+Claudeβ”‚ β”‚+Rust β”‚ β”‚+eBPF β”‚ β”‚Full β”‚
β”‚Arch β”‚ β”‚ .ai β”‚ β”‚Proxy β”‚ β”‚ β”‚ β”‚Target β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚
└──────────── Hybrid Period β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
(webMethods + stoa-proxy coexist with traffic shifting)

Technology Stack​

LayerLive (Feb 2026)Target (v1.0)
GatewaywebMethods (Java)Rust, Tokio, Hyper
MCP GatewayPython, FastAPIRust (integrated in stoa-proxy)
Control Plane APIPython, FastAPIGo
FrontendReact, TypeScript, TailwindReact, TypeScript, Tailwind
DatabasePostgreSQLPostgreSQL
Event StreamingRedpanda (Kafka API)Redpanda (Kafka API)
SearchOpenSearchOpenSearch
Object StorageMinIOMinIO / S3
CacheIn-memoryRedis
AuthKeycloakKeycloak
SecretsHashiCorp VaultHashiCorp Vault
ObservabilityPrometheus, Grafana, LokiPrometheus, Grafana, Loki
GitOpsArgoCD + Gateway AdaptersArgoCD + Argo Rollouts
InfrastructureKubernetes (EKS), HelmKubernetes, Helm, Terraform

Security Zones​

ZoneTrust LevelComponents
ExternalUntrustedAPI Clients, Claude.ai, Web Console
DMZSemi-trustedTraefik Ingress, API Gateway, MCP Gateway
InternalTrustedControl Plane, Keycloak, Data Layer

Key security principles:

  • Kafka/Redpanda: zero external exposure (ADR-017)
  • Multi-tenant isolation via JWT context (ADR-016)
  • GitOps with Argo CD for declarative config (ADR-015)
  • All secrets managed through HashiCorp Vault

MCP Gateway Flow​

Multi-Tenant Tool Isolation​

Each tenant only sees their own tools:

TenantPlatform ToolsTenant Tools
Parzival (IOI)stoa_*ioi:billing:*, ioi:inventory:*
Sorrento (Gregarious)stoa_*greg:oasis:*, greg:sixers:*
Halliday (Admin)Full cross-tenant visibilityAll tools


Changelog​

DateVersionChanges
2026-02-022.1Alignment CAB-668: Phase→Cycle terminology, Feb 2026 refresh, post-Cycle 5 features
2026-01-182.0Live vs Target separation, URL corrections
2026-01-151.9Added CAB-485 (Error Snapshots)
2026-01-111.8MCP Gateway OPA integration

Reference: CAB-668 β€” STOA Platform