CMP-29Recommended
Review access every quarter
Every quarter, export every account and role from each system with production or customer data. Compare it with the staff list and remove extras within five working days.
How to do it
Cover the identity provider, cloud accounts, the code host, databases, the admin tool and each tier 1 vendor. Run the export and comparison as a script, so the review is the same each time. The owner of each system confirms the list and signs off. Save the script output and the removals as evidence. ISO/IEC 27001:2022 control A.5.18 and SOC 2 criteria CC6.2 and CC6.3 expect this review. Give customers the same view, as let owners see who can do what says. Admin rights are not standing roles at all, as Grant admin access for hours only says, so the review checks their grants instead.
Examples
JavaScript example
const staffById = new Map(staff.map(person => [person.id, person]));
export const accessFindings = (accounts, allowedRoles) => accounts.flatMap(account => {
const person = staffById.get(account.ownerId);
if (!person || person.status !== 'active') return [`${account.system}/${account.login}: no active owner`];
return account.roles.filter(role => !allowedRoles[person.job]?.includes(role))
.map(role => `${account.system}/${account.login}: role ${role} not allowed for ${person.job}`);
});
Python example
def access_findings(accounts: list[dict], staff: list[dict], allowed_roles: dict[str, list[str]]) -> list[str]:
staff_by_id = {person["id"]: person for person in staff}
findings = []
for account in accounts:
person = staff_by_id.get(account["owner_id"])
if not person or person["status"] != "active":
findings.append(f"{account['system']}/{account['login']}: no active owner")
continue
findings += [f"{account['system']}/{account['login']}: role {role} not allowed for {person['job']}"
for role in account["roles"] if role not in allowed_roles.get(person["job"], [])]
return findings
How to check
The latest review in the evidence store is less than 92 days old. The script finds no account that is missing from the staff list or that holds a role its job does not grant.
Sources
Related rules
- PAY-24 Give each person the smallest role in the provider dashboard in Payments and billing
- INF-22 Grant admin access for hours only in Infrastructure and environments
- ACC-40 Let owners see who can do what in Accounts and identity
- DEN-28 Grant warehouse access by role from the directory in Data engineering
- SUP-8 Give each support tier only the actions its work needs in Customer support
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/compliance/audit-logs-and-access/access-reviews">Agent Wranglers compliance and governance playbook</a>. In code you write, add a comment next to it with the same link.