# Account provisioning/deprovisioning documented

- **Pattern:** `ab-001582` (`gov-fisma-fedramp.documentation-readiness.account-provisioning-documented`)
- **Severity:** low
- **Lifecycle:** active
- **Last modified:** 2026-04-18
- **Canonical URL:** https://auditbuffet.com/patterns/ab-001582
- **License:** CC-BY-4.0 — attribute to AuditBuffet Pattern Catalog (https://auditbuffet.com/patterns/ab-001582)

## Why it matters

Undocumented account provisioning means departing employees retain access indefinitely and new joiners receive inconsistent permissions — two direct violations of NIST 800-53 rev5 AC-2 (Account Management), which requires formal procedures for account creation, modification, review, and termination. CMMC 2.0 AC.L1-3.1.1 makes this a baseline requirement for any contractor handling federal information. FedRAMP rev5 AC-2 adds an auditable trail requirement. Without documented deprovisioning steps, a disgruntled ex-employee's credentials may remain valid long after their last day, and an auditor will flag the absence of written procedures as a control gap regardless of what the code does.

## Severity rationale

Low because undocumented provisioning does not directly enable an attack, but its absence means deprovisioning failures go undetected and auditors will cite it as a control deficiency.

## Remediation

Create `docs/account-management.md` covering all four lifecycle stages. Write steps specifically enough that an on-call engineer with no prior context can execute them without asking questions.

```markdown
# Account Management

## Provisioning (new user)
1. Admin navigates to Settings > Users > Invite
2. Enters email and selects role (viewer / auditor / admin)
3. System sends time-limited invite link (24 h expiry)
4. User completes registration and sets a password meeting policy

## Role Assignment
- Roles follow least-privilege: default is viewer
- Elevation to auditor or admin requires written approval in the team ticket tracker
- Role changes logged automatically in audit_logs table

## Deprovisioning (user departure)
1. Admin deactivates account in Settings > Users > [User] > Deactivate
2. All active sessions invalidated immediately (Supabase: `auth.admin.deleteUser`)
3. API keys and personal tokens revoked
4. Access confirmed revoked within 1 business day of departure notice
```

## Detection

**The detection method for this pattern is part of AuditBuffet Pro.**

The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the [FISMA/FedRAMP Readiness Audit](https://auditbuffet.com/audits/gov-fisma-fedramp). The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.

## External references

- nist AC-2
- nist PS-4
- fedramp AC-2
- cmmc AC.L1-3.1.1

Taxons: operational-readiness, regulatory-conformance

HTML version: https://auditbuffet.com/patterns/ab-001582
