# Should dots in regular expressions be allowed when configuring index-level permissions for a role?

**URL:** <https://forum.search-guard.com/t/should-dots-in-regular-expressions-be-allowed-when-configuring-index-level-permissions-for-a-role/1036>\
**Category:** Search Guard\
**Created:** [July 24, 2018, 10:27am UTC](https://forum.search-guard.com/t/should-dots-in-regular-expressions-be-allowed-when-configuring-index-level-permissions-for-a-role/1036 "2018-07-24T10:27:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tomoyuki](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@Tomoyuki](https://forum.search-guard.com/u/Tomoyuki)\
**Post date:** [July 24, 2018, 10:27am UTC](https://forum.search-guard.com/t/should-dots-in-regular-expressions-be-allowed-when-configuring-index-level-permissions-for-a-role/1036/1 "2018-07-24T10:27:41Z")

</div>

Regular expression is available for specifying index-level permissions for a role [from this view](https://github.com/floragunncom/search-guard-kibana-plugin/blob/v6.3.1-14-beta-1/public/apps/configuration/sections/roles/views/edit.html).

But, when setting a regular expression pattern including dots, the dots are replaced with ‘?’ in the method [submitAddIndex](https://github.com/floragunncom/search-guard-kibana-plugin/blob/v6.3.1-14-beta-1/public/apps/configuration/sections/roles/controller.js#L382).

Then, the pattern created after the replacement is not always a valid regular expression pattern.

For example, when specifying ‘/._/’ for the index input, it is replaced with '/?_/’ after pushing the save button, where the pattern after the replacement is invalid.

Can this be a bug?

Can we use dots in regular expressions?

How about validating regular expressions before submitting?

Versions

Elasticserch version: 6.3.1

SeachGuard ES plugin version: 6-6.3.1-22.3

Kibana version: 6.3.1

SearchGuard Kibana plugin version: 6.3.1-14-beta-1

---

<div class="post-metadata">

**Author:** ![jkressin](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/jkressin/32/9_2.png) [@jkressin](https://forum.search-guard.com/u/jkressin)\
**Post date:** [July 24, 2018, 11:34am UTC](https://forum.search-guard.com/t/should-dots-in-regular-expressions-be-allowed-when-configuring-index-level-permissions-for-a-role/1036/2 "2018-07-24T11:34:25Z")

</div>

I believe this could indeed be a bug. Could you please post this issue on our GitHub Issue tracker:

> **[Issues · floragunncom/search-guard-kibana-plugin](https://github.com/floragunncom/search-guard-kibana-plugin/issues)**
>
> This plugin for Kibana adds session management and multi tenancy to a Search Guard secured cluster. - Issues · floragunncom/search-guard-kibana-plugin

Thanks!

> **···**
>
> On Tuesday, July 24, 2018 at 10:57:04 AM UTC+2, Tomoyuki Saito wrote:
> 
> > Regular expression is available for specifying index-level permissions for a role [from this view](https://github.com/floragunncom/search-guard-kibana-plugin/blob/v6.3.1-14-beta-1/public/apps/configuration/sections/roles/views/edit.html).
> 
> > 
> 
> > But, when setting a regular expression pattern including dots, the dots are replaced with ‘?’ in the method [submitAddIndex](https://github.com/floragunncom/search-guard-kibana-plugin/blob/v6.3.1-14-beta-1/public/apps/configuration/sections/roles/controller.js#L382).
> 
> > Then, the pattern created after the replacement is not always a valid regular expression pattern.
> 
> > 
> 
> > For example, when specifying ‘/._/’ for the index input, it is replaced with '/?_/’ after pushing the save button, where the pattern after the replacement is invalid.
> 
> > 
> 
> > Can this be a bug?
> 
> > Can we use dots in regular expressions?
> 
> > 
> 
> > How about validating regular expressions before submitting?
> 
> > 
> 
> > Versions
> 
> > 
> 
> > Elasticserch version: 6.3.1
> 
> > SeachGuard ES plugin version: 6-6.3.1-22.3
> 
> > Kibana version: 6.3.1
> 
> > SearchGuard Kibana plugin version: 6.3.1-14-beta-1

---

<div class="post-metadata">

**Author:** ![Tomoyuki](https://avatars.discourse-cdn.com/v4/letter/t/d9b06d/32.png) [@Tomoyuki](https://forum.search-guard.com/u/Tomoyuki)\
**Post date:** [July 24, 2018, 11:53am UTC](https://forum.search-guard.com/t/should-dots-in-regular-expressions-be-allowed-when-configuring-index-level-permissions-for-a-role/1036/3 "2018-07-24T11:53:14Z")

</div>

Thank you for your attention and quick reply.

Filed up an issue: [https://github.com/floragunncom/search-guard-kibana-plugin/issues/108](https://github.com/floragunncom/search-guard-kibana-plugin/issues/108)

Thanks.

> **···**
>
> On Tuesday, July 24, 2018 at 8:34:25 PM UTC+9, Jochen Kressin wrote:
> 
> > I believe this could indeed be a bug. Could you please post this issue on our GitHub Issue tracker:
> 
> > [https://github.com/floragunncom/search-guard-kibana-plugin/issues](https://github.com/floragunncom/search-guard-kibana-plugin/issues)
> 
> > 
> 
> > Thanks!
> > 
> > On Tuesday, July 24, 2018 at 10:57:04 AM UTC+2, Tomoyuki Saito wrote:
> > 
> > > Regular expression is available for specifying index-level permissions for a role [from this view](https://github.com/floragunncom/search-guard-kibana-plugin/blob/v6.3.1-14-beta-1/public/apps/configuration/sections/roles/views/edit.html).
> 
> > >
> 
> > > But, when setting a regular expression pattern including dots, the dots are replaced with ‘?’ in the method [submitAddIndex](https://github.com/floragunncom/search-guard-kibana-plugin/blob/v6.3.1-14-beta-1/public/apps/configuration/sections/roles/controller.js#L382).
> 
> > > Then, the pattern created after the replacement is not always a valid regular expression pattern.
> 
> > >
> 
> > > For example, when specifying ‘/._/’ for the index input, it is replaced with '/?_/’ after pushing the save button, where the pattern after the replacement is invalid.
> 
> > >
> 
> > > Can this be a bug?
> 
> > > Can we use dots in regular expressions?
> 
> > >
> 
> > > How about validating regular expressions before submitting?
> 
> > >
> 
> > > Versions
> 
> > >
> 
> > > Elasticserch version: 6.3.1
> 
> > > SeachGuard ES plugin version: 6-6.3.1-22.3
> 
> > > Kibana version: 6.3.1
> 
> > > SearchGuard Kibana plugin version: 6.3.1-14-beta-1
