# Search access for Custom Role

**URL:** <https://community.graylog.org/t/search-access-for-custom-role/4595>\
**Category:** Graylog Central (peer support)\
**Created:** [March 16, 2018, 9:33am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595 "2018-03-16T09:33:30Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![v\_2nas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/v_2nas/32/268_2.png) [@v\_2nas](https://community.graylog.org/u/v_2nas)\
**Post date:** [March 16, 2018, 9:33am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/1 "2018-03-16T09:33:30Z")

</div>

Hi Folks,

I have created a custom role where by users can access read-only dashboards however I don’t see an option where I can grant access to Search function.

Is it possible to grant Search function or is it only available to admins?

Thanks,  
navdeep

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [March 16, 2018, 10:07am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/2 "2018-03-16T10:07:14Z")

</div>

> <https://github.com/Graylog2/graylog2-server/blob/2.4.3/graylog2-server/src/main/java/org/graylog2/shared/security/RestPermissions.java#L112-L114>

---

<div class="post-metadata">

**Author:** ![v\_2nas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/v_2nas/32/268_2.png) [@v\_2nas](https://community.graylog.org/u/v_2nas)\
**Post date:** [March 19, 2018, 1:41am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/3 "2018-03-19T01:41:10Z")

</div>

kindly shed some light with brief on it. I am not sure what exactly to do with the provided info.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [March 19, 2018, 7:36am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/4 "2018-03-19T07:36:13Z")

</div>

These are the permissions required to use the universal search.

---

<div class="post-metadata">

**Author:** ![v\_2nas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/v_2nas/32/268_2.png) [@v\_2nas](https://community.graylog.org/u/v_2nas)\
**Post date:** [March 19, 2018, 8:07am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/5 "2018-03-19T08:07:54Z")

</div>

so what i need to do exactly? i find the source file and change those lines?

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [March 19, 2018, 8:56am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/6 "2018-03-19T08:56:57Z")

</div>

You’ll have to create a role which has these permissions if you want the users to be able to use the universal search (i. e. not inside a stream).

See [http://docs.graylog.org/en/2.4/pages/users\_and\_roles.html](http://docs.graylog.org/en/2.4/pages/users_and_roles.html) for details.

Ideally, the dashboard widgets would’ve been created from a query to a stream which the users already have access to. Then the users wouldn’t require permission to use the universal search.

---

<div class="post-metadata">

**Author:** ![v\_2nas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/v_2nas/32/268_2.png) [@v\_2nas](https://community.graylog.org/u/v_2nas)\
**Post date:** [March 20, 2018, 2:38am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/7 "2018-03-20T02:38:11Z")

</div>

I have used custom roles but i don’t see an option to make search available to the users. If readers group user try to replay the search, they get gorilla with banana (404) page.

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [March 20, 2018, 8:03am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/8 "2018-03-20T08:03:13Z")

</div>

Please refer to the aforementioned chapter in the Graylog documentation.

---

<div class="post-metadata">

**Author:** ![v\_2nas](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/v_2nas/32/268_2.png) [@v\_2nas](https://community.graylog.org/u/v_2nas)\
**Post date:** [March 21, 2018, 2:59am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/9 "2018-03-21T02:59:29Z")

</div>

Hi Jochen,

I got it, i have provisioned the new role and it works fine. Just a quick question, what does read\_only keyword for?

sudo curl -v -XPOST -u admin:graylog -H ‘Content-Type: application/json’ ‘[https://graylog.domain.com:9000/api/roles](https://graylog.domain.com:9000/api/roles)’ --insecure -d ‘{“read\_only”: false,“permissions”: [“savedsearches:read”,“searches:relative”,“searches:absolute”,“searches:keyword”],“name”: “Allow Searches”,“description”: “Permission to Search on Graylog nodes”}’

---

<div class="post-metadata">

**Author:** ![jochen](https://sea2.discourse-cdn.com/flex016/user_avatar/community.graylog.org/jochen/32/8_2.png) [@jochen](https://community.graylog.org/u/jochen)\
**Post date:** [March 21, 2018, 8:24am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/10 "2018-03-21T08:24:40Z")

</div>

`read_only` marks accounts which cannot be modified online, e. g. the administrator account.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/graylog/original/3X/c/7/c7c09c6b5099570133d6502b83f50ba4430de5b6.png) [@system](https://community.graylog.org/u/system)\
**Post date:** [April 4, 2018, 8:24am UTC](https://community.graylog.org/t/search-access-for-custom-role/4595/11 "2018-04-04T08:24:43Z")

</div>

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