I am writing a alfa policy with the below condition where documentpackage status is a set of array values which will be empty in this policy. As of now to make it pass I have tried giving empty space (as null is not accepted by this policy.)
condition
user.abac.bc_orgrole == "se"
&& action.newobject.DocumentPackageStatus == ''
How I can define this empty string?
You can use the stringBagSize function to check how many values are in an attribute. If it is empty then the size will be zero:
Note that if you are including the attribute action.newobject.DocumentPackageStatus in the request even if it does not have a value you must do so like this so it will be empty:
if you define it like this it will have a bagSize of 1 and the value of an empty string: