BAC Rules is a set of Rust libraries for evaluating access control
policies, with a focus on FreeIPA and LDAP
directory deployments. The libraries cover several access control models —
HBAC, ABAC, RBAC, LDAP ACIs, POSIX ACLs, and Windows Security
Descriptors — and can be used from Rust, Python, or the browser via
WebAssembly.
Crate Purpose
acls-rs Permission primitives, RBAC with role inheritance, temporal permissions
hbac-rs FreeIPA Host-Based Access Control — three-dimensional matching (user × host × service)
abac-rs Attribute-Based Access Control with arbitrary typed dimensions
ldap-acis LDAP Access Control Instructions — parse, evaluate, generate, and transform ACIs for 389 DS and OpenLDAP
posix-acls POSIX.1e ACL modeling: typed permission model, ACL builder, access check algorithm, user/group model, acls-rs bridge
win-sd Windows Security Descriptor (MS-DTYP): SIDs, ACCESS_MASKs, 21 ACE types, SDDL parsing/generation, access check algorithm (integrity, privileges, restricted tokens), conditional ACEs, OBJECT_TYPE_LIST, claims, configurable PermissionMapping bridge
Crate Purpose
acls-python , hbac-python , abac-python , posix-acls-python , win-sd-python Python bindings via PyO3 with cross-module type sharing
abac-wasm , hbac-wasm WebAssembly packages for browsers and Node.js
Crate Purpose
perf-testing Benchmark CLI with synthetic rule generation, fixture management, and scaling analysis
ldif-parser LDIF (RFC 2849) parser producing LdapEntry structures for ldap-acis
RBAC (Role-Based Access Control) — permissions granted through roles
with inheritance hierarchies
HBAC (Host-Based Access Control) — FreeIPA’s model for deciding whether
a user may access a service on a host
ABAC (Attribute-Based Access Control) — policy decisions based on
arbitrary attributes of the requester, resource, and environment
LDAP ACIs — fine-grained access control over directory entries and
attributes, as used by 389 Directory Server and OpenLDAP
POSIX ACLs — POSIX.1e access control lists for file system permissions
Windows Security Descriptors — MS-DTYP security descriptors with SDDL,
DACLs/SACLs, and mandatory integrity
Correctness — permission composition follows well-defined algebraic
rules so that grant/deny interactions behave predictably
Performance — evaluation stays fast at scale through caching, indexing,
and optional JIT compilation; see
Performance Results for benchmark data
Composability — combine HBAC, RBAC, and ABAC policies in a single
evaluation
Production use — designed for SSSD and enterprise identity deployments
FreeIPA deployments — HBAC rule evaluation for identity management
SSSD integration — local caching and evaluation of access policies
Directory servers — ACI analysis, migration, and evaluation for 389 DS
and OpenLDAP
Python applications — high-performance access control via Python
bindings
Web applications — browser and Node.js support via WebAssembly
Samba/NFS interoperability — NT to POSIX ACL translation via the
PermissionSet bridge
Active Directory — AD schema access control analysis with SDDL and LDAP
ACI cross-model comparison
See the Installation guide to begin using
BAC Rules.