base64BinarySetEquals Function Description

Description

This method returns true if both sets of attribute values of type base64Binary 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].

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

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

Example

/**
* Allow access if the user provides exactly all of the required payload in the encoded message.
* No more, no less.
*/
rule base64BinarySetEqualsExample{
    permit
    condition base64BinarySetEquals(encodedMessage,requiredPayloads)
}

In this example, access is permitted if the bag of values represented by encodedMessage contains exactly the same contents as the required payloads. Not one message more or less.