anyURIUnion Function Description

Description

This function takes two or more arguments that are both a bag of anyURI values. It returns a bag of anyURI such that it contains all elements of all the argument bags. The function gets rid of duplicates, as determined by the equality functions.

anyURIUnion belongs to the ALFA function reference's Set functions category. It maps to the XACML function identifier urn:oasis:names:tc:xacml:1.0:function:anyURI-union, takes 2 or more arguments and returns a value of type A bag of values of type anyURI with no duplicates..

Property Value
Category Set functions
# Arguments 2 or more
Arguments
  • A bag of type anyURI
  • A bag of type anyURI
  • Optionally more bags of type anyURI
Return Value A bag of values of type anyURI with no duplicates.
Expressed As pre-fix
Representation ALFA short name
Allowed In Target false
ALFA Shorthand None
Commutative true

Example

/**
* Deny access if the requested URL is in the list of either spam sites or dangerous sites
*/
rule anyURIUnionExample{
    deny
    condition anyURIIsIn(anyURIOneAndOnly(requestedURL),anyURIUnion(spamSites, dangerousSites))
}

In this example, the anyURIUnion function is used nested inside a anyURIIsIn. It is used to bring together the values from 2 separate attributes (the spam sites and the unsafe sites). Note that this sort of manipulation could also be done by the PIP to make the policy simpler. Note the use of anyURIOneAndOnly on the requested URL as an attribute in ALFA is always deemed multi-valued.