I have a groups claim on my JWT token which contains an array of multiple strings (UUIDs).
I want to apply DLS using these attributes eg
"dls": "{\"terms_set\": { \"group_permissions\":{ \"terms\":[\"${attr.jwt.groups_ids}\"],\"minimum_should_match_script\": { \"source\": \"1\"}}}}"
However since the claim is read in as a String the underlying query is not substituted correctly:
queries={documents=[{"terms_set": { "group_permissions":{ "terms":["[71b460f8-6f5c-476d-acac-4ec54069fbb7, 02f008a5-253d-4b1b-8abe-c3da1513ded8]"],"minimum_should_match_script": { "source": "1"}}}}]]}
Is there anyway around this?