Configure Ranger Usersync for invalid usernames

How to configure Ranger Usersync to manage usernames containing invalid characters.

Ranger Usersync pulls in users/groups from your external user repository, such as LDAP/AD, and populates the Ranger database with these users/groups.

An invalid username contains at least one invalid character. Ranger fails to create a set of users if an invalid username exists within that set of users. Usersync perpetually tries to recreate this user set without creating Ranger or Cloudera Manager alerts. This error appears in both Usersync and admin logs, but the log output lacks necessary details such as the invalid username. By adding the following configuration, you cause Usersync to recognize invalid characters in a user/group name and then skip synchronization for any names that contain invalid characters.

  1. In Cloudera Manager > Ranger > Configuration, type Ranger Usersync Advanced Configuration Snippet (Safety Valve) in Search.
  2. In the Ranger Usersync Advanced Configuration Snippet (Safety Valve) for conf/ranger-ugsync-site.xml configuration, select to include the following property:
    • In Name, type: ranger.usersync.name.validation.enabled
    • In Value, type: true
  3. Click Save Changes.
  4. Restart Ranger.
Ranger Usersync now successfully synchronizes all valid usernames from the external user repository and skips any usernames containing invalid characters.