The code had passed unit tests. It had cleared code review. But in the real flow — services talking to each other, permissions passing between systems — the flaw was obvious. And dangerous.
Integration testing and separation of duties should never be treated as separate concerns. When critical business logic crosses system boundaries, a missing validation in one service can grant unwanted powers in another. Detecting that requires tests that do not stop at a single module’s edge.
Separation of duties is about more than security policy documents. It is enforced in the code. Permissions, roles, and function boundaries must be validated not just in isolation but in the context of live interactions between components. Integration testing is where policy becomes proof.
An effective approach starts with mapping every sensitive action to the identities and systems allowed to perform it. The next step is building integration tests that execute real workflows end-to-end, verifying that no operation can escape its assigned role. Fake data won’t reveal this. Only full-path testing — with realistic states and authentication — will expose improper access paths.