Sub topic 16
Roles, Permissions and Governance
This chapter covers who can do what in DevOps Center, and how to use those controls to govern releases. It assumes you can already create a project, connect environments, and move a work item through a pipeline. It also assumes you know basic Git concepts and Salesforce permission sets.
Why governance matters in a source-driven pipeline
A change set deployment depends on one person with the right org permissions. A DevOps Center release has more moving parts. A change touches a development environment, a Git repository, one or more pipeline stage orgs, and production. Each of these has its own access control. Governance means deciding who can touch each part, and making sure the controls agree with each other.
DevOps Center does not hold a separate permission layer that overrides the others. It works through three layers:
- Salesforce permissions decide who can open DevOps Center and act on projects.
- Org credentials decide what DevOps Center can do in each connected environment.
- Git provider permissions decide who can create branches, open pull requests, and merge into protected branches.
A gap in any one layer breaks the workflow, and a loose layer weakens governance. Most permission problems come from a mismatch between these layers.
Salesforce-side access
DevOps Center is installed in an org you designate as the DevOps Center org. It is typically production or a dedicated org, depending on your setup. Users in that org need access to the application and its objects.
Salesforce provides permission sets for DevOps Center. Check the current names in your org's Setup, because Salesforce has changed them between releases. In general, there are two levels:
- Administrative access. This is for the people who create projects, connect the repository, define pipelines, and manage environments.
- User access. This is for people who work on work items, such as developers and admins who build changes.
You assign these in Setup like any permission set. Assign the lowest level that lets a person do their job.
Project-level roles
Inside a project, you also add people as members. Being a member controls which projects a user sees and which work items they can act on. A user with the right permission set but no project membership sees nothing useful. When someone reports that DevOps Center is empty, check membership before checking permission sets.
Environment credentials
Each environment connects through an authenticated user. The pipeline acts with that user's rights, not the rights of the person who clicks the button. This has two consequences.
- The connected user needs enough permission in the target org to deploy metadata, including the ability to run tests when a stage requires them.
- Actions in the target org appear under the connected user in deployment history and audit records.
A common failure is to connect a stage using a personal account. When that person leaves or changes their password policy, deployments to that stage fail. Prefer a dedicated integration user for stage orgs, with a clear owner and a documented permission set.
| Connection | Recommended identity | Risk if you use a personal account |
|---|---|---|
| Development environment | The developer who owns the sandbox | Low, because the sandbox is theirs |
| Integration, UAT, staging | Shared integration user | Deployments fail when the person leaves |
| Production | Dedicated integration user with a reviewed permission set | Audit trails point to an individual, and access outlives the role |
Git provider access
The repository is the source of truth, so its controls are the strongest governance lever you have. DevOps Center creates work item branches and pull requests through the connection you configured. Configure the provider side deliberately:
- Protect the stage branches. Require pull requests for the branches that map to UAT and production, and block direct pushes.
- Require reviews. Set a minimum number of approving reviewers on the branch that feeds production.
- Use code owners. A
CODEOWNERSfile can force review from the right team when sensitive paths change, such as profiles, sharing rules, or integration settings. - Limit who can merge. Separate the people who author changes from the people who approve promotion.
# CODEOWNERS
/force-app/main/default/profiles/ @example-org/security-team
/force-app/main/default/permissionsets/ @example-org/security-team
/force-app/main/default/sharingRules/ @example-org/security-team
/force-app/main/default/flows/ @example-org/automation-leadsAdjust the paths to your project layout. They should match the path value in your sfdx-project.json.
{
"packageDirectories": [
{ "path": "force-app", "default": true }
],
"namespace": "",
"sfdcLoginUrl": "https://login.salesforce.com",
"sourceApiVersion": "62.0"
}Here the tracked source directory is force-app, so code owner paths begin with /force-app/.
Token scope
The connection to the Git provider uses credentials with a scope. Give it only the repository access the pipeline needs. If the credential is broader than necessary, any compromise of the DevOps Center connection exposes more than the one repository.
Separation of duties
Separation of duties means no single person can write, approve, and release the same change. DevOps Center gives you the pieces to enforce it:
- The author builds the change in a development environment and commits it to the work item branch.
- A reviewer approves the pull request in the Git provider.
- A release manager promotes work items to later stages and to production.
In a small team one person may hold more than one role. Even then, require a second approver on the branch that feeds production. The pipeline keeps a record of each step, so you can show who did what.
Governing what travels through the pipeline
Permissions control people. Content controls matter too, because the repository decides what can be deployed.
A .forceignore file keeps local tooling files and caches out of deployments, so only real metadata moves through the pipeline.
# .forceignore
**/jsconfig.json
**/.eslintrc.json
**/__tests__/**
.sfdx
.sfBe careful when adding metadata to this file. Ignoring a type removes it from deployments for everyone, which is a policy decision. Treat changes to .forceignore as reviewable, and consider adding it to CODEOWNERS.
Profiles and permission sets deserve special attention. They control access in production, and a work item that includes them can change who sees what. Reviewers should read these diffs closely. Prefer permission sets over profile edits, since permission set changes are smaller and easier to review.
Auditing and evidence
When someone asks who changed a field and when, you need evidence from more than one place:
- DevOps Center shows which work items were promoted and their status.
- The Git provider shows commits, pull request approvals, and merge history.
- The target org shows deployment history and setup audit trail entries under the connected user.
You can reconstruct the trail from Git alone. To see what a promotion would carry to the next stage, compare the stage branches.
git fetch origin
git log --oneline origin/main..origin/UATThe output lists commits that reached UAT but not yet the main branch. Run it before promotion approval so the approver knows exactly what is moving.
Common errors
- A user cannot see a project. They lack project membership, even though they have the permission set.
- Promotion fails with an authorization error. The connected user for the target stage lost access or has an expired authentication. Reconnect the environment with the integration user.
- A pull request merges without review. The branch has no protection rule. Fix it in the Git provider, because DevOps Center cannot enforce it.
- A developer can bypass the pipeline. Developers with direct deploy rights in production can still deploy outside the process. Restrict the "Deploy Change Sets" and related rights in production, and limit who can run direct deployments with the CLI.
- Production changes drift from the repository. Changes made directly in production, outside Git, are not tracked. Governance depends on closing this route.
Note the last two. DevOps Center governs changes that pass through it. It does not stop changes made by other routes, so org-level restrictions complete the picture.
A governance checklist
- Assign DevOps Center permission sets at the lowest level that fits each role.
- Add people to projects deliberately, and review membership regularly.
- Connect stage orgs with integration users, not personal accounts.
- Protect the stage branches and require reviews on the production branch.
- Add
CODEOWNERSentries for security-sensitive metadata. - Restrict direct production deployments.
- Review
.forceignoreand profile changes as policy changes.
Exercise
A developer reports that promotion to UAT fails with an authorization error, although the same developer promoted work items last week. Which layer do you check first, and why?
Show answer
Check the org authentication for the UAT environment. The pipeline deploys with the connected user's credentials, not the developer's. If that user's password changed, the session expired, or the account lost permissions, the promotion fails even though the developer's own access is unchanged. Reconnect the environment, ideally with a dedicated integration user.
Exercise
Your team requires that no one can release their own change to production. Name two controls, one in the Git provider and one in Salesforce, that support this.
Show answer
In the Git provider, protect the production branch and require at least one approving review from someone other than the author, optionally using CODEOWNERS for sensitive paths. In Salesforce, assign the administrative permission set only to release managers and restrict direct deployment rights in production, so authors cannot bypass the pipeline.