Separation of Duty

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up separation of duty by splitting high-risk tasks across two or more people. No single user can write code, approve changes, and run commands alone. Most teams start by creating separate identity roles for builders, reviewers, and operators. When teams share broad admin roles instead, one bad key or mistake can break production. How separation of duty works in native role systems In a standard cloud or database setup, admins group permissions into distinct job roles. One role allows

DPoP (Demonstration of Proof-of-Possession): the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up separation of duty by splitting high-risk tasks across two or more people. No single user can write code, approve changes, and run commands alone. Most teams start by creating separate identity roles for builders, reviewers, and operators. When teams share broad admin roles instead, one bad key or mistake can break production.

How separation of duty works in native role systems

In a standard cloud or database setup, admins group permissions into distinct job roles. One role allows a developer to write code and submit a change request. A second role allows a peer or lead to review and approve that request. A third role lets an automated tool or operator run the change in production.

Identity providers and database engines enforce these splits at login time. When a user logs in, the system checks which role maps to their account. If a developer tries to approve their own merge request, the platform blocks the action. This rule stops one person from pushing untested code or hiding a bad change.

Teams also apply this pattern to database management and secret storage. A security admin sets up the rules for who can read or write tables. Meanwhile, a system admin manages disk space, backups, and server patches. Neither admin holds the full set of keys to both manage rules and read data.

Where static role splits fall short during live work

Native role splits work well for planned releases and basic login checks. They decide who can log in to a server or database at the start. Still, static roles do not inspect what individual commands or queries do during a session. Once an approved user opens a database session, that role stays active until logout.

During a live outage, an engineer often needs temporary write permissions to fix broken data. If you grant a broad write role, that person can run any update or delete command. Native roles cannot ask a second person to approve just one specific SQL statement. The engineer gets full write rights across every row in that table.

Static roles also struggle to protect sensitive fields during normal read tasks. Support engineers often need to query production tables to fix user bugs. A basic read role returns raw emails, phone numbers, card numbers, and national IDs. Without data masking to rewrite matched fields in results, read roles expose private user data.

DPoP (Demonstration of Proof-of-Possession): architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to enforce task splits down to individual actions

To close this gap, teams move from account-level splits to action-level checks. Instead of granting a standing admin role, teams require peer approval for each sensitive action. One engineer submits the exact script or query they need to run for the fix. A second person on the team reviews that specific command before it can run.

Teams also separate the duty of debugging an app from reading raw customer data. When an engineer runs a select query, masking rules rewrite matched fields in the results. The engineer still sees the row structure and status codes needed to fix the bug. Emails and card numbers are replaced before the results reach the screen.

Finally, teams keep audit duty separate from daily engineering work. Every command, query, and approval decision goes into an external log store. The engineers who run commands cannot edit or delete those audit logs. Security reviewers can check the exact history of who requested and approved every live action.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

What is the main goal of separation of duty?

The main goal is to stop one person from having total control over a critical task. Requiring two people to complete a task reduces fraud, human error, and abuse of keys.

How do small teams split duties with few people?

Small teams use automated checks and peer approvals for high-risk commands instead of full-time roles. Any peer on the team can review and approve a live production query before it runs.

Does role-based access control provide full duty separation?

Role-based systems only control who can log in and which broad role they receive. You still need command approvals and data masking to control what happens inside a live session.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.