# 6.5 XPack cross cluster documentation has lots of errors

**URL:** <https://discuss.elastic.co/t/6-5-xpack-cross-cluster-documentation-has-lots-of-errors/184149>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security, ccs-cross-cluster-search\
**Created:** [June 4, 2019, 10:08am UTC](https://discuss.elastic.co/t/6-5-xpack-cross-cluster-documentation-has-lots-of-errors/184149 "2019-06-04T10:08:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Johnnyhl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/johnnyhl/32/28069_2.png) [@Johnnyhl](https://discuss.elastic.co/u/Johnnyhl)\
**Post date:** [June 4, 2019, 10:08am UTC](https://discuss.elastic.co/t/6-5-xpack-cross-cluster-documentation-has-lots-of-errors/184149/1 "2019-06-04T10:08:06Z")

</div>

Hi,  
ES is a great product and effort overall I like it.

But it's not the first time I waste my time following the documentation example to finally figuring out it has lots of errors.

When trying to understand security over X cluster search, the documentation lacks testing it feels like:  
[https://www.elastic.co/guide/en/elastic-stack-overview/6.5/cross-cluster-configuring.html#\_example\_configuration\_of\_cross\_cluster\_search](https://www.elastic.co/guide/en/elastic-stack-overview/6.5/cross-cluster-configuring.html#_example_configuration_of_cross_cluster_search)

`On cluster one, this role does not need any special privileges:`  
It does need special privileges though. A new user with an empty role will get this:

`{"error":{"root_cause":[{"type":"security_exception","reason":"action [cluster:admin/xpack/security/token/create] is unauthorized for user [tony]"}],"`

So on cluster one the full role must be defined.

`On cluster two, this role allows the user to query local indices called logs- from a remote cluster:`

The logs-\* is not enough as the same error will show up:  
`{"error":{"root_cause":[{"type":"security_exception","reason":"action [cluster:admin/xpack/security/token/create] is unauthorized for user [tony]"}],"`

Putting `indices.names :["\*"] fixed it.

`With all of the above setup, the user alice is able to search indices in cluster two as follows:

GET two:logs-2017.04/\_search  
{  
"query": {  
"match\_all": {}  
}  
}  
`

The query endpoint is wrong, it should be:  
`GET cluster_two:...`

I finally got it to work by defining my own superuser role and I could not get it to just cross cluster search an index on a remote cluster from a local one with "read" and "read\_cross\_cluster" it just did not work.

I hope this will help to fix the doc or to tell me I did something wrong, open to either 🙂

Cheers!  
Johnny

---

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [June 7, 2019, 3:46am UTC](https://discuss.elastic.co/t/6-5-xpack-cross-cluster-documentation-has-lots-of-errors/184149/2 "2019-06-07T03:46:13Z")

</div>

The `cluster_two` / `two:` issue is indeed a docs error, but everything else works fine for me.

> [@Johnnyhl](#):
>
> {"error":{"root\_cause":[{"type":"security\_exception","reason":"action [cluster:admin/xpack/security/token/create] is unauthorized for user [tony]"}],"

I don't understand where this error is coming from. What are you trying to do that needs to create a token?

---

<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:** [July 5, 2019, 3:46am UTC](https://discuss.elastic.co/t/6-5-xpack-cross-cluster-documentation-has-lots-of-errors/184149/3 "2019-07-05T03:46:14Z")

</div>

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