# Kibana / Security (X-Pack) - permissions

**URL:** <https://discuss.elastic.co/t/kibana-security-x-pack-permissions/104777>\
**Category:** Kibana\
**Created:** [October 21, 2017, 8:19pm UTC](https://discuss.elastic.co/t/kibana-security-x-pack-permissions/104777 "2017-10-21T20:19:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)\
**Post date:** [October 21, 2017, 8:19pm UTC](https://discuss.elastic.co/t/kibana-security-x-pack-permissions/104777/1 "2017-10-21T20:19:22Z")

</div>

I'm trying to follow [Configuring Role-based Access Control | X-Pack for the Elastic Stack [5.6] | Elastic](https://www.elastic.co/guide/en/x-pack/current/authorization.html)...

How can one specify a following permissions

- specific \_type
- if certain field _exists_

Please advise.

---

<div class="post-metadata">

**Author:** ![tsullivan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tsullivan/32/31077_2.png) [@tsullivan](https://discuss.elastic.co/u/tsullivan)\
**Post date:** [October 24, 2017, 6:03pm UTC](https://discuss.elastic.co/t/kibana-security-x-pack-permissions/104777/2 "2017-10-24T18:03:07Z")

</div>

You can create permissions for a role on documents that match a certain query, which is usually referred to as "Document Level Security" and requires at least a Platinum-level X-Pack license.

See: [https://www.elastic.co/guide/en/x-pack/current/field-and-document-access-control.html#document-level-security](https://www.elastic.co/guide/en/x-pack/current/field-and-document-access-control.html#document-level-security)

Permissions on a specific type would require a `term` query on the `_type` field [1], and permissions on if a field exists would use an `exists` query [2]

[1] [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-term-query.html)  
[2] [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-exists-query.html)

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 21, 2017, 6:03pm UTC](https://discuss.elastic.co/t/kibana-security-x-pack-permissions/104777/3 "2017-11-21T18:03:49Z")

</div>

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