Skip to content

armgit / AiSOC

Public Imported from GitHub
0

Open-source AI Security Operations Center: alert fusion, LLM-agent triage, MITRE ATT&CK investigation, and a replayable decision ledger for every agent step. Self-hostable, runs with no API keys, MIT licensed. Ships an MCP server for Claude, Cursor and Continue.

docs: repo-wide sweep for connectors platform + v1.4 evals

Beenu Arora70c9aea8be19
diff --git a/.gitignore b/.gitignore
index ec34fc2c4..fd3ba48d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -76,6 +76,7 @@ eval_mitre_accuracy_report.json
# Local progress tracking (per AGENTS.md preference, not committed)
PROGRESS.md
+PR_TRIAGE.md
# Detection-import upstream clones (populated by tools.detection_import)
.import-cache/
diff --git a/AGENTS.md b/AGENTS.md
index dc67f5ba2..040b7cbc0 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -19,3 +19,16 @@
- CI uses GitHub Actions (`.github/workflows/`); includes workflows for OpenAPI checks, CI, docs deployment, marketplace sync, and detection validation.
- Detection rules stored in `detections/` (YAML format, categorized by cloud/endpoint/identity/network/application).
- Marketplace plugin index at `marketplace/index.json`, synced to `apps/web/public/marketplace/` via `pnpm marketplace:sync`.
+- Connector platform conventions:
+ - Connectors live under `services/connectors/app/connectors/<name>.py`. Each subclasses `BaseConnector` and declares a `schema()` classmethod returning a `ConnectorSchema(name, label, description, category, fields, oauth, default_poll_interval_seconds)`. Categories are `edr | siem | cloud | iam | saas | vcs | network`.
+ - Discovery is registry-based — add the class to `_CONNECTOR_CLASSES` in `services/connectors/app/connectors/__init__.py` (no other wiring required).
+ - Sensitive `auth_config` fields are marked `secret=True` in the schema and encrypted at the application layer using `CredentialVault` (Fernet AES-128-CBC + HMAC-SHA256). Key in `AISOC_CREDENTIAL_KEY`; rotation supported via `MultiFernet` + `AISOC_CREDENTIAL_KEY_ROTATION_FROM`. Vault token format is `vault:v1:<base64>`.
+ - The API service (`services/api`) holds the encrypt/decrypt keypair authority; `services/connectors` ships a vendored read-path `decrypt_dict()` so the scheduler can decrypt at poll time without owning the write path.
+ - Polling runs in-process inside `services/connectors` via APScheduler (`ConnectorScheduler`). One job per enabled instance, 5-min default cadence, overridable per-instance via `connector_config.poll_interval_seconds`. The scheduler reloads jobs every 30s. Disable in tests with `AISOC_CONNECTORS_DISABLE_SCHEDULER=1`.
+ - Normalized events flow through `IngestClient` (`services/connectors/app/ingest_client.py`) to `services/ingest`'s `/v1/ingest/batch` endpoint with an `X-Tenant-ID` header.
+ - Severity ladder is exactly four tiers: `info | low | medium | high`. Vendor-native ladders (Azure 5-tier, SCC 5-tier, GitHub 4-tier) collapse into this set in each connector's `normalize()` method.
+ - Every connector ships a marketplace manifest at `plugins/<connector-id>/plugin.yaml` mirroring its `schema()`. Run `pnpm marketplace:sync` after adding one.
+ - Per-connector setup walkthroughs live under `apps/docs/docs/connectors/<connector-id>.md` and are indexed by `apps/docs/sidebars.ts` under the `Connectors` category. The vault threat model + rotation procedure live in `apps/docs/docs/operations/credentials.md`.
+- v1.4 eval harness conventions:
+ - Synthetic dataset is fixed at 200 incidents (`services/agents/tests/eval_data/synthetic_incidents.json`) plus an aligned synthetic telemetry corpus (`synthetic_telemetry.jsonl`). Three of the four metrics (`alert_reduction`, `investigation_completeness`, `response_quality`) are substrate self-consistency gates, not agent accuracy scores; only `mitre_accuracy` measures the live agent. The benchmark page (`apps/docs/docs/benchmark.md`) explains which is which.
+ - PRs touching the agent, orchestrator graph, prompts, tools, RAG corpus, or detection content must re-grade against the harness and include before/after deltas in the PR body if any axis regresses.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3c9b7d511..c9d38ef6d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,116 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+### Click-and-connect cloud connector platform
+
+This pass turns connectors from a hardcoded, code-edit-only feature into a
+runtime, schema-driven, click-and-connect surface — and lights up nine new
+cloud / SaaS / VCS sources (Microsoft Entra, Azure Activity, Defender XDR,
+GCP Cloud Audit, GCP SCC, Microsoft 365 audit, Google Workspace, Cloudflare,
+GitHub) on top of the original CrowdStrike / Splunk / AWS Security Hub /
+Okta / Microsoft Sentinel set.
+
+#### Added
+
+- **`CredentialVault`** (`services/api/app/security/credential_vault.py`,
+ `services/connectors/app/security/credential_vault.py`) — Fernet
+ (AES-128-CBC + HMAC-SHA256) wrapper for `auth_config` JSON, keyed off the
+ new `AISOC_CREDENTIAL_KEY` env var. Supports `MultiFernet` rotation via
+ `AISOC_CREDENTIAL_KEY_ROTATION_FROM`. The `services/connectors`
+ read-path mirror decrypts only; writes always go through the API
+ service. Documented in [docs/operations/credentials](apps/docs/docs/operations/credentials.md).
+- **Self-describing connector schemas** (`services/connectors/app/connectors/base.py`)
+ — `BaseConnector` gained a `Field` / `OAuthHints` / `ConnectorSchema`
+ trio and an abstract `schema()` classmethod. Each connector class is now
+ the source of truth for its own `name`, `connector_category`, fields
+ (text / secret / select / textarea / oauth), default poll interval, and
+ hosted-OAuth roadmap hints. The hardcoded dict in
+ `services/connectors/app/api/router.py` is gone — schema responses come
+ from the registry built in `services/connectors/app/connectors/__init__.py`.
+- **`/api/v1/connectors` CRUD endpoints**
+ (`services/api/app/api/v1/endpoints/connectors.py`,
+ `services/api/app/schemas/connector.py`) — `GET /catalog`, `POST /test`,
+ `GET / POST / PATCH / DELETE /instances`, `POST /instances/{id}/test`.
+ Tenant-scoped via the existing auth dependency, secrets encrypted on
+ write through the vault, and proxied to the connectors microservice for
+ schema lookups and live `Test connection` calls.
+- **`ConnectorScheduler`** (`services/connectors/app/scheduler.py`) —
+ APScheduler in-process inside `services/connectors`, started in the
+ FastAPI lifespan. One job per enabled instance, polls
+ `fetch_alerts(since_seconds=300)` every 5 min by default
+ (`connector_config.poll_interval_seconds` overrides per instance),
+ decrypts via the read-path vault, normalizes events through the
+ connector's `normalize()` method, and pushes the batch to
+ `services/ingest/v1/ingest/batch` via the new `IngestClient`. Set
+ `AISOC_CONNECTORS_DISABLE_SCHEDULER=1` to skip wiring the scheduler in
+ tests.
+- **Nine new connectors** in `services/connectors/app/connectors/`:
+ `azure_entra` (Microsoft Graph audit logs), `azure_activity` (ARM
+ Activity Log via Resource Graph + blast-radius `_HIGH_BLAST_RADIUS_VERBS`
+ list), `azure_defender` (Microsoft Graph Security alerts),
+ `gcp_cloud_audit` (Cloud Logging API with hand-rolled RS256 JWT
+ signing for service-account auth), `gcp_scc` (Security Command Center
+ findings, same JWT signer), `m365_audit` (Office 365 Management
+ Activity API, sharing the Azure AD app from `azure_entra`),
+ `google_workspace` (Reports API with domain-wide delegation),
+ `cloudflare` (Audit Logs), and `github` (Org Audit Log + Code Scanning
+ alerts). Every connector ships unit tests covering schema contract,
+ normalization, and `test_connection()` happy/sad paths
+ (`services/connectors/tests/test_*_connectors.py`,
+ `test_schemas.py`, `test_scheduler.py`).
+- **Frontend click-and-connect wizard**
+ (`apps/web/src/components/connectors/AddConnectorModal.tsx`,
+ `ConnectorInstanceList.tsx`, rewired
+ `ConnectorsView.tsx`, typed client in `apps/web/src/lib/api.ts`) —
+ two-step modal: (1) catalog grid grouped by category, (2)
+ schema-driven form with `text` / `secret` / `select` / `textarea`
+ fields, an inline `Test connection` button, and a `Save & enable`
+ action. `framer-motion` for transitions, `react-hot-toast` for
+ feedback. Existing connector cards now render from the live API via
+ SWR.
+- **Marketplace + plugin manifests** —
+ `plugins/{azure-entra, azure-activity, azure-defender, gcp-cloud-audit,
+ gcp-scc, m365-audit, google-workspace, cloudflare, github}/plugin.yaml`
+ carry the new `schema()` shape so `scripts/build_marketplace.py` can
+ surface them in the in-app Marketplace, and
+ `apps/web/public/marketplace/index.json` is regenerated via
+ `pnpm marketplace:sync`.
+- **Documentation** — `apps/docs/docs/connectors/index.md` (catalog
+ landing with a connector walkthrough and category taxonomy), nine
+ per-connector setup walkthroughs (prereqs, scopes, screenshots),
+ `apps/docs/docs/operations/credentials.md` (vault threat model, key
+ rotation procedure, hosted-OAuth roadmap), and a new `Connectors`
+ section in `apps/docs/sidebars.ts`.
+
+#### Changed
+
+- **`services/api/app/core/config.py`** — added `AISOC_CREDENTIAL_KEY`,
+ `AISOC_CREDENTIAL_KEY_ROTATION_FROM`, `CONNECTORS_SERVICE_URL`,
+ `CONNECTORS_SERVICE_TIMEOUT_SECONDS`. Documented in `.env.example`.
+- **`services/api/app/main.py`** — the new `/api/v1/connectors` router is
+ mounted alongside the existing v1 router set.
+- **`services/connectors/app/api/router.py`** — schema responses lookup
+ the registry instead of returning a hardcoded dict; new
+ `POST /connectors/{connector_id}/test` endpoint runs an
+ unauthenticated dry-run `test_connection()` for the wizard's
+ pre-save Test step.
+- **`services/connectors/app/main.py`** — the FastAPI lifespan now wires
+ the scheduler, with `AISOC_CONNECTORS_DISABLE_SCHEDULER` honored for
+ tests and CI.
+
+#### Why this matters
+
+Before this pass: adding a connector meant editing Python in three places,
+shipping a release, and reading docs to discover the auth fields. Secrets
+sat in plain JSON in Postgres. After this pass: connectors are runtime
+data; secrets are encrypted with a key the operator controls; rotation
+is a documented procedure; the wizard's `Test connection` round-trip
+catches bad credentials before they're saved; and the per-connector docs
+each give an analyst a 5-minute path from "I have a tenant" to "alerts
+are flowing into the console."
+
+---
+
### Eval harness v1.4 — synthetic telemetry + per-template macros
This pass addresses two questions raised on the public launch thread about
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index f997dce00..ecb89669d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -94,19 +94,109 @@ before/after delta in the PR body.
## Adding New Connectors
-Connectors are one of the most valuable contributions. To add a new connector:
-
-1. Create a new directory under `integrations/connectors/<name>/`
-2. Implement the connector following the pattern in `integrations/connectors/crowdstrike/`
-3. Required files:
- - `main.py` — Entry point
- - `connector.py` — Connector class implementing `BaseConnector`
- - `Dockerfile` — Container build file
- - `README.md` — Connector documentation
-4. Add connector config to `docker-compose.yml`
-5. Write integration tests
-
-Existing connectors you can use as references: `crowdstrike`, `aws-security-hub`, `microsoft-sentinel`, `splunk`, `okta`.
+Connectors are runtime data. There is no Dockerfile to build, no
+`docker-compose.yml` entry to add, and no separate microservice to ship —
+adding a connector means subclassing `BaseConnector`, declaring a `schema()`,
+adding a marketplace manifest, and writing tests. The
+[connector platform doc](apps/docs/docs/connectors/index.md) explains the
+end-to-end click-and-connect flow; this section covers the contributor
+mechanics.
+
+### 1. Subclass `BaseConnector`
+
+Add a new file under `services/connectors/app/connectors/<name>.py` and
+subclass `BaseConnector` from
+[`services/connectors/app/connectors/base.py`](services/connectors/app/connectors/base.py).
+Implement four things:
+
+```python
+from .base import BaseConnector, ConnectorSchema, Field, OAuthHints
+
+class MyConnector(BaseConnector):
+ connector_category = "saas" # one of: edr, siem, cloud, iam, saas, vcs, network
+
+ @classmethod
+ def schema(cls) -> ConnectorSchema:
+ return ConnectorSchema(
+ name="my-connector",
+ label="My Connector",
+ description="What this connector pulls and from where.",
+ category=cls.connector_category,
+ fields=[
+ Field(name="api_url", type="text", label="API URL", required=True),
+ Field(name="api_token", type="secret", label="API token", required=True, secret=True),
+ ],
+ oauth=OAuthHints(supported_in_hosted=False),
+ default_poll_interval_seconds=300,
+ )
+
+ async def test_connection(self) -> dict:
+ ... # one cheap auth-checking call; return {"ok": bool, "message": str, ...}
+
+ async def fetch_alerts(self, since_seconds: int = 300) -> list[dict]:
+ ... # raw vendor JSON, no normalization
+
+ def normalize(self, raw_event: dict) -> dict:
+ ... # OCSF-aligned shape; severity ∈ {"info","low","medium","high"}
+```
+
+Field types are `text`, `secret`, `select` (with `options`), `textarea`,
+and `oauth`. Mark **anything sensitive** with `secret=True` — the
+frontend will render those fields as masked inputs and the API service
+will encrypt them via the [`CredentialVault`](apps/docs/docs/operations/credentials.md)
+before they hit Postgres.
+
+### 2. Register in the connector registry
+
+Add your class to the `_CONNECTOR_CLASSES` tuple and `__all__` in
+[`services/connectors/app/connectors/__init__.py`](services/connectors/app/connectors/__init__.py).
+The registry powers `/connectors/schemas` and the wizard's catalog grid —
+no other wiring required.
+
+### 3. Add a marketplace plugin manifest
+
+Drop a `plugins/<connector-id>/plugin.yaml` mirroring your `schema()`. See
+existing entries (`plugins/azure-entra/plugin.yaml`,
+`plugins/cloudflare/plugin.yaml`, etc.) for the exact shape. Run:
+
+```bash
+pnpm marketplace:sync # builds marketplace/index.json + syncs to apps/web/public
+```
+
+### 4. Write tests
+
+`services/connectors/tests/test_<name>.py` with at minimum:
+
+- A schema-contract test (asserts `schema().name`, required fields, secret
+ markers, hosted-OAuth advertising).
+- `normalize()` unit tests covering every severity rule you implement —
+ use real attacker-shaped fixtures (BEC, role grants, defense evasion).
+- A `respx`-mocked `test_connection()` covering success + auth-failure
+ paths.
+- A `respx`-mocked `fetch_alerts()` roundtrip that asserts your
+ normalization produces a well-formed OCSF event.
+
+The bundled test suite already runs against 100+ tests across 9 connectors
+— look at `test_azure_connectors.py`, `test_gcp_connectors.py`, and
+`test_saas_connectors.py` for the shape.
+
+### 5. Docs
+
+Add `apps/docs/docs/connectors/<connector-id>.md` with prereqs, exact
+permissions/scopes, secret rotation walkthrough, severity heuristics
+table (mirrors what's in your `normalize()`), and a troubleshooting
+section. Add the new page to `apps/docs/sidebars.ts` under the
+`Connectors` category.
+
+### Reference connectors
+
+The 14 in-tree connectors are ordered roughly from simplest auth to most
+complex: `crowdstrike`, `okta`, `cloudflare` (API token), `splunk`,
+`aws_security_hub` (IAM keys), `azure_entra`, `azure_activity`,
+`azure_defender`, `m365_audit` (AAD app), `gcp_cloud_audit`, `gcp_scc`,
+`google_workspace` (service account JSON + JWT signing), `github`
+(fine-grained PAT), `microsoft_sentinel`. Pick the one whose auth model
+matches yours and copy from there.
## Community Marketplace
diff --git a/PROGRESS.md b/PROGRESS.md
deleted file mode 100644
index 1ed54fdc2..000000000
--- a/PROGRESS.md
+++ /dev/null
@@ -1,202 +0,0 @@
-# AiSOC Build Progress
-
-Last updated: 2026-05-04
-
-## Status: v4.1, v5.0, v5.1, and v5.2 shipped
-
-v4.1, v5.0, v5.1, and v5.2 are all implemented. See ROADMAP.md and
-CHANGELOG.md for per-item status. Use `pnpm aisoc:demo` for the demo stack,
-or `pnpm aisoc:lab` for the full lab stack.
-
-| Phase | Description | Status |
-|-------|-------------|--------|
-| v1 — Initial monorepo | Core services, frontend, infra, docs | Completed |
-| v2 — Enterprise upgrade | Knowledge graph, rule engine, ML fusion, threat intel | Completed |
-| v4.0 | Multi-agent investigator, visual SOAR studio, plugin platform, OpenTelemetry | Completed |
-| v4.1 | Plugin publishing, marketplace v2, detection catalog, playbook submissions, aisoc-cli | Completed |
-| v5.0 | SAML/OIDC, multi-tenant RLS, RBAC, audit log, compliance dashboards, SLA, HA Helm, backup, runbooks | Completed |
-| v5.1 | UEBA service, honeytokens service, purple-team service (ART + Caldera + ATT&CK heatmap + tabletop) | Completed |
-| v5.2 | Investigation Ledger, 200-incident public eval harness, Responder PWA + passkeys, Ambient Copilot, MCP server, demo stack | Completed |
-
-### v1 — Initial monorepo
-
-| ID | Task | Status |
-|----|------|--------|
-| setup-workspace | Initialize monorepo structure with pnpm + Turborepo | Completed |
-| build-ingest | Build Go ingest workers with OCSF normalization + ATT&CK mapping | Completed |
-| build-core-api | Build FastAPI Core API: tenants, RBAC, alerts, cases, reporting | Completed |
-| build-enrichment | Build Go IOC enrichment microservice with Redis cache | Completed |
-| build-alert-fusion | Build Alert Fusion Service (Python) for dedup + merge | Completed |
-| build-agents | Build LangGraph AI Agent Orchestrator with all domain agents | Completed |
-| build-actions | Build Action Execution Service with blast-radius gate + rollback | Completed |
-| build-realtime | Build Node.js/Bun real-time service (WebSocket/SSE) | Completed |
-| build-connectors | Build 5 Phase 1 connectors: CrowdStrike, Splunk, AWS, Okta, Sentinel | Completed |
-| build-packages | Build shared packages: OCSF lib, TypeScript types, React UI components | Completed |
-| build-frontend | Build Next.js 14 frontend: SOC console, case mgmt, attack graph, NL search | Completed |
-| build-infra | Build Terraform infrastructure + Helm charts + Docker configs | Completed |
-| build-docs | Create README, architecture docs, API docs, migration guides | Completed |
-| setup-github | Create GitHub repository and push initial commit | Completed |
-| github-push | Push complete codebase to GitHub | Completed |
-
-### v2 — Enterprise platform upgrade
-
-| ID | Task | Status |
-|----|------|--------|
-| infra-fixes | Reconcile docker-compose ports/profiles for fusion, threatintel, connectors | Completed |
-| neo4j-graph | Add Neo4j to compose; implement `graph_service` (attack path, blast radius, neighbors, MITRE coverage) | Completed |
-| rule-engine | Multi-language detection rule engine: Sigma (pySigma), YARA, KQL, Lucene, Regex with `/v1/rules` API | Completed |
-| attck-corpus | Full MITRE ATT&CK STIX 2.1 corpus loader (Go + Python), in-process index, optional Qdrant embedding | Completed |
-| threatintel-svc | New `services/threatintel`: TAXII 2.1 + MISP + OTX + CISA KEV pollers, Bloom dedup, OpenSearch+Qdrant+Neo4j sinks | Completed |
-| ingest-shodan-cve | Shodan enrichment + CISA KEV cross-correlation in Go ingest, emits `vulnerability.matches` | Completed |
-| ml-fusion | Isolation Forest anomaly + LightGBM LambdaRank priority scoring with analyst feedback loop | Completed |
-| docs-update | Refreshed README, new SYSTEM_DESIGN.md, API_REFERENCE.md, LOCAL_DEVELOPMENT.md runbook | Completed |
-
-### v4
-
-| ID | Task | Status |
-|----|------|--------|
-| investigator | LangGraph multi-agent orchestrator (Recon, Forensic, Responder, ReportWriter) | Completed |
-| case-workspace | Case Workspace UI — Investigation & Report tabs with streaming progress | Completed |
-| eval-harness | Eval harness: 20 synthetic incidents, ≥80% MITRE-tactic accuracy CI gate | Completed |
-| soar-studio | React Flow visual playbook editor + DAG engine (retries, conditions, on_failure) | Completed |
-| playbook-schema | `playbook.schema.json` JSON Schema 2020-12 for portability and CI linting | Completed |
-| detection-as-code | `detections/` directory with Sigma + AiSOC YAML; GitHub Action deploy-on-merge | Completed |
-| playbook-templates | 12 starter playbook templates | Completed |
-| marketplace | Community playbook + plugin marketplace static index | Completed |
-| plugin-sdk | Plugin SDK in Python (`packages/plugin-sdk-py/`) and Go (`packages/plugin-sdk-go/`) | Completed |
-| plugin-yaml | `plugin.yaml` manifest spec (connector \| enricher \| responder \| detection \| widget) | Completed |
-| plugin-oci | Plugin loader with OCI image support (`oras pull`) | Completed |
-| ref-plugins | 4 reference plugins: Okta connector, YARA enricher, Slack quarantine, MTTR widget | Completed |
-| openapi | Public REST API v1, OpenAPI 3.1 at `docs/openapi.yaml` | Completed |
-| graphql | GraphQL gateway (Strawberry) at `/graphql` | Completed |
-| api-tokens | Scoped API tokens (`/api/v1/api-keys`) | Completed |
-| client-sdks | Auto-generated TypeScript, Python, Go client SDKs | Completed |
-| docs-site | Docusaurus docs site at `apps/docs/`, deployed to GitHub Pages | Completed |
-| otel | OpenTelemetry traces across agents → api → realtime (OTLP/Jaeger) | Completed |
-| demo-lab | `pnpm aisoc:lab` one-command full-stack demo + Conti ransomware scenario | Completed |
-| migration | MIGRATION.md for v3 → v4 upgrade path | Completed |
-
-### v4.1
-
-| ID | Task | Status |
-|----|------|--------|
-| cli | `aisoc-cli` scaffold/validate/publish commands for plugins and detections | Completed |
-| plugin-publish | Plugin publish flow: `community_plugins` table, POST `/api/v1/plugins/publish`, Ed25519 signature verification | Completed |
-| marketplace-v2 | MarketplaceView.tsx with ratings, install counts, verified badges, category filter, sort | Completed |
-| detection-catalog | Detection catalog: paginated Sigma browse API + UI page with install action | Completed |
-| playbook-community | Playbook community submissions: `community_playbooks` table + submit/curate API + Community tab | Completed |
-
-### v5.0
-
-| ID | Task | Status |
-|----|------|--------|
-| saml-oidc | SAML 2.0 + OIDC auth in `services/api/app/auth/` with JWT issuance | Completed |
-| rls | Multi-tenant RLS: `tenant_id` migration, Postgres RLS policies, SQLAlchemy middleware | Completed |
-| rbac | Granular RBAC: roles/permissions/user_roles tables + `require_permission()` + admin UI | Completed |
-| audit-log | Immutable audit log: append-only `audit_log` table + FastAPI middleware + UI | Completed |
-| soc2 | SOC 2 evidence dashboard: auto-collect evidence API + compliance page + PDF export | Completed |
-| frameworks | ISO 27001 + NIST CSF + PCI-DSS/HIPAA/DORA: mapping YAMLs + `/api/v1/compliance/{framework}` + heatmap UI | Completed |
-| sla | MTTD/MTTR/MTTC SLA tracking: `tenant_sla_config` table + metrics API + dashboard widget | Completed |
-| helm-ha | Helm chart HPA, PDB, Ingress, per-service deployment templates | Completed |
-| backup-cli | `scripts/backup.sh` and `scripts/restore.sh` for Postgres + ClickHouse + plugins | Completed |
-| ops-docs | `docs/operations/multi-region.md` + `scripts/generate_runbook.py` from OTel traces | Completed |
-
-### v5.1
-
-| ID | Task | Status |
-|----|------|--------|
-| ueba | `services/ueba/` — baseline computation (Welford), anomaly scoring (z-score), peer-group analysis, Kafka integration | Completed |
-| honeytokens | `services/honeytokens/` — token generator, HMAC-signed webhook alerting, lifecycle management UI | Completed |
-| purple-team | `services/purple-team/` — Atomic Red Team loader, Caldera client, ATT&CK coverage heatmap, tabletop simulator UI | Completed |
-
-### v5.2
-
-| ID | Task | Status |
-|----|------|--------|
-| investigation-ledger | Append-only ledger of every prompt, tool call, evidence shard, and rationale (`investigation_step` table + `services/agents/app/investigator/ledger.py` + UI) | Completed |
-| ledger-api | `GET /api/v1/investigations/*` for listing, retrieving, and replaying ledger entries by case | Completed |
-| eval-harness-v2 | 200-incident synthetic dataset covering all 14 MITRE tactics + 4 eval gates: alert reduction (real measurement) plus MITRE-tactic / completeness / response-quality substrate self-consistency gates | Completed |
-| benchmark-page | Public eval harness page at `/benchmark` (docs + web) with published numbers, full method, comparison to other AI SOC offerings, and explicit "what each suite measures" framing | Completed |
-| ci-eval-gates | `scripts/run_evals.py --ci` wired into `.github/workflows/ci.yml` so every PR targeting `main` / `develop` is gated on substrate self-consistency + alert-reduction thresholds | Completed |
-| responder-pwa | Installable PWA (`apps/web/src/app/(responder)/`) with service worker, offline shell, manifest, icons | Completed |
-| passkeys | WebAuthn passkey registration + login for Responder surface (FIDO2 platform authenticators only) | Completed |
-| oncall | On-call schedule + handoff (`oncall.py` + Responder home page + alert page badge) | Completed |
-| approvals | Long-lived approval requests for blast-radius-gated SOAR actions, approvable from PWA with passkey | Completed |
-| web-push | VAPID-signed Web Push notifications wired into `services/realtime` + per-device subscriptions following on-call rotation | Completed |
-| ambient-copilot | Contextual actions on alert / case / rule / playbook surfaces, grounded in the Investigation Ledger | Completed |
-| mcp-server | `services/mcp/` — Model Context Protocol server exposing 11 AiSOC tools to Claude Desktop, Cursor, Cody, Continue | Completed |
-| streamlined-demo | `pnpm aisoc:demo` + `docker-compose.demo.yml` + prebuilt GHCR images for the demo profile | Completed |
-| content-pack | First-party content: 10 detections, 12 playbooks, 15 plugins indexed into `marketplace/index.json` | Completed |
-
-## GitHub repository
-
-https://github.com/beenuar/AiSOC
-
-## Services
-
-### Backend services
-
-| Service | Language | Port | Notes |
-|---------|----------|------|-------|
-| `services/api` | Python/FastAPI | 8000 | REST + WebSocket, RBAC, cases, Neo4j graph, rule engine |
-| `services/ingest` | Go 1.21 | 9090 | OCSF normalize, ATT&CK tag, Shodan + KEV correlation |
-| `services/enrichment` | Go 1.21 | 8080 | IOC enrichment, Redis-cached |
-| `services/fusion` | Python 3.11 | 8003 | Dedup + correlation + ML scoring (anomaly + ranker) |
-| `services/agents` | Python 3.11 | 8001 | LangGraph multi-agent investigations w/ full ATT&CK + Qdrant RAG |
-| `services/actions` | Python 3.11 | 8002 | SOAR action executor with blast-radius gate |
-| `services/threatintel` | Python 3.11 | 8005 | TAXII / MISP / OTX / KEV poller + IOC store |
-| `services/ueba` | Python 3.11 | 8004 | Behavioral baseline, anomaly scoring, peer-group analysis, Kafka |
-| `services/honeytokens` | Python 3.11 | 8005 | Token generation, first-touch alerting, lifecycle management |
-| `services/purple-team` | Python 3.11 | 8006 | Atomic Red Team, Caldera integration, ATT&CK coverage, tabletop |
-| `services/realtime` | Node.js 20 | 4000 | WebSocket/SSE fan-out + VAPID Web Push |
-| `services/mcp` | Node.js 20 | stdio | Model Context Protocol server, 11 AiSOC tools for Claude / Cursor / Cody / Continue |
-| `apps/web` | Next.js 14 | 3000 | SOC console + Responder PWA + `/benchmark` page |
-
-### Connectors (Phase 1)
-
-* CrowdStrike Falcon
-* Splunk Enterprise/Cloud
-* AWS Security Hub
-* Okta Identity
-* Microsoft Sentinel
-
-### Shared packages
-
-* `packages/types` — TypeScript type definitions
-* `packages/ui` — React UI component library
-* `packages/ocsf` — OCSF schema normalization
-
-### Data layer
-
-| Store | Purpose |
-|-------|---------|
-| PostgreSQL | App config, RBAC, cases, detection rules (RLS-isolated) |
-| ClickHouse | Event analytics, alert metrics |
-| OpenSearch | IOC, actor, threat-report search; Sigma backend |
-| Qdrant | Vector RAG for agents + threat intel |
-| Neo4j | Knowledge graph: entities, attack paths, blast radius |
-| Redis | Cache, pub/sub, IOC bloom filter |
-| Kafka | Event streaming bus |
-
-### Infrastructure
-
-* `infra/terraform` — AWS (VPC, EKS, RDS, ElastiCache, MSK)
-* `infra/helm/aisoc` — Kubernetes Helm chart
-* `docker-compose.yml` — Full local lab stack (`pnpm aisoc:lab`)
-* `docker-compose.demo.yml` — Streamlined demo stack with prebuilt GHCR images (`pnpm aisoc:demo`)
-* `.github/workflows/release.yml` + `publish-images.yml` — Build and publish per-service images to `ghcr.io/beenuar/aisoc-*`
-
-### Documentation
-
-* `README.md` — Project overview, quick start, architecture diagram
-* `CHANGELOG.md` — Per-release feature log; v5.2.0 covers Phase 1–4C
-* `ROADMAP.md` — Per-item phase status across v1 → v5.2
-* `MIGRATION.md` — Upgrade guide between major versions
-* `SECURITY.md` — Vulnerability disclosure policy
-* `apps/docs/` — Docusaurus site (intro, quickstart, architecture, concepts, plugins, deployment, contributing, benchmark, integrations/mcp)
-* `docs/openapi.yaml` — Generated OpenAPI 3.0 spec, source of truth for client SDKs
-* `docs/architecture/SYSTEM_DESIGN.md` — Service topology, knowledge graph, ML fusion, threat intel pipeline
-* `docs/runbooks/LOCAL_DEVELOPMENT.md` — Step-by-step local launch + smoke test
-* `CONTRIBUTING.md` — Contribution guidelines incl. eval harness + content authoring
-* `LICENSE` — MIT
-* `.env.example` — Environment variable reference
diff --git a/README.md b/README.md
index 3fff03a93..ffc635509 100644
--- a/README.md
+++ b/README.md
@@ -89,7 +89,8 @@ Full guide: [docs/integrations/mcp](apps/docs/docs/integrations/mcp.md). Source:
AiSOC bundles the components a SOC normally pieces together from separate vendors:
-- **Ingest** events from any connector (CrowdStrike, Splunk, AWS, Okta, Sentinel) into a Kafka spine.
+- **Connect data sources in three clicks** — a click-and-connect catalog (Microsoft Entra, Azure Activity, Defender XDR, GCP Cloud Audit, GCP SCC, Microsoft 365 audit, Google Workspace, Cloudflare, GitHub, plus the original CrowdStrike / Splunk / AWS Security Hub / Okta / Microsoft Sentinel set) renders a schema-driven form per connector, runs a live `Test connection` round-trip before save, encrypts every secret with the application-layer `CredentialVault` (Fernet AES-128-CBC + HMAC-SHA256), and starts polling on a per-instance schedule. Walkthrough: [docs/connectors](apps/docs/docs/connectors/index.md). Threat model + key rotation: [docs/operations/credentials](apps/docs/docs/operations/credentials.md).
+- **Ingest** events from any connector into a Kafka spine.
- **Correlate** them in real time with deduplication, ML scoring, and Sigma/YARA detection.
- **Enrich** every signal with threat intelligence from TAXII 2.1, MISP, OTX, and CISA KEV.
- **Reason** about attacks via a LangGraph multi-agent system grounded in MITRE ATT&CK.
diff --git a/apps/docs/docs/architecture.md b/apps/docs/docs/architecture.md
index 89c6f77e1..1152fda61 100644
--- a/apps/docs/docs/architecture.md
+++ b/apps/docs/docs/architecture.md
@@ -42,8 +42,59 @@ step against a case and replayable in the UI), the **Ambient Copilot**
playbooks), the **Responder PWA** (passkey-only mobile route at
`/responder/*` with VAPID Web Push), the **public eval harness** (one
real measurement plus three substrate self-consistency gates, run in CI),
-and the **MCP server** (`@aisoc/mcp`, exposes 11 tools to Claude / Cursor /
-Continue / Cody).
+the **MCP server** (`@aisoc/mcp`, exposes 11 tools to Claude / Cursor /
+Continue / Cody), and the **click-and-connect connector platform** (next
+section).
+
+## Connector polling and credential vault
+
+```
+Browser (Add connector wizard)
+ │
+ │ POST /api/v1/connectors { type, auth_config, connector_config }
+ ▼
+services/api ─── CredentialVault.encrypt() ───▶ vault:v1:<base64>
+ │
+ │ INSERT INTO connectors(auth_config_encrypted, ...)
+ ▼
+PostgreSQL ◄────────────────────────────────────────────────────┐
+ │ │
+ │ every 30s reload │
+ ▼ │
+services/connectors │
+ ConnectorScheduler (APScheduler, in-process) │
+ │ │
+ │ per-instance job @ poll_interval_seconds (default 300s) │
+ ▼ │
+ _poll_one(instance) │
+ │ │
+ │ 1. CredentialVault.decrypt() ── reads same key as API ──┘
+ │ 2. construct connector class from registry
+ │ 3. await connector.fetch_alerts(since_seconds=300)
+ │ 4. [connector.normalize(e) for e in raw_events]
+ │ 5. await ingest_client.push_events(tenant_id, normalized)
+ │ 6. record_poll_success(events_added, elapsed_ms)
+ ▼
+services/ingest POST /v1/ingest/batch X-Tenant-ID: <uuid>
+ │
+ ▼
+ Kafka spine ──▶ Fusion · UEBA · Detections (existing pipeline)
+```
+
+The `services/api` service holds the **encrypt** authority for the vault
+and is the only writer to `connectors.auth_config_encrypted`.
+`services/connectors` ships a vendored read-path `decrypt_dict()` that
+pairs to the same `AISOC_CREDENTIAL_KEY` so the scheduler can decrypt
+per-poll without owning the write path. Key rotation is supported via
+`MultiFernet` and the `AISOC_CREDENTIAL_KEY_ROTATION_FROM` env var; the
+[Operations: Credentials](./operations/credentials) page documents the
+full rotation procedure, threat model, and hosted-OAuth roadmap.
+
+The wizard's `Test connection` button skips the vault entirely — it
+forwards the raw form values to a stateless `POST /connectors/{id}/test`
+endpoint on the connectors microservice, which constructs the connector
+in memory and calls `test_connection()`. Bad credentials never touch the
+database.
## Monorepo Layout
diff --git a/apps/docs/docs/intro.md b/apps/docs/docs/intro.md
index 585b1c973..97808ee80 100644
--- a/apps/docs/docs/intro.md
+++ b/apps/docs/docs/intro.md
@@ -12,6 +12,7 @@ public, reproducible eval harness on every PR targeting `main` / `develop`.
## Capabilities
+- **Click-and-connect cloud connectors** — pick from a 14-connector catalog (Microsoft Entra, Azure Activity, Defender XDR, GCP Cloud Audit, GCP SCC, Microsoft 365 audit, Google Workspace, Cloudflare, GitHub, plus the original CrowdStrike / Splunk / AWS Security Hub / Okta / Microsoft Sentinel set), fill a schema-driven form, click `Test connection` for a live auth round-trip, and `Save & enable`. Secrets are encrypted at the application layer with a Fernet [`CredentialVault`](./operations/credentials) before they hit Postgres; an in-process APScheduler polls each enabled instance and pushes normalized OCSF events through to the ingest spine. Setup walkthroughs: [docs/connectors](./connectors).
- **Investigation Ledger** — every prompt, response, evidence citation, and tool call the agent emits is logged step-by-step and replayable on each case.
- **Public eval harness** — alert reduction (a real measurement on a fixed noisy stream) plus MITRE-tactic, investigation-completeness, and response-quality substrate self-consistency gates. Reproducible with one command and run in CI on every PR. The [eval harness page](./benchmark) documents what each suite does and does not measure.
- **Ambient Copilot** — context-aware next-action suggestions on every alert, case, rule, and playbook page; one click runs the right agent tool with the right payload.
@@ -55,6 +56,8 @@ See the full [Architecture](./architecture) page for the detailed service map an
## Quick Links
- [Quick Start](./quickstart) — `pnpm aisoc:demo`, under 5 minutes to a live investigation
+- [Connectors](./connectors) — click-and-connect catalog with 14 cloud / SaaS / SIEM / EDR / VCS sources
+- [Operations: Credentials](./operations/credentials) — `CredentialVault` threat model, key rotation, hosted-OAuth roadmap
- [Public eval harness](./benchmark) — alert reduction (real measurement) plus MITRE / completeness / response-quality substrate self-consistency gates
- [MCP Integration](./integrations/mcp) — connect Claude / Cursor / Continue / Cody
- [Architecture](./architecture) — service map and data flow
diff --git a/apps/docs/docs/quickstart.md b/apps/docs/docs/quickstart.md
index 5a27b63dc..39c45f186 100644
--- a/apps/docs/docs/quickstart.md
+++ b/apps/docs/docs/quickstart.md
@@ -171,6 +171,38 @@ The mobile **Responder PWA** lives at
[http://localhost:3000/responder](http://localhost:3000/responder) — install
it on your phone via "Add to Home Screen" and sign in with a passkey.
+### 8. Connect your first source in 5 minutes
+
+The seeded demo data is enough to fly the UI through; pointing AiSOC at a
+live source takes about five minutes per connector and zero code changes:
+
+1. Generate a vault key and put it in `.env` —
+ `python -c "from cryptography.fernet import Fernet; print(Fernet.generate_key().decode())"`
+ then set `AISOC_CREDENTIAL_KEY=<that-string>`. In dev the API will
+ bootstrap an ephemeral key if you skip this; in prod the API refuses
+ to start without one. Full threat model and rotation procedure:
+ [Operations: Credentials](./operations/credentials).
+2. Restart the `api` and `connectors` services so they pick up the key.
+3. In the console, click **Connectors** → **Add connector**, pick a
+ source from the catalog (Microsoft Entra, GCP Cloud Audit, GitHub, …
+ — full list at [docs/connectors](./connectors)), and fill out the
+ schema-driven form.
+4. Click **Test connection**. The wizard runs a live auth round-trip
+ against the vendor API before saving — bad credentials never hit the
+ database.
+5. Click **Save & enable**. The in-process scheduler picks up the
+ instance within 30 seconds, polls every 5 minutes by default, and
+ pushes normalized OCSF events to the ingest spine. Watch the
+ **Connectors** page for `events_added` to start ticking up; watch
+ `/alerts` for them to flow through fusion and detection.
+
+Each per-connector page (e.g.
+[Microsoft Entra](./connectors/azure-entra),
+[GCP Cloud Audit](./connectors/gcp-cloud-audit),
+[GitHub](./connectors/github)) walks through the cloud-side prereqs
+(Azure AD app, GCP service account, GitHub fine-grained PAT) with exact
+permissions / scopes / role assignments and a troubleshooting section.
+
### Console Tour
| Page | URL | Description |
@@ -193,6 +225,8 @@ it on your phone via "Add to Home Screen" and sign in with a passkey.
## Next Steps
- [Architecture deep-dive](./architecture)
+- [Connect your first source](./connectors)
+- [Operations: Credentials](./operations/credentials) — vault, key rotation, hosted-OAuth roadmap
- [Concepts: Cases & Investigation Ledger](./concepts/cases)
- [Write your first detection rule](./concepts/detections)
- [Build a playbook](./concepts/playbooks)