Skip to main content

Connect Ranger to a Query Engine

Add your Query Engine to Ranger Admin as a Trino service, so that you can manage its access rules in Ranger. At the end, Ranger Admin confirms that it connects to the Query Engine.

Prerequisites​

note

Ranger rules apply to a Query Engine only when you create it with Enable Ranger selected. Without it, the Query Engine applies no Ranger policy.

Sign in to Ranger Admin​

  1. Select Data platform → Workspace management, then select your workspace.

  2. On the Overview tab, under Services, select Ranger.

  3. On the Essential Information tab, under Entry Information, find the URL, Username, and Password.

    Essential Information tab of a Ranger service with the URL, Username, and Password under Entry Information

  4. Go to the URL, enter the Username and Password, then select Sign In.

    Ranger Admin sign-in page with the Username and Password fields and the Sign In button

Add the Query Engine as a Trino service​

  1. In Ranger Admin, on the Service Manager page, select the Resource tab.

  2. In the TRINO group, select the add icon (+).

    Ranger Service Manager on the Resource tab with the TRINO service group highlighted

  3. Fill in the service details, as described in the table below.

  4. Select Add to save the service.

FieldDescription
Service NameThe name of the service. Use the trino-<id> string from the Web UI URL or Public query URL of your Query Engine.
Display NameThe name that Ranger Admin shows.
DescriptionA description of the service.
Active StatusThe status of the service.
Select Tag ServiceThe tag service that the service uses. See Sync tags from Open Metadata to Ranger.
UsernameThe user that signs in to the Query Engine.
PasswordThe password of that user.
jdbc.driverClassNameThe JDBC driver. Default: io.trino.jdbc.TrinoDriver.
jdbc.urlThe JDBC address of the Query Engine, in the format jdbc:trino://<host>:443. <host> is the host in the Public query URL of the Query Engine.
SuperusersThe users that skip access checks when they connect to the Query Engine.
Superuser groupsThe groups whose users skip access checks when they connect to the Query Engine.
Service admin usersThe Ranger users who are admins of this service.
Service admin usergroupsThe Ranger groups whose users are admins of this service.

The trino-<id> string is in the Web UI URL and the Public query URL, under Entry Information on the Essential Information tab of the Query Engine.

Essential Information tab of a Query Engine service with the Web UI URL and Public query URL that contain the trino service ID

Test the connection​

  1. On the Service Manager page, select the edit icon of the Trino service you added.

    Ranger Service Manager with an arrow on the edit icon of the trino service in the TRINO group

  2. Select Test connection.

  3. Check that the result is Connected Successfully.

    Edit Service page of Ranger Admin with the Connected Successfully message

Ranger Admin now connects to your Query Engine. You manage its access rules in Ranger Admin.

Next steps​