Type declarations
ALFA provides a mechanism for declaring data types to streamline the use of predefined data formats within policy specifications. These type declarations serve as shorthand aliases for standard data types, making them easier to reference within policy statements.
Type declaration syntax
A type declaration follows a simple syntax:
type <shortName> = <URI>
Where:
<shortName>: Represents the name for the data type<URI>: Specifies the Universal Resource Identifier (URI) that uniquely identifies the data type in a standardized format
String data type declaration
The standard string data type, represented by the URI http://www.w3.org/2001/XMLSchema#string, is declared using the following syntax:
type string = "http://www.w3.org/2001/XMLSchema#string"
This declaration allows to simply refer to the string data type using the alias string throughout their policies.
Predefined data types
The system.alfa file contains declarations for all the standard data types defined in the XACML language. This eliminates the need to manually declare these standard data types in policies, as they are already available for immediate use.