How to use regex in role_mapping.yml

I am using below Role mapping configuration in role_mapping.yml and it works.

kibana_user:
- "CN=grp1_viewer,OU=Groups,OU=ISO,DC=abcd,DC=com"
- "CN=grp1_editor,OU=Groups,OU=ISO,DC=abcd,DC=com"
- "CN=grp1_admin,OU=Groups,OU=ISO,DC=abcd,DC=com"

However can I use regex for CN like CN=grp1_* .
I tried various combination, but it does not work.
Appreciate a quick help.

I don't think role mapping file supports regex. Quote from the doc

Please note however, that the role_mappings.yml file is provided as a minimal administrative function and is not intended to cover and be used to define roles for all use cases.

For defining complex role mappings, please consult with the role mapping API.

thanks it helped

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.