ALFA to XACML (a2x)
a2x converts policies written in the ALFA language to XACML 3.0 XML policies.
Licensed under the GNU General Public License v3.0 or later.
CHANGELOG
Please see the CHANGELOG for release history.
Usage
Convert any files in the src directory ending in .alfa to XACML,
saving to the xacml directory.
$ a2x --input src --output xacml
The --input option can be repeated for as many files or directories
as desired.
Most entities from the XACML spec are predefined and available through an implicitly imported namespace. To see a listing, run:
$ a2x --show-builtins
If you prefer to not have these implicitly imported, they can be
disabled with the --disable-builtins flag.
The default prefix for PolicySetId, PolicyId, and RuleId can be
customized with the --namespace option.
Building
a2x is written in Rust, so you will need to install Rust to compile it. Rust version 1.85.0 (stable) or newer is supported.
To build a2x:
$ git clone https://git.sr.ht/~gheartsfield/a2x
$ cd a2x
$ cargo build --release --locked
$ ./target/release/a2x --version
a2x 0.1.0
Running tests
a2x has unit tests and full end-to-end tests that ensure ALFA policies are converted to exact matches of manually verified XACML policies. To run all these tests, use:
$ cargo test