# Permissions by index \_type

**URL:** <https://forum.search-guard.com/t/permissions-by-index-type/682>\
**Category:** Search Guard\
**Created:** [November 14, 2017, 4:17pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682 "2017-11-14T16:17:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![MASG](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MASG](https://forum.search-guard.com/u/MASG)\
**Post date:** [November 14, 2017, 4:17pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/1 "2017-11-14T16:17:34Z")

</div>

Hi Everyone

- ES 5.4.0 and SG 5-5.4.0-12

- Modules : SSL, Multitenancy, LDAP

- openjdk version “1.8.0\_131”

We have configured different roles that have read permissions on different types of one index

On indices idx-esb-\* we have defined several document \_types : api, proxy, etc

We defined one role that has read permissions on only one type of the index :

> DATAREADER\_API:

> cluster:

> ```
> - CLUSTER_COMPOSITE_OPS_RO
> 
> ```

> indices:

> ```
> 'idx-esb-*':
> 
> ```

> ```
> 'api':
> 
> ```

> ```
> - READ
> 
> ```

We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ‘’\_type = api’ (user datareader\_api having role DATAREADER\_API) :

> Error: Request to Elasticsearch failed: {“error”:{“root\_cause”:[{“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”}],“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”},“status”:403}

Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :

1. error:{root\_cause: [{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}],…}
2. reason:“no permissions for indices:data/read/search”
3. root\_cause:[{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}]
4. type:“security\_exception”
5. status:403

In Elasticsearch we get this error :

> 

> [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]

The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true

Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?

Thank you for your help

---

<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:** [November 14, 2017, 7:27pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/2 "2017-11-14T19:27:15Z")

</div>

Just to make sure I understood the problem completely:

- The user has access to the index, but only to one specific doc type

- The Dashboard contains visualizations from more than one doc type

- Expectation would be that the data from the accessible doc type is visualized

- And the other Visualizations which contain data from unaccessible document types are empty due to missing privileges

But, the Dashboard fails to load in its entirety with the said error message.

Is this correct? And, do you have Visualizations that contain data from more than one doc type? Means, accessible and unaccessible data in one Visualization?

> **···**
>
> On Tuesday, November 14, 2017 at 5:17:34 PM UTC+1, MASG wrote:
> 
> > 
> 
> > Hi Everyone
> 
> > 
> 
> > - ES 5.4.0 and SG 5-5.4.0-12
> 
> > - Modules : SSL, Multitenancy, LDAP
> 
> > - openjdk version “1.8.0\_131”
> 
> > 
> 
> > We have configured different roles that have read permissions on different types of one index
> 
> > 
> 
> > On indices idx-esb-\* we have defined several document \_types : api, proxy, etc
> 
> > We defined one role that has read permissions on only one type of the index :
> 
> > 
> 
> > > DATAREADER\_API:
> 
> > > cluster:
> 
> > > ```
> > > - CLUSTER_COMPOSITE_OPS_RO
> > > 
> > > ```
> 
> > > indices:
> 
> > > ```
> > > 'idx-esb-*':
> > > 
> > > ```
> 
> > > ```
> > > 'api':
> > > 
> > > ```
> 
> > > ```
> > > - READ
> > > 
> > > ```
> 
> > 
> 
> > We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ‘’\_type = api’ (user datareader\_api having role DATAREADER\_API) :
> 
> > 
> 
> > > Error: Request to Elasticsearch failed: {“error”:{“root\_cause”:[{“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”}],“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”},“status”:403}
> 
> > 
> 
> > Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :
> 
> > 1. error:{root\_cause: [{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}],…}
> > 2. reason:“no permissions for indices:data/read/search”
> > 3. root\_cause:[{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}]
> > 4. type:“security\_exception”
> > 5. status:403
> 
> > In Elasticsearch we get this error :
> 
> > >
> 
> > > [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]
> 
> > 
> 
> > The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true
> 
> > 
> 
> > Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?
> 
> > 
> 
> > Thank you for your help
> 
> >

---

<div class="post-metadata">

**Author:** ![MASG](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MASG](https://forum.search-guard.com/u/MASG)\
**Post date:** [November 15, 2017, 10:21am UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/3 "2017-11-15T10:21:43Z")

</div>

Hi Jochen,

Thank you for your reply. You seem to understand my issue

The dashboard objects use ‘idx-esb-\*’ index pattern, however the search and visualizations contained in that dashboard have filter on \_type field

Without going into the complexity of a dashboard : In Discovery Panel when I select idx-esb-\* index pattern, I get the error bellow (screenshot attached) even when I apply a filter on \_type field ‘\_type:api’. My question is why Kibana doesn’t retrieve documents with api \_type knowing that my user has READ rights on that \_type.

Why does it need ‘index-level perm’ and is there a way to retrieve that data without giving the role READ access on ALL index documents and types

 ![](https://us1.discourse-cdn.com/flex019/uploads/search_guard/original/1X/779282a25d41e18af8395d30a0eb5605312c8cbe.png)

> **···**
>
> On Tuesday, November 14, 2017 at 8:27:15 PM UTC+1, Jochen Kressin wrote:
> 
> > Just to make sure I understood the problem completely:
> > 
> > - The user has access to the index, but only to one specific doc type
> > - The Dashboard contains visualizations from more than one doc type
> 
> > - Expectation would be that the data from the accessible doc type is visualized
> 
> > - And the other Visualizations which contain data from unaccessible document types are empty due to missing privileges
> > 
> > But, the Dashboard fails to load in its entirety with the said error message.
> 
> > 
> 
> > Is this correct? And, do you have Visualizations that contain data from more than one doc type? Means, accessible and unaccessible data in one Visualization?
> 
> > On Tuesday, November 14, 2017 at 5:17:34 PM UTC+1, MASG wrote:
> > 
> > >
> 
> > > Hi Everyone
> 
> > >
> 
> > > - ES 5.4.0 and SG 5-5.4.0-12
> 
> > > - Modules : SSL, Multitenancy, LDAP
> 
> > > - openjdk version “1.8.0\_131”
> 
> > >
> 
> > > We have configured different roles that have read permissions on different types of one index
> 
> > >
> 
> > > On indices idx-esb-\* we have defined several document \_types : api, proxy, etc
> 
> > > We defined one role that has read permissions on only one type of the index :
> 
> > >
> 
> > > > DATAREADER\_API:
> 
> > > > cluster:
> 
> > > > ```
> > > > - CLUSTER_COMPOSITE_OPS_RO
> > > > 
> > > > ```
> 
> > > > indices:
> 
> > > > ```
> > > > 'idx-esb-*':
> > > > 
> > > > ```
> 
> > > > ```
> > > > 'api':
> > > > 
> > > > ```
> 
> > > > ```
> > > > - READ
> > > > 
> > > > ```
> 
> > >
> 
> > > We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ‘’\_type = api’ (user datareader\_api having role DATAREADER\_API) :
> 
> > >
> 
> > > > Error: Request to Elasticsearch failed: {“error”:{“root\_cause”:[{“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”}],“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”},“status”:403}
> 
> > >
> 
> > > Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :
> 
> > > 1. error:{root\_cause: [{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}],…}
> > > 2. reason:“no permissions for indices:data/read/search”
> > > 3. root\_cause:[{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}]
> > > 4. type:“security\_exception”
> > > 5. status:403
> 
> > > In Elasticsearch we get this error :
> 
> > > >
> 
> > > > [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]
> 
> > >
> 
> > > The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true
> 
> > >
> 
> > > Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?
> 
> > >
> 
> > > Thank you for your help
> 
> > >

---

<div class="post-metadata">

**Author:** ![MASG](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MASG](https://forum.search-guard.com/u/MASG)\
**Post date:** [November 15, 2017, 10:51am UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/4 "2017-11-15T10:51:19Z")

</div>

When I filter \_type=api in Discover panel, Kibana issues this request :

**POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch)**

{  
“index”: [“idx-esb-_“],  
“ignore\_unavailable”: true,  
“preference”: 1510740229217  
}{  
“version”: true,  
“size”: 500,  
“sort”: [{  
“@timestamp”: {  
“order”: “desc”,  
“unmapped\_type”: “boolean”  
}  
}],  
“query”: {  
“bool”: {  
“must”: [{  
“query\_string”: {  
“query”: “\_type:api”,  
“analyze\_wildcard”: true  
}  
},  
{  
“range”: {  
“@timestamp”: {  
“gte”: 1510700400000,  
“lte”: 1510786799999,  
“format”: “epoch\_millis”  
}  
}  
}],  
“must\_not”: []  
}  
},  
“\_source”: {  
“excludes”: []  
},  
“aggs”: {  
“2”: {  
“date\_histogram”: {  
“field”: “@timestamp”,  
“interval”: “30m”,  
“time\_zone”: “Europe/Berlin”,  
“min\_doc\_count”: 1  
}  
}  
},  
“stored\_fields”: [”_”],  
“script\_fields”: {

```
},
"docvalue_fields": ["@timestamp",
"elapsed_timestamp_start"],
"highlight": {
    "pre_tags": ["@kibana-highlighted-field@"],
    "post_tags": ["@/kibana-highlighted-field@"],
    "fields": {
        "*": {
            "highlight_query": {
                "bool": {
                    "must": [{
                        "query_string": {
                            "query": "_type:api",
                            "analyze_wildcard": true,
                            "all_fields": true
                        }
                    },
                    {
                        "range": {
                            "@timestamp": {
                                "gte": 1510700400000,
                                "lte": 1510786799999,
                                "format": "epoch_millis"
                            }
                        }
                    }],
                    "must_not": []
                }
            }
        }
    },
    "fragment_size": 2147483647
} 

```

}

Response code : 200 OK

Response body :

{  
“responses”: [{  
“error”: {  
“root\_cause”: [{  
“type”: “security\_exception”,  
“reason”: “no permissions for indices:data/read/search”  
}],  
“type”: “security\_exception”,  
“reason”: “no permissions for indices:data/read/search”  
},  
“status”: 403  
}]  
}

> **···**
>
> On Wednesday, November 15, 2017 at 11:21:43 AM UTC+1, MASG wrote:
> 
> > Hi Jochen,
> 
> > Thank you for your reply. You seem to understand my issue
> 
> > 
> 
> > The dashboard objects use ‘idx-esb-\*’ index pattern, however the search and visualizations contained in that dashboard have filter on \_type field
> 
> > 
> 
> > Without going into the complexity of a dashboard : In Discovery Panel when I select idx-esb-\* index pattern, I get the error bellow (screenshot attached) even when I apply a filter on \_type field ‘\_type:api’. My question is why Kibana doesn’t retrieve documents with api \_type knowing that my user has READ rights on that \_type.
> 
> > 
> 
> > Why does it need ‘index-level perm’ and is there a way to retrieve that data without giving the role READ access on ALL index documents and types
> 
> > 
> 
> > On Tuesday, November 14, 2017 at 8:27:15 PM UTC+1, Jochen Kressin wrote:
> > 
> > > Just to make sure I understood the problem completely:
> > > 
> > > - The user has access to the index, but only to one specific doc type
> > > - The Dashboard contains visualizations from more than one doc type
> 
> > > - Expectation would be that the data from the accessible doc type is visualized
> 
> > > - And the other Visualizations which contain data from unaccessible document types are empty due to missing privileges
> > > 
> > > But, the Dashboard fails to load in its entirety with the said error message.
> 
> > >
> 
> > > Is this correct? And, do you have Visualizations that contain data from more than one doc type? Means, accessible and unaccessible data in one Visualization?
> 
> > > On Tuesday, November 14, 2017 at 5:17:34 PM UTC+1, MASG wrote:
> > > 
> > > >
> 
> > > > Hi Everyone
> 
> > > >
> 
> > > > - ES 5.4.0 and SG 5-5.4.0-12
> 
> > > > - Modules : SSL, Multitenancy, LDAP
> 
> > > > - openjdk version “1.8.0\_131”
> 
> > > >
> 
> > > > We have configured different roles that have read permissions on different types of one index
> 
> > > >
> 
> > > > On indices idx-esb-\* we have defined several document \_types : api, proxy, etc
> 
> > > > We defined one role that has read permissions on only one type of the index :
> 
> > > >
> 
> > > > > DATAREADER\_API:
> 
> > > > > cluster:
> 
> > > > > ```
> > > > > - CLUSTER_COMPOSITE_OPS_RO
> > > > > 
> > > > > ```
> 
> > > > > indices:
> 
> > > > > ```
> > > > > 'idx-esb-*':
> > > > > 
> > > > > ```
> 
> > > > > ```
> > > > > 'api':
> > > > > 
> > > > > ```
> 
> > > > > ```
> > > > > - READ
> > > > > 
> > > > > ```
> 
> > > >
> 
> > > > We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ‘’\_type = api’ (user datareader\_api having role DATAREADER\_API) :
> 
> > > >
> 
> > > > > Error: Request to Elasticsearch failed: {“error”:{“root\_cause”:[{“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”}],“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”},“status”:403}
> 
> > > >
> 
> > > > Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :
> 
> > > > 1. error:{root\_cause: [{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}],…}
> > > > 2. reason:“no permissions for indices:data/read/search”
> > > > 3. root\_cause:[{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}]
> > > > 4. type:“security\_exception”
> > > > 5. status:403
> 
> > > > In Elasticsearch we get this error :
> 
> > > > >
> 
> > > > > [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]
> 
> > > >
> 
> > > > The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true
> 
> > > >
> 
> > > > Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?
> 
> > > >
> 
> > > > Thank you for your help
> 
> > > >

---

<div class="post-metadata">

**Author:** ![MASG](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@MASG](https://forum.search-guard.com/u/MASG)\
**Post date:** [November 16, 2017, 1:14pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/5 "2017-11-16T13:14:49Z")

</div>

Hi all,

Any help ?

Did I miss something on index types based permissions ?

🙂

> **···**
>
> On Wednesday, November 15, 2017 at 11:51:19 AM UTC+1, MASG wrote:
> 
> > When I filter \_type=api in Discover panel, Kibana issues this request :
> 
> > 
> 
> > **POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch)**
> 
> > {  
> > “index”: [“idx-esb-_“],  
> > “ignore\_unavailable”: true,  
> > “preference”: 1510740229217  
> > }{  
> > “version”: true,  
> > “size”: 500,  
> > “sort”: [{  
> > “@timestamp”: {  
> > “order”: “desc”,  
> > “unmapped\_type”: “boolean”  
> > }  
> > }],  
> > “query”: {  
> > “bool”: {  
> > “must”: [{  
> > “query\_string”: {  
> > “query”: “\_type:api”,  
> > “analyze\_wildcard”: true  
> > }  
> > },  
> > {  
> > “range”: {  
> > “@timestamp”: {  
> > “gte”: 1510700400000,  
> > “lte”: 1510786799999,  
> > “format”: “epoch\_millis”  
> > }  
> > }  
> > }],  
> > “must\_not”: []  
> > }  
> > },  
> > “\_source”: {  
> > “excludes”: []  
> > },  
> > “aggs”: {  
> > “2”: {  
> > “date\_histogram”: {  
> > “field”: “@timestamp”,  
> > “interval”: “30m”,  
> > “time\_zone”: “Europe/Berlin”,  
> > “min\_doc\_count”: 1  
> > }  
> > }  
> > },  
> > “stored\_fields”: [”_”],  
> > “script\_fields”: {
> > 
> > ```
> > },
> > "docvalue_fields": ["@timestamp",
> > "elapsed_timestamp_start"],
> > "highlight": {
> > "pre_tags": ["@kibana-highlighted-field@"],
> > "post_tags": ["@/kibana-highlighted-field@"],
> > "fields": {
> > "*": {
> > "highlight_query": {
> > "bool": {
> > "must": [{
> > "query_string": {
> > "query": "_type:api",
> > "analyze_wildcard": true,
> > "all_fields": true
> > }
> > },
> > {
> > "range": {
> > "@timestamp": {
> > "gte": 1510700400000,
> > "lte": 1510786799999,
> > "format": "epoch_millis"
> > }
> > }
> > }],
> > "must_not": []
> > }
> > }
> > }
> > },
> > "fragment_size": 2147483647
> > } 
> > 
> > ```
> 
> > }
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > Response code : 200 OK
> 
> > Response body :
> 
> > {  
> > “responses”: [{  
> > “error”: {  
> > “root\_cause”: [{  
> > “type”: “security\_exception”,  
> > “reason”: “no permissions for indices:data/read/search”  
> > }],  
> > “type”: “security\_exception”,  
> > “reason”: “no permissions for indices:data/read/search”  
> > },  
> > “status”: 403  
> > }]  
> > }
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > On Wednesday, November 15, 2017 at 11:21:43 AM UTC+1, MASG wrote:
> > 
> > > Hi Jochen,
> 
> > > Thank you for your reply. You seem to understand my issue
> 
> > >
> 
> > > The dashboard objects use ‘idx-esb-\*’ index pattern, however the search and visualizations contained in that dashboard have filter on \_type field
> 
> > >
> 
> > > Without going into the complexity of a dashboard : In Discovery Panel when I select idx-esb-\* index pattern, I get the error bellow (screenshot attached) even when I apply a filter on \_type field ‘\_type:api’. My question is why Kibana doesn’t retrieve documents with api \_type knowing that my user has READ rights on that \_type.
> 
> > >
> 
> > > Why does it need ‘index-level perm’ and is there a way to retrieve that data without giving the role READ access on ALL index documents and types
> 
> > >
> 
> > > On Tuesday, November 14, 2017 at 8:27:15 PM UTC+1, Jochen Kressin wrote:
> > > 
> > > > Just to make sure I understood the problem completely:
> > > > 
> > > > - The user has access to the index, but only to one specific doc type
> > > > - The Dashboard contains visualizations from more than one doc type
> 
> > > > - Expectation would be that the data from the accessible doc type is visualized
> 
> > > > - And the other Visualizations which contain data from unaccessible document types are empty due to missing privileges
> > > > 
> > > > But, the Dashboard fails to load in its entirety with the said error message.
> 
> > > >
> 
> > > > Is this correct? And, do you have Visualizations that contain data from more than one doc type? Means, accessible and unaccessible data in one Visualization?
> 
> > > > On Tuesday, November 14, 2017 at 5:17:34 PM UTC+1, MASG wrote:
> > > > 
> > > > >
> 
> > > > > Hi Everyone
> 
> > > > >
> 
> > > > > - ES 5.4.0 and SG 5-5.4.0-12
> 
> > > > > - Modules : SSL, Multitenancy, LDAP
> 
> > > > > - openjdk version “1.8.0\_131”
> 
> > > > >
> 
> > > > > We have configured different roles that have read permissions on different types of one index
> 
> > > > >
> 
> > > > > On indices idx-esb-\* we have defined several document \_types : api, proxy, etc
> 
> > > > > We defined one role that has read permissions on only one type of the index :
> 
> > > > >
> 
> > > > > > DATAREADER\_API:
> 
> > > > > > cluster:
> 
> > > > > > ```
> > > > > > - CLUSTER_COMPOSITE_OPS_RO
> > > > > > 
> > > > > > ```
> 
> > > > > > indices:
> 
> > > > > > ```
> > > > > > 'idx-esb-*':
> > > > > > 
> > > > > > ```
> 
> > > > > > ```
> > > > > > 'api':
> > > > > > 
> > > > > > ```
> 
> > > > > > ```
> > > > > > - READ
> > > > > > 
> > > > > > ```
> 
> > > > >
> 
> > > > > We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ‘’\_type = api’ (user datareader\_api having role DATAREADER\_API) :
> 
> > > > >
> 
> > > > > > Error: Request to Elasticsearch failed: {“error”:{“root\_cause”:[{“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”}],“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”},“status”:403}
> 
> > > > >
> 
> > > > > Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :
> 
> > > > > 1. error:{root\_cause: [{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}],…}
> > > > > 2. reason:“no permissions for indices:data/read/search”
> > > > > 3. root\_cause:[{type: “security\_exception”, reason: “no permissions for indices:data/read/search”}]
> > > > > 4. type:“security\_exception”
> > > > > 5. status:403
> 
> > > > > In Elasticsearch we get this error :
> 
> > > > > >
> 
> > > > > > [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]
> 
> > > > >
> 
> > > > > The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true
> 
> > > > >
> 
> > > > > Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?
> 
> > > > >
> 
> > > > > Thank you for your help
> 
> > > > >

---

<div class="post-metadata">

**Author:** ![searchguard\_google\_group](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.search-guard.com/searchguard_google_group/32/462_2.png) [@searchguard\_google\_group](https://forum.search-guard.com/u/searchguard_google_group)\
**Post date:** [November 16, 2017, 5:10pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/6 "2017-11-16T17:10:55Z")

</div>

I will into this, pls. stay tuned

> **···**
>
> > Am 16.11.2017 um 14:14 schrieb MASG \<twitter@rise-it.co.uk\>:
> > 
> > Hi all,
> > 
> > Any help ?  
> > Did I miss something on index types based permissions ?
> > 
> > 🙂
> > 
> > On Wednesday, November 15, 2017 at 11:51:19 AM UTC+1, MASG wrote:  
> > When I filter \_type=api in Discover panel, Kibana issues this request :
> > 
> > POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch)  
> > {
> > 
> > "index": ["idx-esb-\*"],
> > 
> > "ignore\_unavailable": true,
> > 
> > "preference": 1510740229217  
> > }{
> > 
> > "version": true,
> > 
> > "size": 500,
> > 
> > "sort": [{
> > 
> > "@timestamp": {
> > 
> > "order": "desc",
> > 
> > "unmapped\_type": "boolean"
> > 
> > }
> > 
> > }],
> > 
> > "query": {
> > 
> > "bool": {
> > 
> > "must": [{
> > 
> > "query\_string": {
> > 
> > "query": "\_type:api",
> > 
> > "analyze\_wildcard": true
> > 
> > }
> > 
> > },
> > 
> > {
> > 
> > "range": {
> > 
> > "@timestamp": {
> > 
> > "gte": 1510700400000,
> > 
> > "lte": 1510786799999,
> > 
> > "format": "epoch\_millis"
> > 
> > }
> > 
> > }
> > 
> > }],
> > 
> > "must\_not":
> > 
> > }
> > 
> > },
> > 
> > "\_source": {
> > 
> > "excludes":
> > 
> > },
> > 
> > "aggs": {
> > 
> > "2": {
> > 
> > "date\_histogram": {
> > 
> > "field": "@timestamp",
> > 
> > "interval": "30m",
> > 
> > "time\_zone": "Europe/Berlin",
> > 
> > "min\_doc\_count": 1
> > 
> > }
> > 
> > }
> > 
> > },
> > 
> > "stored\_fields": ["\*"],
> > 
> > "script\_fields": {
> > 
> > },
> > 
> > "docvalue\_fields": ["@timestamp",
> > 
> > "elapsed\_timestamp\_start"],
> > 
> > "highlight": {
> > 
> > "pre\_tags": ["@kibana-highlighted-field@"],
> > 
> > "post\_tags": ["@/kibana-highlighted-field@"],
> > 
> > "fields": {
> > 
> > "\*": {
> > 
> > "highlight\_query": {
> > 
> > "bool": {
> > 
> > "must": [{
> > 
> > "query\_string": {
> > 
> > "query": "\_type:api",
> > 
> > "analyze\_wildcard": true,
> > 
> > "all\_fields": true
> > 
> > }
> > 
> > },
> > 
> > {
> > 
> > "range": {
> > 
> > "@timestamp": {
> > 
> > "gte": 1510700400000,
> > 
> > "lte": 1510786799999,
> > 
> > "format": "epoch\_millis"
> > 
> > }
> > 
> > }
> > 
> > }],
> > 
> > "must\_not":
> > 
> > }
> > 
> > }
> > 
> > }
> > 
> > },
> > 
> > "fragment\_size": 2147483647
> > 
> > }  
> > }
> > 
> > Response code : 200 OK  
> > Response body :  
> > {
> > 
> > "responses": [{
> > 
> > "error": {
> > 
> > "root\_cause": [{
> > 
> > "type": "security\_exception",
> > 
> > "reason": "no permissions for indices:data/read/search"
> > 
> > }],
> > 
> > "type": "security\_exception",
> > 
> > "reason": "no permissions for indices:data/read/search"
> > 
> > },
> > 
> > "status": 403
> > 
> > }]  
> > }
> > 
> > On Wednesday, November 15, 2017 at 11:21:43 AM UTC+1, MASG wrote:  
> > Hi Jochen,
> > 
> > Thank you for your reply. You seem to understand my issue
> > 
> > The dashboard objects use 'idx-esb-\*' index pattern, however the search and visualizations contained in that dashboard have filter on \_type field
> > 
> > Without going into the complexity of a dashboard : In Discovery Panel when I select idx-esb-\* index pattern, I get the error bellow (screenshot attached) even when I apply a filter on \_type field '\_type:api'. My question is why Kibana doesn't retrieve documents with api \_type knowing that my user has READ rights on that \_type.
> > 
> > Why does it need 'index-level perm' and is there a way to retrieve that data without giving the role READ access on ALL index documents and types
> > 
> > On Tuesday, November 14, 2017 at 8:27:15 PM UTC+1, Jochen Kressin wrote:  
> > Just to make sure I understood the problem completely:
> > 
> > \* The user has access to the index, but only to one specific doc type  
> > \* The Dashboard contains visualizations from more than one doc type  
> > \* Expectation would be that the data from the accessible doc type is visualized  
> > \* And the other Visualizations which contain data from unaccessible document types are empty due to missing privileges
> > 
> > But, the Dashboard fails to load in its entirety with the said error message.
> > 
> > Is this correct? And, do you have Visualizations that contain data from more than one doc type? Means, accessible and unaccessible data in one Visualization?
> > 
> > On Tuesday, November 14, 2017 at 5:17:34 PM UTC+1, MASG wrote:
> > 
> > Hi Everyone
> > 
> > \* ES 5.4.0 and SG 5-5.4.0-12  
> > \* Modules : SSL, Multitenancy, LDAP  
> > \* openjdk version "1.8.0\_131"
> > 
> > We have configured different roles that have read permissions on different types of one index
> > 
> > On indices idx-esb-\* we have defined several document \_types : api, proxy, etc  
> > We defined one role that has read permissions on only one type of the index :
> > 
> > DATAREADER\_API:  
> > &nbsp;&nbsp;cluster:  
> > &nbsp;&nbsp;&nbsp;&nbsp;- CLUSTER\_COMPOSITE\_OPS\_RO  
> > &nbsp;&nbsp;indices:  
> > &nbsp;&nbsp;&nbsp;&nbsp;'idx-esb-\*':  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'api':  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;- READ
> > 
> > We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ''\_type = api' (user datareader\_api having role DATAREADER\_API) :
> > 
> > Error: Request to Elasticsearch failed: {"error":{"root\_cause":[{"type":"security\_exception","reason":"no permissions for indices:data/read/search"}],"type":"security\_exception","reason":"no permissions for indices:data/read/search"},"status":403}
> > 
> > Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :  
> > &nbsp;&nbsp;• error:{root\_cause: [{type: "security\_exception", reason: "no permissions for indices:data/read/search"}],…}  
> > &nbsp;&nbsp;&nbsp;&nbsp;• reason:"no permissions for indices:data/read/search"  
> > &nbsp;&nbsp;&nbsp;&nbsp;• root\_cause:[{type: "security\_exception", reason: "no permissions for indices:data/read/search"}]  
> > &nbsp;&nbsp;&nbsp;&nbsp;• type:"security\_exception"  
> > &nbsp;&nbsp;• status:403  
> > In Elasticsearch we get this error :
> > 
> > [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]
> > 
> > The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true
> > 
> > Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?
> > 
> > Thank you for your help
> > 
> > --  
> > 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+unsubscribe@googlegroups.com.  
> > To post to this group, send email to search-guard@googlegroups.com.  
> > To view this discussion on the web visit [https://groups.google.com/d/msgid/search-guard/e63ab75d-0b9e-4643-8cdb-adf4f2197586%40googlegroups.com\](https://groups.google.com/d/msgid/search-guard/e63ab75d-0b9e-4643-8cdb-adf4f2197586%40googlegroups.com%5C).  
> > For more options, visit [https://groups.google.com/d/optout\](https://groups.google.com/d/optout%5C).

---

<div class="post-metadata">

**Author:** ![Yash](https://avatars.discourse-cdn.com/v4/letter/y/f17d59/32.png) [@Yash](https://forum.search-guard.com/u/Yash)\
**Post date:** [December 11, 2017, 9:28pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/7 "2017-12-11T21:28:44Z")

</div>

Hi Team,

Even I have the same issue when user tries to access timelion plugin. The users are restricted based on the doc type. When I checked the audit-log for the users I could see missing privileges for “indices:data/read/get” and “indices:data/read/search”.

But the permission are enabled for the user for both ?kibana\* and elasticsearch index.

I experience this issue only when I access timilion but discover and other visualization are working.

ES : 5.5

SG 5.5

Kibana multi-tenancy enabled.

---

<div class="post-metadata">

**Author:** ![Zouari\_Rami](https://avatars.discourse-cdn.com/v4/letter/z/258eb7/32.png) [@Zouari\_Rami](https://forum.search-guard.com/u/Zouari_Rami)\
**Post date:** [January 17, 2018, 8:51pm UTC](https://forum.search-guard.com/t/permissions-by-index-type/682/8 "2018-01-17T20:51:57Z")

</div>

Hello,

I have exactly the same problem. Did you fix the issue please?

> **···**
>
> Le jeudi 16 novembre 2017 18:10:57 UTC+1, Search Guard a écrit :
> 
> > I will into this, pls. stay tuned
> > 
> > > Am 16.11.2017 um 14:14 schrieb MASG [twi...@rise-it.co.uk](mailto:twi...@rise-it.co.uk):
> > 
> > > Hi all,
> > 
> > > Any help ?
> > 
> > > Did I miss something on index types based permissions ?
> > 
> > > 🙂
> > 
> > > On Wednesday, November 15, 2017 at 11:51:19 AM UTC+1, MASG wrote:
> > 
> > > When I filter \_type=api in Discover panel, Kibana issues this request :
> > 
> > > POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch)
> > 
> > > {
> > 
> > > “index”: [“idx-esb-\*”],
> > 
> > > “ignore\_unavailable”: true,
> > 
> > > “preference”: 1510740229217
> > 
> > > }{
> > 
> > > “version”: true,
> > 
> > > “size”: 500,
> > 
> > > “sort”: [{
> > 
> > > “@timestamp”: {
> > 
> > > “order”: “desc”,
> > 
> > > “unmapped\_type”: “boolean”
> > 
> > > }
> > 
> > > }],
> > 
> > > “query”: {
> > 
> > > “bool”: {
> > 
> > > “must”: [{
> > 
> > > “query\_string”: {
> > 
> > > “query”: “\_type:api”,
> > 
> > > “analyze\_wildcard”: true
> > 
> > > }
> > 
> > > },
> > 
> > > {
> > 
> > > “range”: {
> > 
> > > “@timestamp”: {
> > 
> > > “gte”: 1510700400000,
> > 
> > > “lte”: 1510786799999,
> > 
> > > “format”: “epoch\_millis”
> > 
> > > }
> > 
> > > }
> > 
> > > }],
> > 
> > > “must\_not”:
> > 
> > > }
> > 
> > > },
> > 
> > > “\_source”: {
> > 
> > > “excludes”:
> > 
> > > },
> > 
> > > “aggs”: {
> > 
> > > “2”: {
> > 
> > > “date\_histogram”: {
> > 
> > > “field”: “@timestamp”,
> > 
> > > “interval”: “30m”,
> > 
> > > “time\_zone”: “Europe/Berlin”,
> > 
> > > “min\_doc\_count”: 1
> > 
> > > }
> > 
> > > }
> > 
> > > },
> > 
> > > “stored\_fields”: [“\*”],
> > 
> > > “script\_fields”: {
> > 
> > > },
> > 
> > > “docvalue\_fields”: [“@timestamp”,
> > 
> > > “elapsed\_timestamp\_start”],
> > 
> > > “highlight”: {
> > 
> > > “pre\_tags”: [“@kibana-highlighted-field@”],
> > 
> > > “post\_tags”: [“@/kibana-highlighted-field@”],
> > 
> > > “fields”: {
> > 
> > > “\*”: {
> > 
> > > “highlight\_query”: {
> > 
> > > “bool”: {
> > 
> > > “must”: [{
> > 
> > > “query\_string”: {
> > 
> > > “query”: “\_type:api”,
> > 
> > > “analyze\_wildcard”: true,
> > 
> > > “all\_fields”: true
> > 
> > > }
> > 
> > > },
> > 
> > > {
> > 
> > > “range”: {
> > 
> > > “@timestamp”: {
> > 
> > > “gte”: 1510700400000,
> > 
> > > “lte”: 1510786799999,
> > 
> > > “format”: “epoch\_millis”
> > 
> > > }
> > 
> > > }
> > 
> > > }],
> > 
> > > “must\_not”:
> > 
> > > }
> > 
> > > }
> > 
> > > }
> > 
> > > },
> > 
> > > “fragment\_size”: 2147483647
> > 
> > > }  
> > > }
> > 
> > > Response code : 200 OK
> > 
> > > Response body :
> > 
> > > {
> > 
> > > “responses”: [{
> > 
> > > “error”: {
> > 
> > > “root\_cause”: [{
> > 
> > > “type”: “security\_exception”,
> > 
> > > “reason”: “no permissions for indices:data/read/search”
> > 
> > > }],
> > 
> > > “type”: “security\_exception”,
> > 
> > > “reason”: “no permissions for indices:data/read/search”
> > 
> > > },
> > 
> > > “status”: 403
> > 
> > > }]
> > 
> > > }
> > 
> > > On Wednesday, November 15, 2017 at 11:21:43 AM UTC+1, MASG wrote:
> > 
> > > Hi Jochen,
> > 
> > > Thank you for your reply. You seem to understand my issue
> > 
> > > The dashboard objects use ‘idx-esb-\*’ index pattern, however the search and visualizations contained in that dashboard have filter on \_type field
> > 
> > > Without going into the complexity of a dashboard : In Discovery Panel when I select idx-esb-\* index pattern, I get the error bellow (screenshot attached) even when I apply a filter on \_type field ‘\_type:api’. My question is why Kibana doesn’t retrieve documents with api \_type knowing that my user has READ rights on that \_type.
> > 
> > > Why does it need ‘index-level perm’ and is there a way to retrieve that data without giving the role READ access on ALL index documents and types
> > 
> > > On Tuesday, November 14, 2017 at 8:27:15 PM UTC+1, Jochen Kressin wrote:
> > 
> > > Just to make sure I understood the problem completely:
> > 
> > > - The user has access to the index, but only to one specific doc type
> > 
> > > - The Dashboard contains visualizations from more than one doc type
> > 
> > > - Expectation would be that the data from the accessible doc type is visualized
> > 
> > > - And the other Visualizations which contain data from unaccessible document types are empty due to missing privileges
> > 
> > > But, the Dashboard fails to load in its entirety with the said error message.
> > 
> > > Is this correct? And, do you have Visualizations that contain data from more than one doc type? Means, accessible and unaccessible data in one Visualization?
> > 
> > > On Tuesday, November 14, 2017 at 5:17:34 PM UTC+1, MASG wrote:
> > 
> > > Hi Everyone
> > 
> > > - ES 5.4.0 and SG 5-5.4.0-12
> > 
> > > - Modules : SSL, Multitenancy, LDAP
> > 
> > > - openjdk version “1.8.0\_131”
> > 
> > > We have configured different roles that have read permissions on different types of one index
> > 
> > > On indices idx-esb-\* we have defined several document \_types : api, proxy, etc
> > 
> > > We defined one role that has read permissions on only one type of the index :
> > 
> > > DATAREADER\_API:
> > 
> > > cluster:
> > 
> > > ```
> > > - CLUSTER_COMPOSITE_OPS_RO
> > > 
> > > ```
> > 
> > > indices:
> > 
> > > ```
> > > 'idx-esb-*':
> > > 
> > > ```
> > 
> > > ```
> > > 'api':
> > > 
> > > ```
> > 
> > > ```
> > > - READ
> > > 
> > > ```
> > 
> > > We get this error when opening Kibana Dashbord that has visualizations on all data of idx-esb-\* , no data is loaded even data from ‘’\_type = api’ (user datareader\_api having role DATAREADER\_API) :
> > 
> > > Error: Request to Elasticsearch failed: {“error”:{“root\_cause”:[{“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”}],“type”:“security\_exception”,“reason”:“no permissions for indices:data/read/search”},“status”:403}
> > 
> > > Request issued by Kibana : POST [https://kibana/elasticsearch/\_msearch](https://kibana/elasticsearch/_msearch) retrieves status code 200 OK with response body :
> > 
> > > ```
> > > • error:{root_cause: [{type: "security_exception", reason: "no permissions for indices:data/read/search"}],…}
> > > 
> > > ```
> > 
> > > ```
> > > • reason:"no permissions for indices:data/read/search"
> > > 
> > > ```
> > 
> > > ```
> > > • root_cause:[{type: "security_exception", reason: "no permissions for indices:data/read/search"}]
> > > 
> > > ```
> > 
> > > ```
> > > • type:"security_exception"
> > > 
> > > ```
> > 
> > > ```
> > > • status:403
> > > 
> > > ```
> > 
> > > In Elasticsearch we get this error :
> > 
> > > [INFO][c.f.s.c.PrivilegesEvaluator] No index-level perm match for User [name=datareader\_api, roles=] [IndexType [index=idx-esb-2017-s2, type=\*]] [Action [indices:data/read/search]] [RolesChecked [DATAREADER\_API]]
> > 
> > > The user has read permissions only on api \_type but the dashboad fails to load data with this \_type whereas we have enabled : searchguard.dynamic.kibana.do\_not\_fail\_on\_forbidden : true
> > 
> > > Is there a way to retrieve data from document types on which the user has role permissions without giving him data read access to the wole index ?
> > > 
> > > Thank you for your help
> > 
> > > –  
> > > 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](mailto:search-guard...@googlegroups.com).
> > 
> > > To post to this group, send email to [search...@googlegroups.com](mailto:search...@googlegroups.com).
> > 
> > > To view this discussion on the web visit [https://groups.google.com/d/msgid/search-guard/e63ab75d-0b9e-4643-8cdb-adf4f2197586%40googlegroups.com](https://groups.google.com/d/msgid/search-guard/e63ab75d-0b9e-4643-8cdb-adf4f2197586%40googlegroups.com).
> > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
