Crate a2x

Crate a2x 

Source
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§

AlfaDocParser
A pest parser for the ALFA authorization language.
AlfaFile
The original path and full contents of an Alfa source file.
AlfaParseTree
The raw parse tree and context of an ALFA source file.
XacmlFile
The intended output filepath and raw output contents of a XACML/XML file.

Enums§

Rule

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.