I am writing very simple rego file but it is showing syntex error. Can anyone suggest what am I doing wrong?
package example.accesscontrol
# Define the allowed UPNs
allowed_upns = {"[email protected]", "[email protected]" }
# Default deny all access
default allow = false
# Allow access if the UPN is in the list of allowed UPNs
allow {
input.user.upn in allowed_upns
}
Input
{
"upn": "[email protected]"
}
Error:
1 error occurred: policy.rego:11: rego_parse_error: unexpected identifier token: expected \n or ; or }
input.user.upn in allowed_upns
^
I was expecting the outcome to be allowed.