Designing roles and scope
Sign-in decides who a user is. Roles decide what they can do, and scoping decides which devices, snippets and credential sets they can do it to. Most of the security value is in the second and third: an engineer who can sign in but sees only the devices their team runs is a much smaller risk than one who sees everything. This page explains how the model works and the role designs that hold up. Creating roles and assigning them is in the main docs: Roles and Permissions and Users.
How a permission check works
Every permission has an identifier made of an entity and an action, such as device.view, snippet.update or setting.update. The actions are View (see listings), Create, Read (see details), Update and Delete, and each controller action checks the one it needs before it runs.
When rConfig checks a permission for a user, it:
- Collects the permissions of every active role the user holds. Roles are additive: two roles give the union of both.
- Ignores inactive roles and inactive permissions entirely.
- Accepts the exact permission, or a wildcard that covers it:
*covers everything, anddevice.*covers every action on devices.
The result is cached per user and cleared whenever their roles change or a role they hold is saved, so the server applies a permission change from the next request. The main docs still advise users to sign out and back in, so the interface catches up with what the server now allows.
Who can grant what
Role and user management has its own guard rails, enforced on the server rather than only in the interface:
- Every role has a privilege level. The admin role is level 0, the user role level 1, and custom roles level 99. The level is set by rConfig and can’t be changed through the interface or the API.
- You can’t grant a role more privileged than your own, and you can’t build or edit a role that carries a permission you don’t hold yourself.
- You can only manage users ranked strictly below you, apart from your own account. Administrators can manage anyone.
- The last active administrator can’t be removed. A change that would leave no active level 0 user is refused.
Because every custom role shares level 99, a user whose roles are all custom can’t manage other users on custom roles: they are not ranked below. A delegated user administrator therefore needs the built-in user role (level 1) plus a custom role that adds user and role rights. They can then manage users on custom roles and grant custom roles or the user role, but can’t grant the admin role or manage anyone who holds the user role or above.
Scoping: which objects a role reaches
Permissions say what a user can do. Scoping says which objects they can do it to. Each kind of scoping has its own default, and the difference catches people out:
| Object | Scoped by | With no roles assigned | Admin |
|---|---|---|---|
| Devices | Roles on the device, or on any of its tags | Invisible to everyone but admins | Sees all |
| Snippets | Roles on the snippet | Invisible to everyone but admins | Sees all |
| Credential sets | Visible to Roles on the set (V8.2.2+) | Visible to everyone | Sees all |
Devices. A device is visible to a user when one of the user’s roles is assigned to the device itself, or to any tag the device carries. The two routes add together. Tag-scoped roles are the scalable one: tag every device in a site, customer or security zone, give the matching team a role scoped to that tag, and new devices join the scope as soon as they are tagged. Their backups and change history follow the device.
Snippets. Scoping snippets by role controls which configuration changes each team can push. A snippet with no role assigned is returned to no one but administrators.
Credential sets. Restricting a set to roles hides it from everyone else. This is visibility only: a device that already uses a restricted set still backs up and receives snippets for a user who can’t see the set. A set with no roles is visible to everyone, so restrict the sets that matter.
Entity-level scoping covers devices, snippets and credential sets. Everything else (policies, tasks, templates and so on) is controlled by the permission matrix alone.
Least-privilege patterns
Start from a role template (V8.4.2+) and remove what the role doesn’t need. Templates are deliberately broad on read access.
| Who | Start from | Then |
|---|---|---|
| Read-only NOC | Read-Only | Untick DeviceCredentials. Scope to the team’s tags if they watch one part of the estate. |
| Change engineers | Standard User, or Read-Only + Device Edit | Add snippet rights, and assign the team’s role to the snippets they may push. Keep user, role and setting rights off. |
| Auditors | Read-Only | Keep ActivityLog and UserLogActivity, untick DeviceCredentials, and pair with config obfuscation so secrets in configs are masked for them. |
| MSP customer users | Read-Only | One role per customer, scoped to that customer’s tag. Never assign a customer role to a shared tag. |
| AI Center users | AI Center User | Chat features and their own MCP tokens only. No provider or settings rights. |
| Delegated user admins | The built-in user role, plus a custom role with User and Role rights | The level rules above stop them granting admin. |
Keep the administrator role to a handful of people. accounts.admin_count warns when more than five accounts hold it.
Integrations and service accounts
An API or MCP token acts as the user who created it, further limited by the abilities chosen for the token. It can never do more than its owner, and a token with every ability can do everything its owner can.
So give each integration its own service account: a dedicated user with a narrow custom role, scoped to the devices the integration needs, owning tokens with only the abilities it uses and an expiry date. Then the token, the role and the activity log all tell the same story, and revoking the integration is one account. The API and MCP token checks flag tokens that never expire, sit unused, or carry every ability.
Uplink guideAPI tokens and least privilegeHow rConfig REST API tokens are scoped by abilities and by their owner's role, and how to give each integration only the access it needs.Read the guide
When the directory decides
With LDAP or SAML role mapping on, the directory or identity provider is the authority, and roles assigned by hand are overwritten at the next sign-in. Design roles first, then map groups to them: one directory group per role, named for the job. See choosing a sign-in method.