User Synchronization

When the SedonaUserManager service (SedonaUserManagementService) ia added to the station, it creates and registers a Sedona Users device extension (SedonaUsersExt) under each Sedona device in all Sedona networks.

Figure C.2. Sedona Users device extension handles user synchronization from station to device’s app


Sedona Users device extension handles user synchronization from station to device’s app

Internally, the extension stores the current mapping of users and roles for the device, and it also manages synchronizing those mappings out to the Sedona app in the device.

The extension’s Sync Task (UserSyncTask) component performs the synchronization work. It keeps track of when synchronization is necessary, performs the work to synchronize with the Sedona device.

Typically you do not need to access this component; however it may become useful for debugging purposes. If necessary, you can force a device to synchronize its users via a right-click Execute action, which results in an immediate synchronization attempt.

User synchronization details

There are three conditions that cause user synchronization for a device to be executed. When any of the following conditions are met, it causes the SedonaUsersExt to schedule a sync task with its UserSyncTask component.

  1. When you save user or role mappings in the Sedona Device User Manager, this saves those mappings to the SedonaUsersExt of each affected device. A sync task is scheduled for those devices.

  2. When you delete or modify a user in the station’s Sedona User Service. All devices that have that user mapped are scheduled for user synchronization.

  3. When you delete or modify a role in the station’s Sedona Role Service. All devices that have a user with that role mapped are scheduled for user synchronization.

Note by schedule, this means the sync does not happen immediately. Instead, there is a brief delay in case more changes are about to be made. The “Next Execute Time” property of the UserSyncTask (if non-null), indicates a sync is pending, showing when the sync will occur.

In case a sync task fails, it automatically reschedules itself to retry at a later time. This state is maintained, even across station restarts. The sync task will not stop trying until it either succeeds, or else you manually invoke the Cancel action on the UserSyncTask component.

Additional notes on user synchronization

Additional facts on user synchronization include:

  • If the parent Sedona device is down, disabled, or in fault, the UserSyncTask immediately fails and reschedules itself for a later execution.

  • The UserSyncTask never synchronizes the device’s super user. Use the “Change Super User” function in the Sedona Device User Manager for this. See About the device super user and Changing the Sedona super user in all devices for related details.

  • Synchronization always makes the app in the remote Sedona device match the user/role mappings stored in the Niagara station. This means any existing Sedona users that are not in the networked device’s user/role mapping will be removed (except for the super user). There is no way to sync from a Sedona device up to the device’s SedonaUsersExt in the station.