anyURIAtLeastOneMemberOf Function Description

Description

This function takes in two parameters of type bag of anyURI and returns true if there is at least one value in the first bag equal to at least one value in the second bag.

anyURIAtLeastOneMemberOf 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-at-least-one-member-of, takes 2 arguments and returns a value of type boolean.

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

Example

/**
 * Permit if one value the requested URL is equal to at least one of the allowed URLs.
 * Both requestedURL and allowedURL are bags which means they can be multi-valued.
 */
rule anyURIAtLeastOneMemberOfExample{
    permit
    condition anyURIAtLeastOneMemberOf(requestedURL, allowedURL)
}

In this example, the user is requesting a website URL. Access will be allowed if the URL is equal to at least one of the values in the allowedURL bag.