This crate provides a Rust API for parsing and evaluating Accumulo Access Expressions, based on the AccessExpression specification.
Add the following to your Cargo.toml
:
[dependencies]
accumulo-access = "0.1"
use accumulo_access::check_authorization;
fn main() {
let expr = "A&B&(C|D)";
let auths = vec!["A", "B", "C"];
let result = check_authorization(expr, auths);
assert!(result.is_ok());
}
- It doesn't limit the unicode ranges in quoted access tokens (ref. the specification).
- It doesn't have functionality for normalizing expressions (ref. the Java-based accumulo-access project).
- It doesn't have functionality for serializing expression trees to a string representation.
- Lars Wilhelmsen (https://github.com/larsw/)
Licensed under both the the Apache License, Version 2.0 (LICENSE_APACHE or http://www.apache.org/licenses/LICENSE-2.0) and the MIT License (LICENSE_MIT).