anyURISetEquals Function Description

Description

This method returns true if both sets of attribute values of type anyURI are equal. Technically, it uses the subset function on the first and second arguments ANDed with the subset function and the second and first argument. Note that duplicate values have no impact on the comparison. For instance, the following 2 sets are equal: [a,a,c,b] and [b,c,a,c].

anyURISetEquals 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-set-equals, takes 2 arguments and returns a value of type boolean.

Property Value
Category Set functions
# Arguments 2
Arguments
  • A bag of type anyURI
  • A bag of type anyURI
Return Value boolean
Expressed As pre-fix
Representation ALFA short name
Allowed In Target false
ALFA Shorthand None
Commutative true

Example

/**
* Deny access if the list of requested URLs is equal to the list of dangerous sites.
* Note: this is not a good use of the function as access would only be denied if the user was
* asking for the dangerous sites only and even then, all of the dangerous sites.
*/
rule anyURISetEqualsExample{
    deny
    condition anyURISetEquals(requestedURL, dangerousSites)
}

In this example access will be denied if the user asks for one or more URIs that all happen to be dangerous sites. Note that for access to be denied, the user must ask for all of the dangerous sites at once. This illustrates how narrow the scope of the function is.