How to Set Up Role-Based Access on an Enterprise Headless CMS
The breach postmortem almost always reads the same way: a contractor who left eight months ago still had publish rights, or a junior editor pushed an unreviewed price change live to every market because the CMS had exactly two permission…
The breach postmortem almost always reads the same way: a contractor who left eight months ago still had publish rights, or a junior editor pushed an unreviewed price change live to every market because the CMS had exactly two permission levels, "admin" and "everyone else." On an enterprise content platform serving dozens of brands and hundreds of contributors, coarse access control is not an inconvenience. It is the root cause that auditors circle in red.
Role-based access control (RBAC) is how you make the principle of least privilege real: every person, service, and increasingly every AI agent gets the narrowest set of permissions their job requires, and nothing more. Done right, it is invisible. Done wrong, it is either a security hole or a productivity tax that drives editors into shadow workflows. Sanity, the Content Operating System for the enterprise, treats governance as a first-class concern rather than a plugin, with Roles & Permissions, SSO, and Audit logs designed to satisfy the same controls your SOC 2 Type II auditor checks.
This guide walks through how to design, implement, and operate RBAC on a modern headless CMS, and how that compares with the access models bolted onto legacy DXPs.
Start with a permissions model, not a permissions list
The most common RBAC failure is treating it as a checklist of toggles instead of a model. Teams enumerate every individual and grant access one person at a time, which produces an unmaintainable sprawl: 400 users, 400 bespoke permission sets, and no human who can answer the auditor's question "who can publish to the German storefront?"
The discipline that fixes this is the same one you apply to your content: model the business first. Identify the distinct jobs people actually do (author, reviewer, publisher, translator, administrator, read-only analyst) and the boundaries those jobs operate within (brand, market, content type, environment). A role is the intersection of a capability set and a scope. "Editor, EMEA marketing" is a role; "Sarah" is not.
In Sanity, this maps directly onto Roles & Permissions, where you define roles once and assign people to them, and Studio Workspaces, which let a single Studio present different brands and markets as separate, governed surfaces. Because content in the Content Lake is structured and queryable, permissions can be reasoned about against the actual shape of your content estate rather than against an opaque page tree. The goal is a model small enough to fit on a whiteboard: if you cannot draw your role matrix, your editors cannot follow it, and your auditor cannot certify it. Start there, then translate the model into the platform, not the other way around.
Map roles to least privilege across brands and markets
Least privilege sounds simple until you hit a multi-brand, multi-market enterprise, where the same person may be a publisher for one brand and a read-only reviewer for another. A flat global role list cannot express that. You need scoping: a capability granted within a boundary.
Consider a retailer running twelve country sites off one platform. The Spanish merchandising lead should edit and publish Spanish product content, suggest changes to the shared global catalog, and see but never touch the French campaign calendar. Modeled badly, you end up granting platform-wide publish rights "just to unblock her," which is exactly the over-provisioning that turns into an audit finding.
This is where dataset boundaries and workspace scoping earn their keep. Sanity's Multi-dataset architecture and dataset aliases let you separate content estates (by brand, market, or environment) so that a role granted in one does not leak into another. Studio Workspaces then surface only the datasets and document types a given role is entitled to, so the Spanish lead literally does not see what she cannot govern. Combined with SSO, identities and their group memberships flow from your central directory, so a change in HR (a transfer, a departure) propagates into content access without a manual ticket. Least privilege only holds if it is enforced by the system rather than remembered by an administrator, and the boundary has to be structural, not a polite convention editors are trusted to respect.
Separate authoring, review, and publish with workflow gates
RBAC controls who can act; workflow controls when. Conflating them is a classic governance gap. A role might say "this person can publish," but the control your compliance team actually wants is "nothing reaches production without a second person's approval." That is separation of duties, and it is a named requirement in most enterprise control frameworks.
The failure mode without it is the unreviewed change: a single editor with publish rights ships a legal disclaimer edit, a price, or a regulated claim straight to live, and the first anyone hears of it is from a customer or a regulator. Even well-intentioned teams do this under deadline pressure when the platform makes the safe path slower than the unsafe one.
The fix is to make staged, reviewable change the default. Content Releases let teams stage a batch of related edits and ship them as a single reviewed unit, the editorial equivalent of a git branch and pull request, so a campaign or a coordinated price update lands atomically rather than as a trickle of unsupervised saves. Roles determine who can author into a release versus who can approve and ship it, which encodes separation of duties in the platform rather than in a wiki page nobody reads. Functions can enforce programmatic gates on top, for example blocking publish until a compliance check or required translation is present. The result is that the governed path becomes the convenient path, which is the only version of governance that survives contact with a busy editorial team under a launch deadline.
Govern AI agents and service accounts as first-class identities
Most RBAC models were designed for humans, then quietly extended to API tokens and CI pipelines, and now to AI agents that draft, translate, and enrich content. Treating these non-human identities as an afterthought is how a single over-scoped automation token becomes the widest hole in an otherwise tight system.
An AI enrichment agent that summarizes products does not need publish rights, write access to the legal dataset, or the ability to delete. It needs a tightly scoped role: read the catalog, write draft suggestions into a specific document type, and nothing else. The same applies to a translation service or a migration script. The EU AI Act and internal AI governance policies increasingly require that AI-generated or AI-modified content be attributable and reviewable, which means the agent's actions must be logged and gated exactly like a person's.
Sanity handles automated and AI workflows through Functions and the App SDK, and the same Roles & Permissions model that scopes a human applies to a token or an integration. Because every write passes through the Content Lake and is captured in Audit logs, an AI agent's edits are attributable, reviewable, and reversible. Pair that with Content Releases and a human approval gate, and AI-authored changes never reach production without a person in the loop. The governance principle is simple and unforgiving: if it can write to your content, it gets a role, a scope, and an audit trail, whether it is a person, a pipeline, or a model.
Prove it with audit logs, SSO, and a documented control
An RBAC design that cannot be evidenced is, from an auditor's perspective, an RBAC design that does not exist. The control is not "we have roles." The control is "we can show, for any point in time, who had which access, what they did with it, and who approved the access grant." Enterprises fail audits not because their permissions were wrong but because they could not produce the record.
Three primitives carry this weight. SSO centralizes identity in your existing directory (Okta, Entra ID, or similar), so access provisioning and de-provisioning follow the joiner-mover-leaver process you already operate, instead of a separate, forgotten user list inside the CMS. Roles & Permissions document the intent: the standing answer to "who can do what, where." Audit logs supply the forensic record: who changed what content, and when, which is the evidence an investigation or a SOC 2 Type II review actually consumes.
Sanity is independently audited to SOC 2 Type II, supports GDPR and regional data residency, and publishes its sub-processor list, so the platform sits inside your compliance perimeter rather than poking a hole in it. The operational practice that ties it together is a quarterly access review: export current roles and assignments, walk them against current headcount and responsibilities, revoke what no longer applies, and keep the signed record. RBAC is not a one-time setup. It is a control you run, and the running of it is what you put in front of the auditor.
Role-based access and governance: Sanity vs legacy DXPs
| Feature | Sanity | Adobe Experience Manager | Sitecore (XM/XP) | OpenText TeamSite |
|---|---|---|---|---|
| Role and scope model | Roles & Permissions with workspace and dataset scoping; roles defined once, assigned to SSO groups across brands and markets. | Deep, granular ACLs via user/group permissions on the JCR node tree; powerful but complex to model and maintain at scale. | Role-based security with item-level rights; capable but historically tied to the .NET/Sitecore identity model and admin overhead. | Mature workflow and rights model built for regulated content, though configuration tends to be heavyweight and specialist-led. |
| Separation of duties | Content Releases stage batches as reviewed units; roles split authoring from approval, encoding separation of duties in the platform. | Workflow engine supports multi-step approvals; robust but requires configuration and often developer involvement to tune. | Workbox and workflow states support review gates; flexible but setup is non-trivial and version-dependent. | Strong, audit-oriented approval workflows are a core strength for compliance-heavy publishing. |
| Multi-brand / multi-market scoping | Studio Workspaces plus Multi-dataset and dataset aliases isolate brands and markets so a role in one does not leak into another. | Multi-site via site hierarchies and Sites; capable but operationally heavy across many independent brands. | Multi-site and multi-tenant supported; managing distinct security boundaries across markets adds administrative load. | Supports multi-property publishing, typically with significant implementation and governance configuration. |
| Identity and SSO | SSO with SAML/OIDC; provisioning and de-provisioning follow your central directory's joiner-mover-leaver process. | Enterprise SSO and IMS integration available, commonly as part of the broader Adobe identity stack. | SSO and federated identity supported through standard providers and Sitecore identity server. | Integrates with enterprise directories and SSO, consistent with its regulated-enterprise heritage. |
| Governing AI agents and tokens | Functions and App SDK run automations under scoped roles; AI and token writes are attributable in Audit logs and gated by releases. | AI features via Adobe Sensei/GenAI; agent and token governance handled through existing permissions rather than a unified AI-write model. | AI capabilities are being added; governance of AI-generated writes depends on surrounding workflow configuration. | AI tooling is limited; automation governance leans on traditional workflow and rights controls. |
| Audit and compliance evidence | Audit logs plus SOC 2 Type II, GDPR, and regional data residency, with a published sub-processor list for your compliance perimeter. | Extensive audit and compliance tooling, backed by Adobe's enterprise certifications and security program. | Audit trails and enterprise compliance support available across editions, with self-hosted options for data control. | Built for regulated, audit-heavy environments; strong records and retention controls are a core selling point. |
| Operational ownership | Content Lake is multi-tenant and multi-region; you govern access without operating the underlying database or patching servers. | Powerful but you (or an SI) operate or co-manage the stack; AEM as a Cloud Service reduces but does not remove ops weight. | XM Cloud reduces ops; XM/XP self-hosted editions still carry meaningful infrastructure and upgrade responsibility. | Typically self-hosted or partner-hosted, placing infrastructure and patching responsibility on your team. |