Справочник архитектуры

Компоненты Spectorn

Этот документ описывает текущие компоненты без маркетинговых допущений. Главный production surface - API gateway; защита и память являются слоями вокруг него.

Карта компонентов

КомпонентСтатусРоль
spectorn-serverproduction pathRust/axum API gateway, auth, tenant policy, billing/account gates, provider routing, scan enforcement
sentinel-coreproduction libraryRust detection catalog and native/PyO3 APIs; gateway выбирает scan breadth по политике
gomcp memoryoptional layerPer-tenant memory backend, recall/search/store flows, explain/SOC helpers
Dashboardproduction UIЛичный кабинет пользователя, API keys, usage, docs/library, admin and operator views
immuneexperimentalGo runtime guard under gomcp/cmd/immune; no production kernel/eBPF enforcement claim
Shield / CLIsupporting toolingStandalone/security tooling and brand CLI surfaces; not the primary gateway data plane

API Gateway

Gateway - это коммерческая точка входа: клиент получает Spectorn API key и использует доступную ему модель через OpenAI-compatible API. Клиенту не нужно менять свою архитектуру, кроме base_url, api_key и выбранного model id/alias.

Ключевые обязанности:

  • tenant-scoped auth/authz and rate limits;
  • model allow/deny policy and alias resolution;
  • BYOK and hosted-provider routing without private-IP/provider-URL escapes;
  • input scan before provider call;
  • memory recall re-scan before insertion into model-visible prompt;
  • output scan for non-streaming and SSE responses;
  • fail-closed behavior when scan, provider validation or policy evaluation fails.

sentinel-core

sentinel-core содержит зарегистрированный каталог детекторов. Это полезная ширина покрытия, но она не равна обещанию "каждый request всегда проверяется всеми engines параллельно".

Правильная формулировка для продукта: Spectorn применяет policy-aware scanning; конкретный набор checks зависит от tenant policy, endpoint, scan-mode and deployment configuration.

Memory

Memory слой должен быть безопасным источником контекста, а не обходом защиты. Recalled facts рассматриваются как недоверенные данные: gateway сканирует их отдельно и затем проверяет итоговый prompt после вставки.

immune

immune сейчас документируется как experimental Go runtime guard under gomcp/cmd/immune. Kernel/eBPF enforcement можно заявлять только для deployment, где есть код загрузки, необходимые Linux privileges, evidence, health/status output and tests showing that hooks are loaded and enforcing policy.

Dashboard

Dashboard должен помогать неопытному покупателю понять:

  • какие модели и лимиты доступны;
  • что происходит с API keys and billing;
  • какие запросы были заблокированы и почему;
  • где включается standalone security mode;
  • как читать security library and industry scenarios without overclaiming guarantees.
Компоненты Spectorn | Spectorn