Guide
Segregation of Duties Matrix: How to Build One, With Examples
How to build a segregation of duties matrix for IT access, with example conflicts in Keycloak, GitHub and AWS, and how to check people against it.
Part of the guide User Access Review: How to Run One, Step by Step
A segregation of duties matrix writes down which duties must stay apart, so you can check every account against it. This guide shows the two formats, example conflicts for a software company, and how to run the check during an access review.
A segregation of duties matrix is a table that lists the duties one person must not hold together, such as asking for access and approving it, or changing code and approving that change. You build it from your own processes and systems, then compare it with who holds what. Where one person holds both sides, the conflict is removed or recorded as an exception.
What a segregation of duties matrix is
Segregation of duties (also called separation of duties, or SoD) splits a risky task between people, so a mistake or an abuse needs two of them. The matrix, also called an SoD matrix or a separation of duties matrix, is the written version: the list of pairs that conflict in your company.
Two words come up often:
- A duty is a thing a person can do in a system, such as “approve a pull request” or “create users”. In practice, a duty is held through a role, a group or a permission.
- A conflict is two duties that, held together, let one person do something risky without anyone else seeing it. Some guides call such a pair a toxic combination.
Many published matrices come from finance, where the classic pair is creating a supplier and approving a payment to it. The idea is the same in IT. The duties are different: changing code, deploying, granting access and managing logs.
The two formats: a grid or a list of rules
You can write the same matrix two ways. Both work; pick the one your reviewers will read.
The grid. The duties go down the side and across the top. Each cell says whether one person may hold both. It is easy to scan for a handful of duties and hard to read past ten or so. The example below is ours, for a small software company, and not a standard.
| Duty | Ask for access | Approve access | Grant access | Review access | Manage audit logs |
|---|---|---|---|---|---|
| Ask for access | Same duty | Conflict for the same request (rule 1) | Conflict for the same request (rule 1) | Allowed | Allowed |
| Approve access | Conflict for the same request (rule 1) | Same duty | Allowed | Allowed | Allowed |
| Grant access | Conflict for the same request (rule 1) | Allowed | Same duty | Conflict for the same system (rule 5) | Conflict (rule 2) |
| Review access | Allowed | Allowed | Conflict for the same system (rule 5) | Same duty | Allowed |
| Manage audit logs | Allowed | Allowed | Conflict (rule 2) | Allowed | Same duty |
The list of rules. One row per conflicting pair, with why it matters and where each side lives. It grows without getting harder to read, and it is the format to use when you check accounts, because each row becomes one test. A common way is to start with the grid to think it through, then keep the list. The rule numbers in the grid above point to the list below: they are one matrix, written two ways.
Example conflicts for a software company
These are examples to adapt, not a complete list. The pairs that matter are the ones your own processes create. NIST is clear on this: in control AC-5 the duties to separate are “organization-defined”.
| Rule | Duty A | Duty B | Why they conflict | Where each side lives (example) |
|---|---|---|---|---|
| 1. Access requests | Ask for access | Approve or grant that same request | A person could give themselves anything. Someone else approves, usually their manager, and the change is made by an administrator who is not the requester. | The requester and the approver on the access ticket, in Jira or your ticket tool. |
| 2. Granting and logging | Grant access or manage users | Change, stop or delete the audit logs | Someone could change access and erase the record of it. NIST gives this pair as an example in AC-5. | Keycloak: the manage-users and manage-events roles. AWS: IAM permissions, and the CloudTrail action that stops logging. |
| 3. Code changes | Write a change | Approve the same change for merge | Unreviewed code could reach production. The review is only worth something if the reviewer is not the author. | GitHub: the author of a pull request, and who can merge it without an approving review. |
| 4. Production | Build and test in development | Release to production alone | A change could skip review and approval on its way to customers. If PCI DSS applies, requirement 6.5.4 covers this one. | Who can push to the production branch, or run the production deploy, in GitHub or your deploy tool. |
| 5. Access reviews | Grant access in a system (administer it) | Be the only reviewer of access to that system | An administrator would be judging their own work, including their own admin rights. | Keycloak realm-admin, GitHub organization owner, AWS AdministratorAccess, against the reviewer named for that system. |
If your company also runs finance or HR systems, add their pairs too: creating a supplier and approving a payment to it, or changing someone’s pay and approving the payroll run.
What ISO 27001, SOC 2, PCI DSS and NIST say
Each framework names segregation of duties. Only PCI DSS names a pair, and only one: production and pre-production. The rest of the list is yours to write, and the matrix is where it goes.
| Framework | What it says |
|---|---|
| ISO/IEC 27001:2022, Annex A | Control 5.3, Segregation of duties: conflicting duties and conflicting areas of responsibility are segregated. |
| SOC 2 trust services criteria, CC6.3 | Access is authorized, modified or removed based on roles, responsibilities, or the system design and changes, giving consideration to least privilege and segregation of duties. |
| PCI DSS v4.0.1, requirement 6.5.4 | Roles and functions are separated between production and pre-production environments, so that only reviewed and approved changes are deployed. |
| NIST SP 800-53 Rev. 5, control AC-5 | Identify and document the duties of individuals that require separation, and define system access authorizations to support that separation. |
The wording above is ours. For the exact text, read ISO/IEC 27001:2022 (sold by ISO), the AICPA’s trust services criteria, PCI DSS v4.0.1 from the PCI Security Standards Council, and NIST SP 800-53 Rev. 5.
The discussion under NIST AC-5 also warns that conflicts can span systems, so your policy should consider all of them together. The NIST glossary puts the principle simply: no user should have enough privileges to misuse the system on their own.
How to build a segregation of duties matrix
- List the risky actions. Start from what could hurt you: access changes, code reaching production, logs being erased, money leaving. Five to ten actions is enough for a first version.
- Split each action into duties. For each one, write who asks, who approves, who does it and who checks it afterwards. A conflict is two of these held by one person.
- Write each conflicting pair as a rule. One row per pair: duty A, duty B and why they conflict. Keep the words plain, so a manager can read them.
- Map each duty to the systems. For each duty, write the role, group or permission that grants it in each system. For example, “grant access” might be the manage-users role in Keycloak, organization owner or repository admin in GitHub, and IAM permissions such as AddUserToGroup or AttachUserPolicy in AWS. This duty map is what lets you test the rule.
- Name an owner for each rule. Usually the owner of the process or the system. They decide what happens when someone holds both sides.
- Set the exception process. Who may accept a conflict, for how long, and what check makes up for it. See the section on exceptions below.
- Record it in your policy. Your access control policy can point to the matrix, and the matrix keeps a date and an owner, so you can show which version applied during the audit period.
Where conflicts hide in Keycloak, GitHub and AWS
The matrix is only as good as the duty map in step 4. These three systems each have one setting or role that quietly gives a person both sides of a pair. Your engineers will know these screens; this is what to ask them about.
| System | What to look for |
|---|---|
| Keycloak | Keycloak is an identity provider: the system people sign in through. Each realm has a client called realm-management whose roles split admin work into parts, such as manage-users, manage-events and impersonation. The realm-admin role gives full access to the realm, so it holds manage-users and manage-events together: both sides of rule 2 in one role. The impersonation role lets its holder sign in as another user, so it can stand in for the second person in any rule: treat it as a duty of its own and list who holds it. And a person with realm-admin should not be the only one who reviews access to that realm (rule 5). |
| GitHub | Branch protection can require approving reviews before a merge, and can require that the most recent push is approved by someone other than the person who pushed it. By default, these rules do not apply to people with admin rights on the repository, unless you turn on the option to apply them to administrators too. The same goes for custom roles with the "bypass branch protections" permission. A repository admin can then merge their own change without the required reviews (rule 3). List who holds admin, and check that option. If you use rulesets instead of branch protection rules, check the bypass list of each ruleset: anyone on it is in the same position. |
| AWS | AWS CloudTrail records the API calls made in an account. The AWS managed policy AdministratorAccess allows every action, including CloudTrail's StopLogging, which stops a trail recording. Anyone with that policy holds both sides of rule 2. One common answer is an organization trail, created from the management account of your AWS organization: AWS says member accounts cannot remove or modify it. The people who can change that management account then become the ones to watch. |
The sources: Keycloak’s Server Administration Guide on realm-specific admin roles and impersonation; GitHub’s pages about protected branches and about rulesets; and AWS’s pages on the AdministratorAccess policy, the StopLogging action and organization trails. Admin roles like these are also what a privileged user access review looks at.
How to check people against the matrix
The matrix does nothing until you compare it with who holds what. The natural time is during your user access review, since you already have the list of accounts in front of you.
- Export who holds what, from every system in the matrix. One row per person, system and role or group, with the date of the export.
- Match each person across systems. Use the work email address where the export has it; otherwise keep a sheet that maps each person to their user name in each system. A conflict across two systems only shows up once the rows are joined.
- Tag each row with its duty. Use the duty map from step 4 of the build. A row with no duty is not part of any rule.
- Find anyone who holds both sides of a rule. In a spreadsheet, a pivot table with people down the side and duties across the top shows it at a glance.
- Send each conflict to the rule’s owner. They decide: remove one side, or accept it as an exception with a reason.
- Keep the result with the review. The list of conflicts found, the decision on each, who made it and when.
A conflict is often made of two pieces that each look fine. For example, an engineer holds admin on the main repository through one GitHub team and AdministratorAccess in AWS through another group. Neither row looks wrong on its own. Only the matrix, applied to the joined list, shows the pair. The free user access review template gives you a spreadsheet to start from: add a Duty column to it.
When you cannot separate duties: exceptions
In a team of a few engineers, someone will hold both sides of some pairs. That is normal. What you need to show is that you knew, decided, and added a check. Write each exception down: the person, the rule, the reason, who accepted it and an end date.
- Add a check after the fact. Another person looks at what the account did, for example the log of merges to the main branch or of changes to IAM, at a set interval. This is often called a compensating control.
- Keep it short-lived where you can. Give admin rights for a task and take them away after, rather than holding them all year.
- Review the exceptions at every access review. An exception with no end date becomes a permanent conflict nobody remembers accepting.
An example register, with made-up entries:
| Exception | Who | Reason | Accepted by | End date | Check that makes up for it |
|---|---|---|---|---|---|
| Rule 3: code changes | The only two engineers, both repository admins | Two people cannot always review each other on call | CTO | 31 March, then review | Each Monday, the CTO reads the list of merges with no approving review |
| Rule 2: granting and logging | The IT lead, who holds AdministratorAccess in AWS | Nobody else can administer AWS yet | Head of security | Until a second admin starts | The head of security reads changes to IAM and CloudTrail each month |
Without the record, a conflict looks the same as a mistake.
Common mistakes
Rules with no duty map. “Developers must not deploy their own changes” cannot be tested until someone writes which role or setting allows a deploy in each system.
Forgetting admin bypass. A rule enforced by a setting, such as required reviews, does not bind whoever can change the setting. Admins belong in the matrix too.
Where Acciew fits
The slow part of the check is collecting who holds what from every system, then getting each manager’s answer on record. Acciew does that for Keycloak, GitHub and AWS: it collects who has access, sends each manager an email link to give a yes or no, and builds an evidence pack that includes a spreadsheet of every access and decision, which you can tag with your duties yourself, as in step 3 above. It only reads, so any change stays with your administrators.
Have an access review coming up?
Acciew is in early access. We are looking for design partners: teams with a user access review ahead of them.
Apply as a design partnerQuestions and answers
What is a segregation of duties matrix?
It is a written list of the duties that one person should not hold together, such as approving access and granting it. It usually takes one of two shapes: a grid with the duties on both axes and the conflicting pairs marked, or a list of rules, one row per pair. Either way, it is the list you check accounts against.
What is an example of segregation of duties in IT?
A developer writes a change, and someone else approves it before it reaches production. Another common one: the people who administer access control do not also administer the audit logs that record what they did. NIST SP 800-53 control AC-5 gives that second pair as an example.
How do you handle segregation of duties in a small company?
With a few people, someone will hold both sides of some pairs. Write each case down as an exception, with a named approver and an end date, and add a check after the fact: another person looks at the log of what that account did. Review the exceptions at every access review.
Does SOC 2 require segregation of duties?
The SOC 2 trust services criteria do not list conflicting duties. Criterion CC6.3 says access is granted, changed and removed with least privilege and segregation of duties in mind, so an auditor may ask how you decided which duties conflict. A written matrix is the clearest answer.
How often should a segregation of duties matrix be updated?
No framework sets a date. Update it when a system, a role or a team changes, and look at it before each user access review, since that is when you use it. Keep the date of each change in the file.
This guide is part of User Access Review: How to Run One, Step by Step. Read the whole guide there.