Claude Falbriard
Claude Falbriard

Reputation: 935

XACML ALFA - How to read one Element of a Bag as a String and concatenate it

Wonder how to concatenate two bags as a string, each one contains one data element. The stringConcatenate function only accepts string data type, while data values returning from the PIP module are of bag type. Is there a string to bag conversion available in ALFA? Scanning the version 3 specifications I did not find a inverse function, like read first element of a bag converted into a string. Is there a solution available for XACML Version 3 and ALFA to run this data-type adjustment and concatenate two data values?

Example:

obligations = "Invited to Work Request Policy - The user :{" 
        notificationRecipient = stringConcatenate(subjectAttributes.redSerialNumber,subjectAttributes.employeeCountryCode)
        debugMsg2 = "}, was invited to XYZ."

Upvotes: 1

Views: 169

Answers (1)

Claude Falbriard
Claude Falbriard

Reputation: 935

The following statement was validated in ALFA:

obligation displayAttributes { 
    obligations = "Invited to Work Request Policy - The user :{" 
    notificationRecipient = stringConcatenate(stringOneAndOnly(subjectAttributes.redSerialNumber),stringOneAndOnly(subjectAttributes.employeeCountryCode))
    debugMsg2 = "}, was invited to XYZ."
}

Upvotes: 1

Related Questions