AI IT Administrator Platform
Self-hosted Phase 1 AI IT operations platform for SCIM 2.0 provisioning diffs, Alertmanager incident triage, SaaS access audits, and advisory-only runbooks RAG.
01. Problem & Context
IT and platform engineering teams juggle repetitive Joiner/Mover/Leaver identity requests, noisy Prometheus alerts, expiring TLS certificates, orphaned SaaS accounts, and tribal incident runbooks—while granting an AI agent unrestricted shell execution or directory write access introduces severe security and outage risks.
02. Engineering Solution
Architected and implemented a self-hosted Phase 1 IT administration control plane pairing a Python 3.12 FastAPI + async SQLAlchemy 2.0 backend (14 tables across 2 Alembic migrations) with a 6-view React 18 / TypeScript console served behind non-root Nginx containers. Automates SCIM 2.0 dry-run diffs with RFC 7644 BulkRequest export, HMAC-SHA256 Alertmanager ingestion with fingerprint deduplication, SaaS entitlement & MFA audits, and hybrid vector + keyword runbooks RAG permanently locked to advisory_only mode under RBAC, rate limiting, SSRF guards, and a SHA-256 audit chain.
03. System Architecture
Four core FastAPI domain modules (`identity/`, `telemetry/`, `access_audit/`, and `runbooks/`) plus `integrations/` and `governance/` run atop async SQLAlchemy 2.0 (`asyncpg` / `aiosqlite`) with Alembic migrations, sliding-window `RateLimitMiddleware`, pure ASGI security headers, Prometheus `/api/v1/metrics`, and DB-backed `/api/v1/health/ready` probes.
Core Architectural Components
Identity & SCIM 2.0 Dry-Run Planner (`/api/v1/identity/*`)
Evaluates Joiner/Mover/Leaver transitions against least-privilege role templates, flags extra-app privilege deviations, exports RFC 7644 SCIM 2.0 `BulkRequest` JSON payloads, and applies directory/entitlement changes atomically only after `it_approver`/`admin` sign-off.
Telemetry, Alertmanager HMAC Webhooks & Triage (`/api/v1/telemetry/*`)
Monitors service latency, error rates, TLS cert expiry, and quota thresholds; verifies `X-Webhook-Signature` HMAC-SHA256 digests on Alertmanager webhooks; deduplicates alerts by SHA-256 fingerprint; and classifies incidents citing indexed runbooks.
SaaS Access Control & Entitlement Audits (`/api/v1/access-audit/*`)
Scans SaaS entitlements against active directory identities and role templates to detect orphaned accounts, stale API tokens (>90d), privilege drift, and missing MFA with deduplicated findings routed through HITL remediation approvals.
Runbooks RAG, SSRF-Guarded Connectors & Governance (`/api/v1/runbooks/*`, `/integrations/*`, `/governance/*`)
Combines deterministic signed feature-hash vector + keyword retrieval with `advisory_only` zero-blind-shell guardrails (`FORBIDDEN_SHELL_PATTERNS`), SSRF-validated Slack/PagerDuty webhook connectors, outbound cloud PII/credential scrubbing, and a lock-guarded SHA-256 audit chain.
04. Notable Engineering Decisions
Zero Blind Shell Execution & Advisory-Only Runbooks
Remediation drafts never import or invoke `subprocess` or shell runners. Dangerous patterns (`rm -rf`, `curl | bash`, `DROP DATABASE`, `kubectl delete namespace`, command substitutions) are stripped and logged by `inspect_commands_for_safety()` while every draft remains locked to `advisory_only`.
Outbound Credential/PII Scrubbing & SSRF Webhook Isolation
IT logs routinely contain PEM private keys, AWS keys, JWTs, API tokens, and internal IPs. `redact_pii()` scrubs secrets prior to cloud Gemini inference or outbound Slack/PagerDuty webhook tests, while `validate_webhook_url()` blocks loopback, RFC1918, `.internal`, and cloud metadata endpoints.
Concurrency-Safe SHA-256 Audit Chain & Production Observability
`record_audit_event()` serializes sequence allocation per event loop to prevent chain forks under concurrent load, paired with sliding-window rate limiting (`429` + `Retry-After`), structured `structlog` JSON logging, and live Prometheus operational gauges at `/api/v1/metrics`.
05. Engineering Challenges & Solutions
Challenge: Preventing unreviewed SCIM directory mutations and stale-token revocations while preserving high operator velocity.
Engineering Solution: Separated dry-run SCIM diff generation and RFC 7644 `BulkRequest` export from execution, gating directory and SaaS entitlement writes behind `it_approver`/`admin` RBAC approval endpoints.
Challenge: Preventing alert storms and race conditions in hash-chained audit logging during high-volume telemetry ingestion.
Engineering Solution: Implemented deterministic SHA-256 alert fingerprint deduplication on Alertmanager webhooks and health checks alongside per-loop `asyncio.Lock` serialization on audit sequence generation.
06. Implementation Highlights
- End-to-end Phase 1 implementation across `identity/`, `telemetry/`, `access_audit/`, `runbooks/`, `integrations/`, and `governance/`
- Joiner/Mover/Leaver SCIM 2.0 dry-run diffs, least-privilege warnings, and RFC 7644 `BulkRequest` JSON export (`/api/v1/identity/plans/{id}/scim-payload`)
- HMAC-SHA256 Alertmanager webhooks (`/api/v1/telemetry/webhooks/alertmanager`), TLS/quota monitoring, and fingerprint alert deduplication
- Zero-blind-shell `advisory_only` runbooks RAG (`FORBIDDEN_SHELL_PATTERNS`) and SSRF-guarded Slack/PagerDuty connectors (`/api/v1/integrations/webhooks`)
- Sliding-window `RateLimitMiddleware`, Prometheus `/api/v1/metrics`, concurrency-locked SHA-256 audit chain, and outbound secret/PII scrubbing
- 6-view React 18 + Vite + TypeScript control plane verified end-to-end in live browser smoke tests and CI (Ruff, Mypy, pytest, Vitest, `npm audit`, Trivy)