Skip to main content
The Ranger hands-on examples page demonstrates how to use Ranger.

Add a new service

Use the following steps to add a new service:
  1. Open the Ranger Admin UI. It should default to the Resource Policies sidebar option. This is also the Service Manager.
  2. Click the plus sign to add a service. Select a service type, such as Trino or Hive.
  3. Provide a service name and connection details such as URLs or credentials.
  4. Test the connection to ensure Ranger can communicate with the service.
  5. Save the service configuration.
02-add-a-new-service
Add a new service

Create a policy

Use the following steps to create a policy:
  1. Open the Ranger Admin UI. It should default to the Resource Policies sidebar option. This is also the Service Manager.
  2. Select the service that you want to create a policy for. When you configure variables to deploy NexusOne, the ranger_repo_mode variable decides the service name. The variable can have one of the following values:
    • tenant: Assigns the nx1-unifiedsql-<namespace> service.
    • shared: Assigns the nx1-unifiedsql service.
    • group: Assigns the nx1-unifiedsql-grp-<group> service, where <group> is the value of the ranger_repo_group variable.
    If you don’t know your mode, then ask your platform administrator, or look at the service names in the Ranger Admin UI.
  3. At the top right-corner of the page, click Add New Policy.
  4. Specify a policy name.
  5. Define a resource scope, such as which schemas, tables, or columns.
  6. In the Allow Conditions section, add who should receive access.
    • To give access to a NexusOne role, such as nx1_ingest, select it in the Select Group field.
    • To give access to one person, select their username in the Select User field.
  7. Select permissions such as SELECT, INSERT, or UPDATE.
  8. Optionally, add policy conditions.
  9. Click Save at the bottom of the screen to save the policy.
03-create-a-policy
Create a policy

Synchronize users and groups

Use the following steps to synchronize users and groups:
  1. Configure Keycloak connection details in Ranger usersync configuration.
  2. Specify a base DN, search filters, and sync intervals.
  3. Start the usersync service.
  4. In the Ranger Admin UI, click Settings, and verify that the users and groups appear under the Users, Groups, and Roles section.

View audit logs

Use the following steps to view audit logs:
  1. Open the Ranger Admin UI, and then click Audits.
  2. Select one option, such as Admin or Login Sessions.
  3. You should see a table showing the logs. You can use filters to narrow the results by user, resource, date range, or access result.
  4. Export audit data for offline analysis or compliance reporting.
  5. Create saved searches for frequent audit queries.

Delegate an administrator

Use the following steps to delegate an administrator:
  1. Create a policy granting administrative permissions to specific users.
  2. Scope the administrator’s permissions.
Doing this enables distributed administration where team leads manage their own resources

Additional resources