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:

  1. Deterministic UAR ingestion and 1-hour upload wipe: POST /api/uar/campaigns ingests CSV or JSON entitlement payloads across SSO, GitHub, AWS, and ERP, evaluating explicit rules for orphan accounts (hr_status != active or 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). An OfflineDeterministicAdapter executes zero-key by default, temporary uploads receive 0600 permissions, and a background sweeper wipes raw files after 1 hour (3600s) while retaining SHA-256 source digests.
  2. Time-boxed JIT elevation with blocked self-approval: POST /api/jit/request replaces standing production privileges with 1–120 minute ephemeral grants (<=0 or >120 rejected with HTTP 422). Explicit peer or manager approval in SQLite is mandatory; self-approval (approver == requester) fails with HTTP 403, and active sessions record granted_at and expires_at for automatic TTL expiry.
  3. Human-gated UAR decisions and safe deprovisioning tickets: POST /api/uar/decisions writes append-only Keep/Revoke certifications protected by SQLite UPDATE/DELETE prevention triggers. Production revocations require explicit human confirmation (human_reviewed: true plus rationale, blocking automated prod locks with HTTP 422) and stage pending_execution tickets with auto_locked_prod: false.
  4. 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.
  5. Cryptographic SOX and ISO 27001 audit exports: GET /api/audit/access-trail exports 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-test pytest suite.

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.

Test deterministic IAM & JIT controls on your own entitlement export

Start with a free 30-minute workflow check. Bring one Okta, Entra ID, or quarterly SOX UAR sheet and leave with a concrete architecture recommendation in writing within one business day.