Crates.io | accumulo-access |
lib.rs | accumulo-access |
version | 0.1.9 |
source | src |
created_at | 2024-01-03 21:09:57.335423 |
updated_at | 2024-05-30 19:19:29.20596 |
description | Rust API for parsing and evaluating Accumulo Access Expressions |
homepage | |
repository | https://github.com/larsw/accumulo-access-rs |
max_upload_size | |
id | 1087807 |
size | 67,179 |
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());
}
caching::check_authorization
will memoize/cache the result based on the input (expression+authorization tuple).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.