Sub topic 15
Segregation of duties and access governance
This chapter assumes you can read a PFCG role, know that a business role bundles business catalogs and restrictions, and have assigned roles to business users. It covers the last step: checking that the roles you build and assign do not give one person too much power. It also covers how to keep that true over time.
What segregation of duties means
Segregation of duties (SoD) is the rule that no single person should be able to complete a sensitive business process alone. The usual examples come from procure-to-pay and order-to-cash:
- Creating a vendor and releasing a payment to that vendor.
- Creating a purchase order and approving it.
- Entering a supplier invoice and posting the outgoing payment.
- Maintaining customer credit limits and releasing blocked sales orders.
Each of these pairs is harmless when two people hold the halves. It is a fraud or error risk when one person holds both. An auditor does not ask whether anyone did something wrong. The question is whether the system would have stopped them.
SoD is a property of the combination of everything a user can do. A role can be correct on its own, and the user can still be in conflict because of a second role assigned later.
Where conflicts come from
In the chain you have built through this tutorial (user, business role, catalogs, apps, authorization objects), a conflict can enter at several points.
| Source | Example | Who usually causes it |
|---|---|---|
| Inside one business role | A role bundles a vendor maintenance catalog and a payment release catalog | Role designer |
| Across two roles on one user | Accounts payable clerk role plus a payment approver role | Whoever assigns roles |
| Inside an authorization | An object grants activity 01 (create) and 02 (change) where only 03 (display) was intended | Authorization administrator |
| Through technical access | S_TCODE, debug with change (S_DEVELOP with activity 02), or a copy of SAP_ALL | Basis or support staff |
| Through wide restrictions | An organizational value set to `*` where one company code was meant | Role maintainer |
The second row is the most common in practice. Role designers check their own role, and nobody checks the sum. That is why SoD analysis has to run on assignments as well as on role definitions.
How an SoD check works
An SoD ruleset does not look at role names. It describes business functions and the technical permissions that implement them. A typical ruleset has three layers:
- Functions: a business activity such as "Maintain vendor master" or "Release payment".
- Permissions: the authorization objects, fields, and values (for example an object with activity 01 or 02) that make up a function.
- Risks: pairs or groups of functions that must not be held together, each with a risk level.
The analysis then follows the same path the system follows at runtime. It expands the user's roles into their authorization values, matches those values to functions, and reports any risk where the user holds all the functions. Because it works on authorization values, it also catches conflicts created by a restriction that is too wide, and it ignores a function whose values are restricted to different organizational units than the other half.
The following diagram shows the flow.
A small model of the check
The script below is not a replacement for a real ruleset. It shows the logic so you can reason about results from a real tool. It expands each user's roles into functions, tests every conflict pair, and reports which role supplies each half.
role_functions = {
"BR_AP_ACCOUNTANT": {"CREATE_INVOICE", "MAINTAIN_VENDOR"},
"BR_AP_PAYMENTS": {"RELEASE_PAYMENT"},
"BR_BUYER": {"CREATE_PO"},
}
user_roles = {
"anna": ["BR_AP_ACCOUNTANT", "BR_AP_PAYMENTS"],
"ben": ["BR_BUYER", "BR_AP_PAYMENTS"],
"carla": ["BR_AP_ACCOUNTANT"],
}
conflicts = [
("MAINTAIN_VENDOR", "RELEASE_PAYMENT", "Vendor master vs payment release"),
("CREATE_INVOICE", "MAINTAIN_VENDOR", "Invoice entry vs vendor master"),
]
def roles_with(user, function):
return sorted(r for r in user_roles[user] if function in role_functions[r])
for user in user_roles:
found = False
for first, second, name in conflicts:
sources_first = roles_with(user, first)
sources_second = roles_with(user, second)
if sources_first and sources_second:
found = True
print(
f"{user}: {name} - {first} via {', '.join(sources_first)}, "
f"{second} via {', '.join(sources_second)}"
)
if not found:
print(f"{user}: no conflicts")Running it prints:
anna: Vendor master vs payment release - MAINTAIN_VENDOR via BR_AP_ACCOUNTANT, RELEASE_PAYMENT via BR_AP_PAYMENTS
anna: Invoice entry vs vendor master - CREATE_INVOICE via BR_AP_ACCOUNTANT, MAINTAIN_VENDOR via BR_AP_ACCOUNTANT
ben: no conflicts
carla: Invoice entry vs vendor master - CREATE_INVOICE via BR_AP_ACCOUNTANT, MAINTAIN_VENDOR via BR_AP_ACCOUNTANTRead the output the way an administrator would. Carla's conflict is inside one role, so the fix is in the role design: split BR_AP_ACCOUNTANT. Anna has the same internal conflict plus a cross-role conflict, so fixing the role design removes one finding, and the second still needs an assignment decision.
Tools for SoD analysis
Which tool you use depends on the product and edition. These are the common options:
- SAP Access Control (on premise and private cloud) and SAP Cloud Identity Access Governance hold the ruleset, run risk analysis for users and roles, and manage access request workflows, mitigating controls, and emergency access.
- Standard reports in the User Information System (transaction SUIM) answer narrower questions without a ruleset. You can list users who hold a given authorization object value, compare roles, and list change documents for users and roles.
- PFCG and SU24 analysis tell you what a single role grants. This is the starting point when a SoD tool reports a conflict and you need to find which authorization value caused it.
Check the documentation for your edition to see which of these apply. The principle is the same everywhere: the check must see authorization values, not role names.
Handling a conflict
When analysis reports a conflict, the role owner or process owner decides among three options. Record the decision, not just the outcome.
- Remove it. Take the conflicting role from the user, or split the role so each half is in a different business role. This is the preferred outcome.
- Narrow it. Use restrictions so the two functions apply to different organizational values. A user who maintains vendors for company code 1000 and releases payments for company code 2000 may not be a conflict, depending on the rule. This needs a ruleset that evaluates organizational levels.
- Mitigate it. Accept the risk with a compensating control, such as a second-person review of all payments to recently changed vendors. The control needs an owner, a frequency, and evidence that it ran. A mitigation with no one performing the control is a finding in the next audit.
Governance beyond the first assignment
SoD analysis done once, at go-live, loses value quickly. Roles drift, apps are added to catalogs, and people change jobs. Governance is the set of recurring practices that keeps the result true.
Check at assignment time
Run the risk analysis before the role reaches the user. In a request workflow, the approver should see the conflicts the new role would create in combination with the user's existing roles. Checking afterward finds the problem only after the access exists.
Check at role change time
A change to a catalog, such as adding an app, changes the access of every user holding every role that includes it. Treat a catalog change like a role change. Re-run the analysis for the roles that use the catalog. When you adopt a new SAP release or role template version, compare the delivered changes before you apply them to a copy.
Review access periodically
Access recertification means that line managers or role owners confirm, at a set interval, that each user still needs each role. It catches leavers and movers. Common choices are quarterly for roles carrying high risks and yearly for the rest.
Control privileged and emergency access
Some users need powerful access for a short time, for example to fix a production incident. Give this through a controlled emergency access ("firefighter") mechanism, not through a permanent role. The mechanism should log what was done and require a reviewer to sign off on the log. Do not assign SAP_ALL or unrestricted debug-with-change to named users, even in test systems that hold copied production data.
Keep the evidence
Auditors ask for proof. Keep the ruleset version, analysis results, approvals, mitigation owners, and recertification results. Change documents for users and roles show who changed what and when, and they are available in the User Information System.
Common mistakes
- Checking roles but not users, so cross-role conflicts go unseen.
- Using a ruleset that was never adapted to your custom apps, so custom authorization objects do not map to any function and conflicts through them are never reported.
- Treating "mitigated" as "fixed" and never reviewing the control.
- Giving the same person the right to build roles and the right to assign them, which defeats the whole design. Separate the role designer, the approver, and the person who assigns.
- Assuming a restriction on one object restricts the whole role. Each authorization object carries its own values.
Connecting it back
SoD is where the earlier chapters meet. The authorization objects and activities define what a function is. PFCG, SU24 defaults, and catalogs define which apps carry those values. Business roles and assignments decide who ends up with them. Restrictions limit the organizational scope. Custom role lifecycle practices decide whether the design stays clean after the first release. If you can trace a conflict through all of these, you can fix it at the right layer.
Exercise
A user holds two business roles. Neither role has a SoD conflict when analyzed alone. Risk analysis on the user reports a conflict between maintaining vendors and releasing payments. Name two ways to resolve it and one thing you must do if you choose to keep both roles.
Show answer
Resolve it by removing one of the roles from the user, or by restructuring the roles so the functions are no longer both reachable, for example moving payment release to a role held by a different person. Narrowing with restrictions also works if the two functions then apply to different organizational values and the ruleset evaluates them. If you keep both roles, add a mitigating control with a named owner, a frequency, and evidence that it runs, and get the risk owner's approval.
Exercise
Why should the SoD analysis run again when you add an app to a business catalog, even if you assigned no new role to any user?
Show answer
Every business role that includes the catalog now carries the authorization values of the new app, so every user holding such a role gains that access. This can create conflicts with other functions those users already have. The analysis must be repeated for the affected roles and their users.
Exercise
In the Python model, Carla has a conflict but holds only one role. At which layer do you fix it, and how?
Show answer
Fix it in the role design. BRAPACCOUNTANT supplies both CREATEINVOICE and MAINTAINVENDOR, so splitting it into two business roles, one per function, makes the conflict depend on assignment. You can then avoid assigning both to the same person.