# Curator not able to authenticate elasticSearch, with X-Pack

**URL:** <https://discuss.elastic.co/t/curator-not-able-to-authenticate-elasticsearch-with-x-pack/132206>\
**Category:** Elasticsearch\
**Created:** [May 16, 2018, 8:04pm UTC](https://discuss.elastic.co/t/curator-not-able-to-authenticate-elasticsearch-with-x-pack/132206 "2018-05-16T20:04:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sundeepm](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@sundeepm](https://discuss.elastic.co/u/sundeepm)\
**Post date:** [May 16, 2018, 8:04pm UTC](https://discuss.elastic.co/t/curator-not-able-to-authenticate-elasticsearch-with-x-pack/132206/1 "2018-05-16T20:04:15Z")

</div>

Hello,

I have been using curator to cleanup my data, for a while now. It worked all well while I was running elasticsearch 5.5.2, but since the upgrade to 6.2.3, it doesn't work. I have also added x-pack with the v6.2.3. Below are the logs from curator. (I'm running everything containerized).

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File "/usr/bin/curator\_cli", line 11, in   
load\_entry\_point('elasticsearch-curator==5.4.0', 'console\_scripts', 'curator\_cli')()  
File "/usr/lib/python3.6/site-packages/curator/curator\_cli.py", line 5, in main  
cli(obj={})  
File "/usr/lib/python3.6/site-packages/click/core.py", line 722, in **call**  
return self.main(\*args, \*\*kwargs)  
File "/usr/lib/python3.6/site-packages/click/core.py", line 697, in main  
rv = self.invoke(ctx)  
File "/usr/lib/python3.6/site-packages/click/core.py", line 1066, in invoke  
return \_process\_result(sub\_ctx.command.invoke(sub\_ctx))  
File "/usr/lib/python3.6/site-packages/click/core.py", line 895, in invoke  
return ctx.invoke(self.callback, \*\*ctx.params)  
File "/usr/lib/python3.6/site-packages/click/core.py", line 535, in invoke  
return callback(\*args, \*\*kwargs)  
File "/usr/lib/python3.6/site-packages/click/decorators.py", line 17, in new\_func  
return f(get\_current\_context(), \*args, \*\*kwargs)  
File "/usr/lib/python3.6/site-packages/curator/singletons.py", line 256, in delete\_indices\_singleton  
client = get\_client(\*\*c\_args)  
File "/usr/lib/python3.6/site-packages/curator/utils.py", line 901, in get\_client  
'Error: {0}'.format(e)  
elasticsearch.exceptions.ElasticsearchException: Unable to create client connection to Elasticsearch. Error: TransportError(401, 'security\_exception', 'missing authentication token for REST request [/]')

Can someone help me here -- How do I authenticate curator with Elasticsearch, as I don't see a location include the elastic credentials on Curator config.

Thanks,  
Sundeep

---

<div class="post-metadata">

**Author:** ![theuntergeek](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/theuntergeek/32/44961_2.png) [@theuntergeek](https://discuss.elastic.co/u/theuntergeek)\
**Post date:** [May 16, 2018, 8:40pm UTC](https://discuss.elastic.co/t/curator-not-able-to-authenticate-elasticsearch-with-x-pack/132206/2 "2018-05-16T20:40:35Z")

</div>

Curator can and does connect to X-Pack enabled hosts. The options are all in [the documentation](https://www.elastic.co/guide/en/elasticsearch/client/curator/5.5/configfile.html).

A sample configuration is below:

```auto
client:
  hosts: ['myhost_or_ip']
  port: 9200
  use_ssl: true
  certificate: /etc/elasticsearch/certs/ca.crt
  client_cert: /etc/elasticsearch/certs/mynode.crt
  client_key: /etc/elasticsearch/certs/mynode.key
  ssl_no_validate: false
  http_auth: "username:password"

```

- `use_ssl: true` is necessary for SSL-enabled clusters
- `certificate` is necessary if you are using self-signed certs, or ones not recognized by common signing authorities
- `client_cert` and `client_key` are necessary if you are using hostname verification for your SSL.
- `ssl_no_validate: false` means to validate that the certificates are properly signed. If you set this to `true`, you will see warning messages that you are not performing this test.
- `http_auth` needs to be in `"username:password"` format (complete with quotes, if you have special characters in either the username or password). This is quite possibly the source of the error `missing authentication token`. You are not providing a username/password, so no authentication can happen.

---

<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:** [June 13, 2018, 8:50pm UTC](https://discuss.elastic.co/t/curator-not-able-to-authenticate-elasticsearch-with-x-pack/132206/3 "2018-06-13T20:50:12Z")

</div>

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