This project is a Java library for communicating with Apache Ranger API. Please refer docs for more details.
<repository>
<id>clojars</id>
<name>Clojars repository</name>
<url>https://clojars.org/repo</url>
</repository>
<dependency>
<groupId>com.sumannewton</groupId>
<artifactId>apache-ranger-client</artifactId>
<version>1.0</version>
</dependency>
[com.sumannewton/apache-ranger-client "1.0"]
com.sumannewton/apache-ranger-client {:mvn/version "1.0"}
compile 'com.sumannewton:apache-ranger-client:1.0'
Please look at releases page for more versions.
The following piece of code initializes the client.
public static final String RANGER_URL = "http://localhost:6080";
final RangerClientConfig rangerClientConfig = RangerClientConfig.builder()
.connectTimeoutMillis(1000)
.readTimeoutMillis(1000)
.logLevel(Logger.Level.BASIC)
.authConfig(RangerAuthConfig.builder()
.username("admin")
.password("admin")
.build())
.url(RANGER_URL)
.build();
RangerClient rangerClient = new RangerClient(rangerClientConfig);
rangerClient.start();
rangerClient.getUsers().createUser(User.builder().build());
rangerClient.getUsers().getUserByName("user");
rangerClient.getUsers().setUserVisibility(Maps.newHashMap());
rangerClient.getUsers().searchUsers("userSearch");
rangerClient.getServices().createService(Service.builder().build());
rangerClient.getServices().getServiceByName("service");
rangerClient.getServices().updateService("service", Service.builder().build());
rangerClient.getServices().searchServices("serviceSearch");
rangerClient.getPolicies().createPolicy(Policy.builder().build());
rangerClient.getPolicies().getPolicyByName("service", "policy");
rangerClient.getPolicies().updatePolicy(1, Policy.builder().build());
rangerClient.getPolicies().getAllPoliciesByService("service");
rangerClient.getPolicies().searchPolicies("service", "policySearch");
This project is built using Apache Maven.
Run the following command from the root of repository, to build the client JAR:
$ git clone https://github.com/sumannewton/apache-ranger-client.git
$ mvn clean install
Bugs can be reported using Github issues.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close