regex support in roles definition

33 views
Skip to first unread message

alex...@gmail.com

unread,
Feb 20, 2018, 6:06:40 AM2/20/18
to search...@googlegroups.com
Hi all,
I'm trying to specify an index pattern in sg_roles.yml but i can't get it to work.
I'm using searchguard 5 (latest) with ES 5.6.6.

I'm using something like '/^myprefix.*$/' (to match myprefixWHATEVER indices) but it does not work:

sg_testrole:
  cluster:
    - CLUSTER_COMPOSITE_OPS_RO
    - indices:data/read/scroll*
  indices:
    #this WORKS but it not a regex
    'myprefix*':
      '*':
        - READ
        - SEARCH
        - indices:data/read/field_caps
    #this DOES NOT work
    '/^myotherprefix.*$/':
      '*':
        - READ
        - SEARCH
        - indices:data/read/field_caps
    '?kibana':
      '*':
        - INDICES_ALL

is there something wrong in my definition ?
Thank you in advance for your help

Alessandro

SG

unread,
Feb 21, 2018, 3:51:08 PM2/21/18
to search...@googlegroups.com
try something '/myprefix.*/' (omit the ^ $)

and '/myotherprefix.*/'

> Am 20.02.2018 um 12:06 schrieb alex...@gmail.com:
>
> Hi all,
> I'm trying to specify an index pattern in sg_roles.yml but i can't get it to work.
> I'm using searchguard 5 (latest) with ES 5.6.6.
>
> I'm using something like '/^myprefix.*$/' (to match myprefixWHATEVER indices) but it does not work:
>
> sg_testrole:
> cluster:
> - CLUSTER_COMPOSITE_OPS_RO
> - indices:data/read/scroll*
> indices:
> #this WORKS but it not a regex
> 'myprefix*':
> '*':
> - READ
> - SEARCH
> - indices:data/read/field_caps
> #this DOES NOT work
> '^myotherprefix.*$':
> '*':
> - READ
> - SEARCH
> - indices:data/read/field_caps
> '?kibana':
> '*':
> - INDICES_ALL
>
> is there something wrong in my definition ?
> Thank you in advance for your help
>
> Alessandro
>
> --
> You received this message because you are subscribed to the Google Groups "Search Guard Community Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to search-guard...@googlegroups.com.
> To post to this group, send email to search...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/search-guard/d37be770-0c26-4da1-af35-0487007127b2%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

SG

unread,
Feb 21, 2018, 4:00:29 PM2/21/18
to search...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages