Roles containing backshashes cannot be mapped to level groups

Hello

I have been struggling all the afternoon to map the AD Groups returned by my SAML provider to Ignition level groups. It turns out that there is a bug in Ignition where a role containing a backlash cannot be mapped using containsAny or containsAll.

containsAny({user:roles}, 'domain\AD_Group')

This is important because Microsoft's AD groups are returned in the following format: "domain\AD_Group_Name".

You can check it with any provider, and see that this happens even with the traditional authentication.

Ignition version: 8.1.41

Thanks!!

Does a doubled backslash work?

Good one, it works!

containsAny({user:roles}, 'domain\\AD_Group')

Should I consider this a temporary fix or a permanent solution?

Thanks @PGriffith

A permanent solution. Backslashes are how the expression language (and many other programming contexts...) distinguish special characters in strings, like \r, \t, etc. Doubled backslashes is effectively cancelling the escape sequence from the first backslash to emit a single literal backslash in the output string.

2 Likes