Expand description
Convert ALFA 1.0 source files to XACML 3.0 XML.
ALFA is the “Abbreviated Language for Authorization”, which serves as a human-friendly language for writing authorization policies, with the goal of being converted into the XML-based XACML (eXtensible Access Control Markup Language) format.
This crate attempts to implement ALFA as specified in the OASIS Working Draft 01 specification.
As this library evolves, the intent is to consider adding additional features that are planned for ALFA 2.0. There also may be deviations from the 1.0 spec, where absolutely necessary.
The ALFA 1.0 spec is ambiguous in several areas, and I have attempted to follow the observed behavior of other ALFA implementations, notably the Axiomatics “Visual Studio Code extension for ALFA” plugin.
Re-exports§
pub use crate::errors::ParseError;
Modules§
- args
- Command line arguments.
- ast
- Parsing and represention of the Alfa abstract syntax tree.
- context
- Configuration and mutable state needed during an ALFA to XACML conversion.
- errors
- xacml
- XACML structures for serializing to XML.
Structs§
- Alfa
DocParser - A pest parser for the ALFA authorization language.
- Alfa
File - The original path and full contents of an Alfa source file.
- Alfa
Parse Tree - The raw parse tree and context of an ALFA source file.
- Xacml
File - The intended output filepath and raw output contents of a XACML/XML file.
Enums§
Functions§
- alfa_
compile - Compile a collection of Alfa source files into XACML 3.0 XML.
- make_
alfa_ ast - Parses a single ALFA policy document into an abstract syntax tree.
- parse_
alfadoc - Parses a single ALFA policy document into a tree of tokens.
- write_
xentry - Write policy files to disk.