RangerBaseService.lookupResource() is called within Ranger Admin to provide 
auto-complete values as the user enters a resource name in policy UI – for 
example a Hive table name.

  Input:

    - ResourceLookupContext.userInput: value currently being entered in UI

    - ResourceLookupContext.resourceName: name of the resource, as defined in 
service-def, like database/table/column/path

    - ResourceLookupContext.resources: values already present in policy UI. 
This can be useful for example 1) to scope the search for table names within 
the database already entered in the policy 2) to avoid returning values that 
are already present in the policy

 

  Return:

    - list of auto-complete values to show in the UI

 

RangerBaseService.validateConfig() is called to validate service-config values. 
For example url/username/password entered in service-config that are used to 
connect to the service (like HiveServer2, NameNode). Following entries are 
expected in the returned map:

- connectivityStatus: true/false

- description: any other information on validation success/failure

 

Hope this helps.

 

Madhan

 

 

 

From: Elliot West <tea...@gmail.com>
Reply-To: <user@ranger.apache.org>
Date: Monday, October 5, 2020 at 10:52 AM
To: <user@ranger.apache.org>
Subject: RangerBaseService contract

 

Hello, I'm implementing my own service and was wondering if anyone can point me 
in the direction of the contract for the abstract methods in RangerBaseService. 
In particular I'm keen to know what behaviour and return values I should 
provide for:

List<String> lookupResource(ResourceLookupContext)
Map<String, Object> validateConfig()
And what can I expect to find in:

ResourceLookupContext.userInput
ResourceLookupContext.resourceName
ResourceLookupContext.resources - Map<String, List<String>>
Many thanks,

 

Elliot.

Reply via email to