Yandex Identity Hub Sync Agent
Yandex Identity Hub Sync Agent reads user and user group data in the selected Organization Units (OU) in the Active Directory directory and syncs it with user and user group data in the Yandex Identity Hub pool.
The synchronization agent installation script is available for the following operating systems:
Active Directory-side authentication
On the Active Directory side, the synchronization agent gets user and group data as an account created in the Active Directory domain. To get this data, the agent uses LDAP
Regardless of the operating system of the server hosting the synchronization agent, the agent can be authenticated on the Active Directory side with the domain user's name and password or via Kerberos
In addition, if the agent runs on a Windows server, you can configure agent authentication on the Active Directory side using a gMSA account.
Tip
A gMSA account is the preferred authentication method for Active Directory because it does not require saving the password in the agent's configuration file or Kerberos keys on the server.
Yandex Cloud-side authentication
On the Yandex Cloud side, the synchronization agent manages users and user groups as a service account with permissions for syncing. Requests to Yandex Cloud go to public endpoint https://organization-manager.api.cloud.yandex.net over HTTPS
Synchronization process
During the synchronization process, Yandex Identity Hub Sync Agent can create, update, or delete users and user groups in Yandex Identity Hub. Yandex Identity Hub users and groups are synced with Active Directory users and groups in two stages: primary synchronization and incremental synchronization.
During syncing, the user pool may be found to contain a user or user group with names identical to those of the user or user group that need to be synced, in which case, depending on current settings, the agent will either overwrite the data from Active Directory for the existing Yandex Identity Hub user or group or return an error message.
Full (primary) synchronization
When performing a full synchronization, the agent reads the data of all users, groups, and their attributes in the selected organization units in the Active Directory directory and creates the same users and groups with the same attributes in the Yandex Identity Hub user pool.
The full synchronization process for a large number of objects may take a long time. If it gets interrupted due to an error, you can restart the agent to resume synchronization from where the previous attempt was interrupted. The agent tracks the progress of full synchronization using process token files in the running agent's directory:
main_sync_replication_token.jsonpassword_hash_replication_token.jsonuser_control_replication_token.json
After full synchronization is successfully completed, the agent, run as a standalone service or OS service, proceeds to continuously perform incremental synchronization.
Tip
You run full synchronization again by deleting the mentioned process token files and restarting the agent.
Incremental synchronization
The running agent performs incremental synchronization continuously with the following frequency:
- Syncing user passwords and states: The agent tracks the lock/unlock status of users in the Active Directory domain and user password changes and transfers these updates to Yandex Identity Hub every few seconds. You cannot change the frequency for this synchronization type.
- Syncing other values: The agent tracks other changes in properties, attributes, and parameters of users and groups at an interval specified in the agent's configuration file.
Dry run
You can test Yandex Identity Hub Sync Agent through the dry-run mode. Use this mode to try out the changes you make to the agent's configuration before applying them.
In dry run mode, the agent does not alter the data of Yandex Identity Hub users and groups. Instead, it tests all operations caused by changes to the agent's configuration and logs the results of these tests.
For more information on how to dry run the agent, see Test the agent configuration changes.
Tracked changes
During continuous synchronization, the agent tracks the following changes in Active Directory and transfers them to Yandex Identity Hub:
- Creating, editing, locking, unlocking, and deleting users.
- Creating, editing, and deleting user groups.
- Changing user and user group attributes.
- Adding users to groups and removing them from groups.
- Changing user passwords.
If there is a value in the accountExpires field on the Active Directory side for a user account, the agent will synchronize this value with the Deactivation date (expires_at) field in the local Yandex Identity Hub user's settings. Once the time set in this field is reached, the local Yandex Identity Hub user will be automatically deactivated.
In this case, to reactivate the user, update or delete the accountExpires field value for the user’s account on the Active Directory side.
Synchronization logging
Yandex Identity Hub Sync Agent logs the events taking place during synchronization.
By default, the event and error info is fed into the standard streamstdout. You can configure saving logs to files in the agent's configuration.
By default, the event info is output in text format, whether using the standard output stream or a file; you can, however, change it to JSON
In the agent's configuration, you can also configure log export to a Yandex Cloud Logging log group.
Additionally, you can set the following logging conditions in the agent's configuration:
debuginfowarnerrordpanicpanicfatal
Checking access permissions for authentication data files
When started, the synchronization agent can check access permissions assigned to files that are used by the agent and contain sensitive data:
- The agent configuration file may contain the password for the user account the agent uses for Active Directory-side synchronization.
- The
keytabfile contains the encryption keys required to authenticate to Active Directory via Kerberos. - The service account authorized key file contains the key for access to Yandex Cloud.
With the permission check enabled, as soon as you start the synchronization agent, it checks that the following conditions are met:
- The files are owned by the user who started the agent.
- Read and write permissions for the files are granted to their owner only (
chmod 600).
- Inheritance of access permissions is off for the files.
- Only the
SystemandLocal Administratorsubjects, and/or subjects of theBUILTIN\Administratorsgroup, have full access (FullAccess) to the files. - Only the user who started the agent has read permission for the files.
If the agent detects a violation of these conditions at startup, execution terminates with an error.
You can turn the access permission check for sensitive data files on and off using the agent's check_config_permissions configuration setting.
Agent configuration
The synchronization agent's configuration is defined in a YAML
For configuration examples, see the sync setup guide, and for field descriptions, under Agent configuration parameters.
Useful links
- Syncing users and groups with Microsoft Active Directory
- Syncing users and groups with Microsoft Active Directory
A gMSA (group Managed Service Account) is a type of account in Microsoft Active Directory with passwords managed automatically by the domain controller. This simplifies running and operating the same service (SPN) on different servers. For more information, see this Microsoft article