Documentation
Stale Account Deactivation
Project-Agent / library/workflows/stale-account-deactivation/README.md
Automatically identifies stale Okta accounts that have not been used within a configurable threshold, sends a Slack approval request to the security team, and deactivates the account upon approval.
Maturity: L4+ (Governed and up) · See the 5-level maturity model for where this workflow fits in your program.
Time Saved
~4 hours per month of manual identity review and cleanup.
Connectors
| Connector | Operations | Risk Level | |-----------|-----------|------------| | Okta | users:read | Low — read-only | | Okta | users:deactivate | High — disables user accounts | | Slack | chat:write, reactions:read | Low — HITL approval channel |
How It Works
- Query Okta for all active users.
- Filter users whose last login exceeds the staleness threshold (default 90 days).
- Post a Slack message to the designated approval channel listing stale accounts.
- Wait for an approver to react with a checkmark emoji.
- Deactivate approved accounts in Okta.
- Post a summary of actions taken back to Slack.
ARX Governance
Risk Classification
users:read— Low. Read-only user enumeration.users:deactivate— High. Destructive action that disables user access.chat:write/reactions:read— Low. HITL channel communication.
HITL Gate Configuration
- Operation:
users:deactivate— requires approval before execution. - Channel:
SLACK_APPROVAL_CHANNEL(configurable inarx.yaml). - Timeout: 24 hours. If no approval is received, the action is skipped.
- Approvers: Members of the
security-teamSlack user group.
Policy Rules
users:read— permit — automated, no approval needed.users:deactivate— escalate — requires HITL approval via Slack.chat:write— permit — notification only.- Batch deactivation of >10 accounts — deny — must be split into smaller batches.
Audit Trail
- List of stale accounts identified with last login timestamps.
- Approver identity, approval timestamp, and Slack message link.
- Each deactivated account ID and confirmation status from Okta.
- Full event log written to
arx.audit_log.
> See arx.yaml for the full governance configuration.
Setup Instructions
- Register connectors in
arx.yamlwith valid Okta and Slack credentials. - Set environment variables:
OKTA_DOMAIN,OKTA_API_TOKENSLACK_BOT_TOKEN,SLACK_APPROVAL_CHANNEL
- Adjust
staleness_threshold_daysinarx.yamlif 90 days is not appropriate. - Deploy with
arx deploy stale-account-deactivation. - Verify the first run in dry-run mode:
arx run stale-account-deactivation --dry-run.
Schedule
Runs on the 1st and 15th of each month at 09:00 UTC.