Policy validation issue for non-ascii characters
In M21, the new policy validation has issue for non-ascii characters. Here is a sample policy tested in M21 GC:
package osdu.partition["m19"].organisation_code_2
organisation_code := {
"AGÊNCIA NACIONAL DO PETRÓLEO": {
"Name": "ANP",
"Code": "G0013"
}
}
Failed to load the policy with the following error:
{
"detail":"Unable to validate policy! Error: {\n \"code\": \"invalid_parameter\",\n \"message\": \"error(s) occurred while compiling module(s)\",\n \"errors\": [\n {\n \"code\": \"rego_parse_error\",\n \"message\": \"unexpected assign token: expected rule value term (e.g., organisation_code := \<VALUE\> { ... })\",\n \"location\": {\n \"file\": \"tmp/m19/organisation_code_2.rego\",\n \"row\": 3,\n \"col\": 19\n },\n \"details\": {\n \"line\": \"organisation_code := {\",\n \"idx\": 18\n }\n }\n ]\n}\n 400."
}
This policy can be loaded before the policy validation is added in M21.