Architecture Note · Security & Compliance
Identity, SSO & Just-in-Time Privileged Access Reviews: Deterministic UAR, Peer-Gated JIT, and Verifiable SOX Trails
How deterministic SoD detection, time-boxed JIT elevation, human-gated production revocations, and SHA-256 chained SQLite audit logs eliminate standing privilege without auto-locking prod.
The Operational Problem: Standing Privilege and Manual Access Reviews
Across multi-region enterprises operating Okta or Entra ID alongside AWS IAM Identity Center, GitHub Enterprise, and NetSuite or SAP, least privilege erodes between quarterly audits. Departed contractors leave behind unowned service identities, transferred staff accumulate legacy approval roles through role creep, and standing entitlements form toxic Segregation-of-Duties (SoD) pairings—such as editing production settlement ledgers while approving outbound payouts, or administering IAM policies while holding CloudTrail deletion rights. Offboarding delays also leave stale Personal Access Tokens or STS sessions open past 15-minute leaver SLAs. Security and internal audit teams spend weeks reconciling spreadsheets across NYC, London, Frankfurt, Tokyo, and Singapore to produce SOX 404 and ISO 27001 evidence.
Why Naive AI Wrappers Fail
Sending raw entitlement exports to generic LLM chat wrappers introduces predictable operational and audit failures for IAM teams:
- Directory egress and retention exposure: Pushing workforce rosters, HR termination statuses, and production role mappings to third-party SaaS model APIs exposes sensitive privilege topology outside the security boundary without deterministic file cleanup guarantees.
- Nondeterministic SoD evaluation and silent drift: Probabilistic prompts miss exact toxic-pair intersections, gloss over inactive transfer entitlements, or emit inconsistent risk classifications across runs when internal auditors require repeatable rule evaluation.
- Unbounded automation without human gates: Auto-remediation scripts wired to model outputs risk locking critical production accounts during live incidents, while chat summaries lack tamper-evident hash chains, self-approval blocks, and ticket-backed deprovisioning records.
The Deterministic Architecture That Fixes It
A production identity governance control plane isolates deterministic policy checks and immutable state transitions inside a self-contained FastAPI and SQLite (WAL mode) boundary:
- Deterministic UAR ingestion and 1-hour upload wipe:
POST /api/uar/campaignsingests CSV or JSON entitlement payloads across SSO, GitHub, AWS, and ERP, evaluating explicit rules for orphan accounts (hr_status != activeor missing owner), cross-department role creep, and configurable toxic SoD pairs (prod-db-admin+finance-payout-approver,aws-iam-full+cloudtrail-delete,github-admin+prod-release-bypass,erp-vendor-create+erp-payment-release). AnOfflineDeterministicAdapterexecutes zero-key by default, temporary uploads receive0600permissions, and a background sweeper wipes raw files after 1 hour (3600s) while retaining SHA-256 source digests. - Time-boxed JIT elevation with blocked self-approval:
POST /api/jit/requestreplaces standing production privileges with 1–120 minute ephemeral grants (<=0or>120rejected with HTTP422). Explicit peer or manager approval in SQLite is mandatory; self-approval (approver == requester) fails with HTTP403, and active sessions recordgranted_atandexpires_atfor automatic TTL expiry. - Human-gated UAR decisions and safe deprovisioning tickets:
POST /api/uar/decisionswrites append-only Keep/Revoke certifications protected by SQLiteUPDATE/DELETEprevention triggers. Production revocations require explicit human confirmation (human_reviewed: trueplus rationale, blocking automated prod locks with HTTP422) and stagepending_executiontickets withauto_locked_prod: false. - Leaver and transfer SLA reconciliation: Cross-system offboarding timelines track SSO, GitHub, AWS, and ERP against 15-minute termination and 4-hour transfer SLAs, flagging lingering tokens for human verification before ticket closure.
- Cryptographic SOX and ISO 27001 audit exports:
GET /api/audit/access-trailexports SHA-256 hash-chained logs (prev_hash,entry_hash,chain_valid: true) in JSON or RFC 4180 CSV alongside scoped magic invite tokens, sliding-window rate limits, and a 14-testpytestsuite.
Operational Takeaway
Identity governance scales when rule evaluation is deterministic, privileged elevation expires automatically within 120 minutes, and production revocations wait on explicit human sign-off. Pairing zero-key local analysis with 1-hour upload wiping, blocked self-approval, and append-only SHA-256 audit chains gives security and internal audit teams verifiable SOX evidence without risking production outages.