← Back to use cases
HR & ITUpdated 2026-04-30

Sixty | second termination revoke

One terminate call. Fourteen systems revoked in parallel. Risk summary per adapter. Symmetric rehire reactivation when the same person comes back.

Why the leaver case is the one worth obsessing over

The hire ships in twelve days and nobody notices. The leaver leaves accounts active across fourteen systems, somebody compromises one of them six months later, and now the company has a board-level conversation about controls. The asymmetry is exactly why the termination workflow is the single most valuable surface the platform exposes. Sixty-second revoke is not a marketing number; it is the difference between an audit finding and an audit pass.

The architecture under the number

The terminate endpoint on hr_employees_routes.py creates the revocation queue rows inside the same database transaction that flips the employment record. A Celery beat worker picks rows up with FOR UPDATE SKIP LOCKED, which is the lock pattern that lets multiple workers drain the queue without stepping on each other. Each adapter implements get_user_risk_summary plus revoke. The risk summary scans recent activity for anomalies. If something looks off, the row routes to revocation_approvals and gates on a human. If it looks clean, the row revokes and writes one audit log entry. The dashboard subscribes to the SSE stream and renders progress in real time.

The reactivation mirror

Termination is half the loop. Rehire is the other half. The same architecture runs in reverse on /employees/{id}/rehire: the new employment_records row writes, the reactivation queue rows fan out to the same fourteen adapters, and the dashboard streams progress on the same surface. This is the part the build-your-own-Slack-bot category cannot replicate without the system of record. An orchestrator that does not own the employee table cannot reactivate on rehire because it does not know who got rehired.

What the audit log looks like after one termination

Fifteen rows. Fourteen adapters plus the trigger. Each row records the timestamp, the actor, the target system, the action, the result, and the risk summary that was attached to the call. The whole thing is hash-chained, so a tampered row breaks the chain and surfaces in verification. SOC 2 evidence packs lift these rows verbatim. The auditor reads them, signs them, and moves on.

Frequently asked

What if the adapter flags a risk?

The row goes to revocation_approvals and waits on a human. The dashboard surfaces the risk summary, the human reviews, and either approves the revoke or escalates further. Nothing silently bypasses the risk gate.

What systems are in the fourteen?

Workspace, Slack, GitHub, Okta, Microsoft 365, AWS IAM, 1Password, Bitwarden, Notion, Linear, Figma, the embedded payroll engine, the equipment recovery ticket, plus the parent HRIS. Custom adapters extend the set without changing the core flow.

Does this work with Okta as the identity layer?

Yes. Okta receives a global token revocation call as part of the fan-out, which terminates active sessions across every federated app the user touched.

Related use cases

Run this on your stack.