An open API service indexing awesome lists of open source software.

https://github.com/apache/accumulo-access

Apache Accumulo Access Control Library
https://github.com/apache/accumulo-access

accumulo big-data hacktoberfest

Last synced: 4 months ago
JSON representation

Apache Accumulo Access Control Library

Awesome Lists containing this project

README

        

# Accumulo Access Library

Java library that provides the same functionality, semantics, and syntax as the
Apache Accumulo [ColumnVisibility][1] and [VisibilityEvaluator][2] classes.
This functionality is provided in a standalone java library that has no
dependencies (for example no Hadoop, Zookeeper, Thrift, etc dependencies).

For a conceptual overview of what an access expression is, see the
[specification](SPECIFICATION.md) document. See the [Getting Started
section](#getting-started) for an example of how to use this java library.

## Public API

The following types constitute the public API of this library. All other types
are package private and are not part of the public API.

* [InvalidAccessExpressionException](src/main/java/org/apache/accumulo/access/InvalidAccessExpressionException.java).
* [AccessEvaluator](src/main/java/org/apache/accumulo/access/AccessEvaluator.java).
* [AccessExpression](src/main/java/org/apache/accumulo/access/AccessExpression.java).
* [ParsedAccessExpression](src/main/java/org/apache/accumulo/access/ParsedAccessExpression.java).
* [ExpressionType](src/main/java/org/apache/accumulo/access/ParsedAccessExpression.java).
* [Authorizations](src/main/java/org/apache/accumulo/access/Authorizations.java).

## Getting Started

Add the library to your CLASSPATH. For Maven, use:

```xml


org.apache.accumulo
accumulo-access
${version.accumulo-access}

```

## Running the [Examples](src/test/java/example)

To run [AccessExample](src/test/java/example/AccessExample.java)

```
mvn clean package
CLASSPATH=$(ls target/accumulo-access-*.jar) java src/test/java/example/AccessExample.java
CLASSPATH=$(ls target/accumulo-access-*.jar) java src/test/java/example/AccessExample.java RED BLUE
```

Note that `data6` is always returned, because it has no access expression. And
remember, authorizations are case-sensitive.

To run [ParseExamples](src/test/java/example/ParseExamples.java)

```
mvn clean package
CLASSPATH=$(ls target/accumulo-access-*.jar) java src/test/java/example/ParseExamples.java
```

For an ANTLRv4 example, see antlr-example integration test's
[README](src/it/antlr4-example/README.md).

## Running the Benchmark

This project includes a JMH Benchmark. To run it:

```
mvn clean verify -Pbenchmark
```

[1]: https://github.com/apache/accumulo/blob/rel/2.1.2/core/src/main/java/org/apache/accumulo/core/security/ColumnVisibility.java
[2]: https://github.com/apache/accumulo/blob/rel/2.1.2/core/src/main/java/org/apache/accumulo/core/security/VisibilityEvaluator.java