How to Configure Separation of Duty Policy

Published
Length
3 min read

Luis Felipe Dias

All posts

A separation of duty policy stops one person from doing a whole critical task alone. You set it up by splitting write, review, and run rights across distinct roles. This rule protects your production systems from both honest mistakes and bad actors. One engineer writes a change, and another person approves or runs that change. No single account holds the keys to build, approve, and deploy code alone. Teams use this pattern for database changes, cloud roles, and billing updates. How a separati

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

A separation of duty policy stops one person from doing a whole critical task alone. You set it up by splitting write, review, and run rights across distinct roles.

This rule protects your production systems from both honest mistakes and bad actors. One engineer writes a change, and another person approves or runs that change. No single account holds the keys to build, approve, and deploy code alone. Teams use this pattern for database changes, cloud roles, and billing updates.

How a separation of duty policy works in practice

A separation of duty policy splits high-risk workflows into two or more steps. Each step requires a different user role or group to finish the work. This setup affects human engineers, admin accounts, and automated build workloads alike.

Start by listing the tasks that can harm your data or systems. Common examples include dropping database tables, changing network rules, and editing user roles. Next, map each task to at least two distinct job roles in your directory.

The first role gets permission to ask for a change or write a script. The second role gets permission to review and approve that specific request. A third role, or an automated tool, then runs the approved change in production.

Safe defaults make this setup work without blocking down daily engineering tasks. Set every new role to read-only rights by default across all production systems. Grant write rights only to small, specific groups with clear job needs. Block any user from holding both the builder role and the approver role.

Static role limits vs live session risks

You can enforce role splits before a user logs in or during a session. Static rules in your identity tool block users from joining two conflicting groups. This step stops a developer from also holding a production admin role at rest.

Still, static group rules cannot see what happens after a user logs in. Once an approved session starts, a broad database role can run any query. An admin who logs in to fix one row can still read all tables. Static roles also leave shared service accounts open to misuse during active work.

DPoP (Demonstration of Proof-of-Possession) + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Dynamic checks fix this gap by watching the actual commands inside a live session. Instead of checking group names once, the system checks each action before it runs. A user can log in, yet dangerous queries still wait for a second person.

When live data returns, data masking rewrites matched fields like emails and card numbers. It also rewrites phone numbers and national IDs in query results right away. This step keeps sensitive records safe even when an engineer has valid session rights.

Checking and auditing your setup

Regular checks prove that your role splits work as intended over time. Start by reviewing your identity directory for users who hold too many groups. Remove old permissions when people change teams or finish a short project.

Next, check your audit logs to see who requested and approved each production action. Good logs show the user identity, the approver name, and the exact command run. If your logs only show a shared admin account name, you have a gap.

Test your setup by trying to approve your own change in a test system. The system must block the action and log the failed attempt right away. Run these tests after every major update to your identity groups or cloud roles.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.

Before a query runs, hoop.dev guardrails check the statement against your rules, an AI Analyzer you configure can score intent or hold risky calls for human approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What is the main goal of a separation of duty policy?

The main goal is to stop one person from making unchecked changes alone. Requiring two people for big tasks lowers the risk of fraud and big errors.

How do small teams set up role splits with few staff?

Small teams keep day-to-day roles read-only and require peer review for write commands. Even a two-person team can require the second person to approve production database changes.

Why do static cloud roles fail to stop all insider risks?

Static roles only check permissions when a user logs in to a system. Once inside, the user can run any command allowed by that broad role.

The query runs. The emails stay hidden.