| Crates.io | v-authorization-impl |
| lib.rs | v-authorization-impl |
| version | 0.5.3 |
| created_at | 2025-10-25 12:48:05.771356+00 |
| updated_at | 2025-10-30 14:15:41.093262+00 |
| description | LMDB implementation for Veda authorization |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1900198 |
| size | 65,419 |
LMDB and MDBX implementation for Veda authorization system.
This crate provides LMDB-based and libmdbx-based storage backends for the Veda authorization framework. It implements the AuthorizationContext trait from v_authorization crate using two different database engines:
To prevent accidental database corruption, different backends use different paths:
./data/acl-indexes/ (main), ./data/acl-cache-indexes/ (cache)./data/acl-mdbx-indexes/ (main), ./data/acl-cache-mdbx-indexes/ (cache)use v_authorization_impl::{LmdbAzContext, AzDbType, AzContext};
// Create with default settings
let mut az_ctx = LmdbAzContext::default();
// Create with custom max read counter
let mut az_ctx = LmdbAzContext::new(10000);
// Create with full configuration
let mut az_ctx = LmdbAzContext::new_with_config(
10000,
Some("tcp://localhost:9999".to_string()),
Some("full".to_string()),
Some(true)
);
use v_authorization_impl::{MdbxAzContext, AzDbType, AzContext};
// Create with default settings
let mut az_ctx = MdbxAzContext::default();
// Create with custom max read counter
let mut az_ctx = MdbxAzContext::new(10000);
// Create with full configuration
let mut az_ctx = MdbxAzContext::new_with_config(
10000,
Some("tcp://localhost:9999".to_string()),
Some("full".to_string()),
Some(true)
);
use v_authorization_impl::{AzContext, AzDbType};
// Choose database type at runtime
let db_type = AzDbType::Mdbx; // or AzDbType::Lmdb
// Create with default settings
let mut az_ctx = AzContext::new(db_type, 10000);
// Create with full configuration
let mut az_ctx = AzContext::new_with_config(
db_type,
10000,
Some("tcp://localhost:9999".to_string()),
Some("full".to_string()),
Some(true)
);
The context can be configured with:
max_read_counter: Number of authorization operations before database reconnectionstat_collector_url: Optional URL for statistics collectionstat_mode: Statistics collection mode ("full", "minimal", or "none")use_cache: Enable/disable authorization cacheheed: LMDB Rust bindings
libmdbx: Modern LMDB fork
v_authorization: Core authorization framework
nng: Nanomsg-next-generation for statistics reporting