Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

Configuring a Non-Privileged Account

To use a low-privileged accounts for ServiceControl instances, the following should be considered:

Access control on queues

The transport connection string used by ServiceControl must enable access to all of the ServiceControl queues as configured by the InstanceName setting:

The queues that ServiceControl needs to access will reflect the InstanceName used and the instance type:

All instance types:

  • {InstanceName}
  • {InstanceName}.errors
  • {InstanceName}.timeouts (only when using MSMQ)
  • {InstanceName}.timeoutsdispatcher (only when using MSMQ)

Error instances:

Audit instances:

If the connection string does not provide appropriate rights, the service will fail to start.

Url namespace reservations

When deploying using the ServiceControl Management Utility (SCMU) or PowerShell, the account under which the ServiceControl instance is running requires URL namespace reservations for the hostname and ports used by the instance. Even when deploying using SCMU The reservations can be managed using the ServiceControl Powershell commands or from the command line using netsh.exe. For example, to add url reservation for http:\\localhost:33333\ to LocalService account the following command can be used netsh http add urlacl url=http://localhost:33333/ user=LocalService listen=yes delegate=no.

For instructions on how to review and change the urls used by ServiceControl instance, refer to Changing the ServiceControl URI.

Filesystem paths

The service account running ServiceControl instance requires following filesystem level access rights:

PathRights
Executables (e.g. C:\Program Files (x86)\Particular Software\Particular.ServiceControl)Read
Logs (e.g. C:\ProgramData\Particular\ServiceControl\Particular.ServiceControl\Logs)Write
Database (e.g C:\ProgramData\Particular\ServiceControl\Particular.ServiceControl\DB)Write
Database volume (e.g. C:)Read Attributes

Performance counters

ServiceControl requires access to Windows performance counter infrastructure. As a result the service account needs to be a member of Performance Monitor Users group.

Testing the configuration

These methods confirm that the service account has sufficient rights:

  • Configure the ServiceControl Windows service to run under the custom service account, start it and check the log files.
  • Interactively run ServiceControl under the custom service account.

Method 1: Running the service as a non-privileged user

  1. Open Computer Management.
  2. Change the service account to the custom user, provide the password and apply the change. The account will be given "logon as a service" privilege.
  3. Start the service and confirm that it started.
  4. Examine the log file to ensure that the service is operating as expected. If the service does not start and the log file does not indicate the issue, try Method 2.

Method 2: Running the service interactively as a non-privileged user

To run the service this way, the custom service account must have rights to log on interactively on the computer.

  1. Log on to the computer with admin privileges.
  2. Switch to the appropriate domain and username.
  3. Issue the following command, entering the password when prompted:

For example

runas /user:MyDomain\MyTestUser cmd.exe

If the command returns the error below, then the user account cannot be tested this way without adjusting the login rights. Normally this only occurs if the computer is configured as a domain controller or the system administrator has restricted login access using group policies.

1385: Logon failure: the user has not been granted the requested logon type at this computer.

Once login rights are granted:

  1. Ensure that the service is stopped.
  2. From the command prompt running as the service account, change to the ServiceControl installation directory and run ServiceControl.exe with the --serviceName parameter. In the following example, the default name has been used. Check ServiceControl Management if unsure of the service name
  3. Examine the output and confirm that there are no critical errors.
  4. Shut down the console session.
  5. Start the service.
ServiceControl.exe --serviceName=Particular.ServiceControl