accumulo-access

Crates.ioaccumulo-access
lib.rsaccumulo-access
version0.1.9
sourcesrc
created_at2024-01-03 21:09:57.335423
updated_at2024-05-30 19:19:29.20596
descriptionRust API for parsing and evaluating Accumulo Access Expressions
homepage
repositoryhttps://github.com/larsw/accumulo-access-rs
max_upload_size
id1087807
size67,179
larsw (larsw)

documentation

README

Accumulo Access for Rust

Introduction

This crate provides a Rust API for parsing and evaluating Accumulo Access Expressions, based on the AccessExpression specification.

Quickstart

Add the following to your Cargo.toml:

[dependencies]
accumulo-access = "0.1"

Example

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());
}

Functionality

  • Using the equivalent method in caching::check_authorization will memoize/cache the result based on the input (expression+authorization tuple).
  • Possibility to return parsed expression as an expression tree; either as a serde JSON Value-based tree, or a JSON string representation.

Known usages

Maintainers

License

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.

Commit count: 18

cargo fmt