Advanced Ranger Configurations

Limit the size of query results and control validation of user and group names used by Apache Ranger in Big Data Service. Configure the parameters ranger.db.maxrows.default, ranger.usersync.name.validation.enabled, and ranger.usersync.name.validation.regex.

Limiting the Size of Query Results

For Big Data Service clusters, the property ranger.db.maxrows.default in Apache Ranger controls the default maximum number of rows that are returned when retrieving data from the Ranger database. This property is used to limit the size of query results to prevent excessively large responses. To configure ranger.db.maxrows.default, complete the following:

  1. Access Apache Ambari.
  2. From the side toolbar, under Services select Ranger.
  3. Select the Configs tab, and then select Advanced.
  4. Update the ranger.db.maxrows.default property. For example, set the value to 500.
  5. Select Add to save the update.
  6. Save the changes.
  7. Select Restart and select Restart all affected. Select Confirm restart all.

Controlling Validation of User and Group Names

For Big Data Service clusters, the properties ranger.usersync.name.validation.enabled and ranger.usersync.name.validation.regex in Apache Ranger control whether Ranger UserSync validates user and group names before syncing them to Ranger Admin.
  • The ranger.usersync.name.validation.enabled property enables or disables user and group name validation. By default, this property is set to false. When set to true, Ranger UserSync skips user or group names that don't match the configured validation regex.
  • The ranger.usersync.name.validation.regex property defines the Java regular expression used to validate user and group names. If this property isn't configured, Ranger UserSync uses the default validation regex if ranger.usersync.name.validation.enabled is enabled.

Following are the steps to configure these UserSync properties.

  1. Access Apache Ambari.
  2. From the side toolbar, under Services select Ranger.
  3. Select the Configs tab, and then select Advanced.
  4. Update or add the following properties:
    ranger.usersync.name.validation.enabled=true
    default value of ranger.usersync.name.validation.regex=^([A-Za-z0-9_]|[\u00C0-\u017F])([a-zA-Z0-9\s,._\-+/@= ]|[\u00C0-\u017F])+$
  5. Select Add to save the update.
  6. Save the changes.
  7. Select Restart and select Restart all affected. Select Confirm restart all.