Architecting a Self-Hosted AI IT Administrator: SCIM 2.0 Dry-Run Diffs, Alertmanager Triage, and Zero-Shell Runbooks
Inside the Phase 1 implementation of ai-it-admin: Joiner/Mover/Leaver SCIM 2.0 dry-run provisioning diffs, RFC 7644 BulkRequest export, HMAC Alertmanager webhooks, SaaS/MFA audits, and advisory-only zero-shell runbooks RAG.
Internal IT and platform engineering teams sit at the intersection of high-volume identity tickets, noisy Alertmanager pages, drifting SaaS entitlements, and tribal operational runbooks. Handing those workflows to an unrestricted AI agent with shell access or live directory credentials creates unacceptable outage and privilege-escalation risk.
When architecting AI IT Administrator Platform (open-source on GitHub), the core engineering principle was strict read-before-write governance: every directory mutation previews as an RFC 7644 SCIM 2.0 diff, every runbook recommendation stays locked to `advisory_only`, and every state change writes to a concurrency-safe SHA-256 audit chain.
Joiner/Mover/Leaver SCIM 2.0 Dry-Run Diffs & RFC 7644 BulkRequest Export#
Under `/api/v1/identity/*`, Joiner, Mover, and Leaver transitions are evaluated against declarative least-privilege role templates rather than ad-hoc prompts. Whenever a request asks for entitlements outside the user's department baseline, the planner flags explicit privilege deviations before generating a deterministic provisioning diff and exporting a standard RFC 7644 SCIM 2.0 `BulkRequest` JSON payload via `/api/v1/identity/plans/{id}/scim-payload`.
No directory state or SaaS license allocation mutates during planning. Execution occurs atomically only after an authorized `it_approver` or `admin` signs off, preventing unreviewed role escalation or accidental offboarding lockouts.
HMAC-Signed Alertmanager Webhooks, Fingerprinting & SaaS Access Audits#
Operational telemetry under `/api/v1/telemetry/*` tracks service latency, error rates, TLS certificate expiry, and quota thresholds while verifying `X-Webhook-Signature` HMAC-SHA256 digests on inbound Alertmanager webhooks. Incoming alerts are hashed into deterministic SHA-256 fingerprints so alert storms collapse into deduplicated incident threads triaged against indexed runbooks.
In parallel, `/api/v1/access-audit/*` continuously reconciles SaaS application rosters against active directory identities and least-privilege templates—surfacing orphaned accounts, stale API tokens older than 90 days, privilege drift, and missing MFA behind human-approved remediation queues.
Zero-Blind-Shell Runbooks RAG, SSRF Guards & Concurrency-Safe Audits#
Incident response teams need fast answers from Markdown runbooks without letting an LLM execute commands behind their back. The `/api/v1/runbooks/*` engine pairs deterministic signed feature-hash vector search with keyword retrieval while enforcing `advisory_only` mode at every boundary:
FORBIDDEN_SHELL_PATTERNS = (
r"rm\s+-rf", r"curl\s+.*\|\s*(sh|bash)", r"DROP\s+DATABASE",
r"kubectl\s+delete\s+namespace", r"\$\([^)]+\)", r"`[^`]+`",
)
def inspect_commands_for_safety(draft_text: str) -> tuple[str, list[str]]:
blocked = [p for p in FORBIDDEN_SHELL_PATTERNS if re.search(p, draft_text, re.I)]
return ("advisory_only", blocked)- Outbound Secret & PII Redaction: `redact_pii()` scrubs PEM private keys, AWS access keys, JWTs, API tokens, and internal IPs before cloud Gemini fallback or outbound Slack/PagerDuty tests.
- SSRF Webhook Isolation: `validate_webhook_url()` rejects loopback, RFC1918 private subnets, `.internal` hosts, and cloud metadata endpoints on `/api/v1/integrations/webhooks`.
- Concurrency-Locked Audit Chain & Telemetry: Per-loop `asyncio.Lock` sequence serialization prevents SHA-256 chain forks under concurrent writes, paired with sliding-window `RateLimitMiddleware`, `structlog` JSON logs, and Prometheus `/api/v1/metrics`.
If you are modernizing internal identity workflows or building guarded operations tooling, explore my Software Architecture and AI Engineering services or schedule an architecture call.
Production Case Studies & Capabilities
Explore how these engineering patterns are deployed in production systems and available through client engagements.
AI IT Administrator Platform
Open-source Python (FastAPI), async SQLAlchemy 2.0 + PostgreSQL/pgvector, and React 18 IT administration control plane featuring Joiner/Mover/Leaver SCIM 2.0 dry-run diffs & RFC 7644 BulkRequest export, HMAC-signed Alertmanager webhooks & alert deduplication, SaaS/MFA access drift audits, zero-blind-shell runbooks RAG, SSRF-guarded Slack/PagerDuty connectors, and a concurrency-locked SHA-256 audit chain.
Software Architecture & System Design
Fast-moving teams frequently accrue hidden architectural liabilities: tangled domain logic, unmaintainable monoliths, or over-engineered microservices that paralyze development.
AI Engineering & LLM Integration
Many AI initiatives fail in production due to prompt fragility, high token latency, hallucination risks, and lack of structured evaluation. I bridge the gap between experimental LLM prompts and deterministic software engineering.
Frequently Asked Questions
Why separate SCIM 2.0 dry-run diff planning from directory execution?
How does ai-it-admin prevent an AI runbook assistant from running destructive shell commands?
How does the platform handle concurrent audit logging and alert storms?
Related Technical Articles
Self-Hosted AI QA & Release Engineering: OpenAPI E2E Synthesis, CI Triage, and SSRF-Guarded Canary Gates
Architecting ai-qa-release-engineer: OpenAPI 3.x Playwright and pytest E2E synthesis, CI log classification, GitHub Actions WF001–WF008 security audits, LLM regression scoring, and 6-gate canary promotion.
Automating Compliance, Data Governance, QA, and IT Operations with Guarded Self-Hosted AI
How deterministic policy scanners, legal-hold DSAR blocks, HKDF/Fernet PII tokenization, SCIM 2.0 dry-run diffs, and OpenAPI E2E test synthesis power internal governance and release engineering safely.