Skip to content

Role Based Access Control

Role Based Access Control (RBAC) decides who may manage a Replicator Service and what each person may do. With it on, everyone who connects with the Data Replicator Manager, the SQDR PowerShell cmdlets or any other client must sign in, and each request is allowed or refused by the user's groups and their roles. For example, operators can run and stop replications without changing them, and others can have read-only access.

When to use it

  • Several people manage the service and should have different rights.
  • You need to know who changed what: with RBAC on, the audit journal records the user of each action.

RBAC is off by default. Without it, anyone who can reach the service's port can manage it. You can still limit where connections come from: allow the service's ports (7737, and 7738 for PowerShell) only from the computers that need them in your firewall, or make the service listen on selected network addresses only (the grpcADDRPORT and grpcTransADDRPORT service properties).

How it works

  • Users sign in with a user name and password. The Data Replicator Manager sends them with every request, from the User and Password saved for the service in Connect To Service.
  • Roles have a Role Level, a number: the higher, the more authority.
  • Groups give their members one role. A user can belong to several groups and gets the highest role level among them. A user in no group can't do anything.
  • Methods: every operation of the service (each request a client can make) requires a minimum role level. A request is allowed when one of the user's groups has a role at or above that level, and refused with "Permission denied" otherwise. Method levels are set in the SQDR Configuration Tool; see Default roles.
  • Key seed: a separate secret, set in the SQDR Configuration Tool, that lets you manage users, roles, groups and members without signing in as a user with those rights. It's the way back in if no user can.

Users, roles, groups, members and method levels are stored in the control database.

Default roles

These roles are created with the control database. You can change them or add your own.

Role Level Can, by default
super 99 Everything, including tasks available only in the SQDR Configuration Tool.
admins 90 Everything in the Data Replicator Manager, including the audit journal, the service logs, the Query tab, support bundles and license keys.
power 50 Change the configuration: create, change and delete sources, destinations, subscriptions, groups, schedules, macros and secrets; pause and resume incremental groups; change service settings; manage users, roles, groups and members.
ops 20 Operate: run and stop replications, poll sources and destinations, test connections, send test emails.
public 10 Read only: view properties, statistics and status.

Each group's When To Log and each role's Logged Default decide which of their members' actions go to the audit journal: Never, Failure (refused or failed requests), Success or Always.

Turn on access control

Turn RBAC on in the SQDR Configuration Tool, on its RBAC Service Properties page, on the Windows computer where the Replicator Service is installed (for the container, from a Windows computer that can reach its control database). The same page sets the key seed and whether the audit journal is kept. The tool restarts the service.

Before you turn it on

  • Create an administrator first: at least one user, member of a group with the admins role (or higher), and note the password. Otherwise, no one can do anything until you sign in with the key seed.
  • Change the key seed. The initial key seed is *DEFAULT. Anyone who knows it can manage users, so set your own in the SQDR Configuration Tool and keep it safe.
  • Update every client. Scheduled PowerShell scripts and other tools must supply a user and password, or they stop working.

After RBAC is on, add your user name and password to the service's connection in the Data Replicator Manager: remove the service from the server list and add it again with Connect To Service.

If you're locked out (no user has enough rights and the key seed is lost), use the SQDR Configuration Tool, which connects to the control database with the database's own credentials, to turn RBAC off or set a new key seed.

Don't use the Advanced tab

The Advanced tab of Properties lists rbacEnabled and rbacKeySeed. Don't change them there: turn access control on and off, and change the key seed, in the SQDR Configuration Tool.

The Role Based Access Control tab

If your role can't manage users (below power by default), you're asked for the key seed.

Users

A User Name isn't case-sensitive and can't be changed later. Deleting a user removes them from their groups. Reset Password clears the user's password: tell the user to sign in and set a new one. Users change their own password on the Service tab of Properties.

Roles

A Role Name can't be changed later. Changing a role's level changes what its groups' members can do. Which operations each level allows is set in the SQDR Configuration Tool.

Groups and members

A Group Name can't be changed later. Deleting a group takes away the rights it gave its members.