# Inability to set up Shield/Security within X-Pack Trial

**URL:** https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [August 3, 2018, 2:12pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924 "2018-08-03T14:12:59Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![tvoll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tvoll/32/33651_2.png) [@tvoll](https://discuss.elastic.co/u/tvoll)
#### Post date: [August 3, 2018, 2:12pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/1 "2018-08-03T14:12:59Z")

</div>

So, I'm currently testing out the trial of X-Pack on my test install, and i'm having an issue enabling the Security portion of X-Pack. From the guides provided, it is presented that it should be as easy as entering `xpack.security.enabled = true` at the end of my elasticsearch.yml. However, every time I do this, Elasticsearch will fail to start up.

Are there any other steps that I'd need to do? Was hoping the trial would snap into action a bit faster.

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [August 3, 2018, 2:33pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/2 "2018-08-03T14:33:24Z")

</div>

> [@tvoll](#):
>
> Elasticsearch will fail to start up.

Can you please add a little more context / information ? What is the error message?

Which Elasticsearch version are you trying out?

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [August 3, 2018, 2:37pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/3 "2018-08-03T14:37:19Z")

</div>

> [@tvoll](#):
>
> xpack.security.enabled = true

Also, not sure if you misspoke above, but elasticsearch.yml is a YAML file and as such the correct syntax is

```auto
xpack.security.enabled: true

```

and not

```auto
xpack.security.enabled= true

```

---

<div class="post-metadata">

### Author: ![tvoll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tvoll/32/33651_2.png) [@tvoll](https://discuss.elastic.co/u/tvoll)
#### Post date: [August 3, 2018, 3:24pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/4 "2018-08-03T15:24:24Z")

</div>

Whoops, it might have just been a stupid mistake on my part.  
Running everything at v6.3.2. I believe that was all it was, just a simple =.  
Since it wasn't specified in the guides as `xpack.security.enabled: true`, but instead 'set xpack.security.enabled' to true, so my first thought was =, I guess.  
Thanks once again and sorry for the silliness.

---

<div class="post-metadata">

### Author: ![tvoll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tvoll/32/33651_2.png) [@tvoll](https://discuss.elastic.co/u/tvoll)
#### Post date: [August 3, 2018, 3:30pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/5 "2018-08-03T15:30:22Z")

</div>

I am still having issues, but I have gotten a little bit further.  
Now I have Kibana constantly reloading after enabling security.  
I already have nginx basic authentication being used, and am not sure if this could be the cause for the issue.

My logs look like this for Kibana

> Aug 3 10:25:39 ELKD01 kibana[23568]: {"type":"log","@timestamp":"2018-08-03T15:25:39Z","tags":["info","authentication"],"pid":23568,"message":"Authentication attempt failed: [security\_exception] unable to authenticate user [tjvadmin] for REST request [/\_xpack/security/\_authenticate], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } }"}  
> Aug 3 10:25:39 ELKD01 kibana[23568]: {"type":"log","@timestamp":"2018-08-03T15:25:39Z","tags":["license","warning","xpack"],"pid":23568,"message":"License information from the X-Pack plugin could not be obtained from Elasticsearch for the [data] cluster. [security\_exception] missing authentication token for REST request [/\_xpack], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } } :: {"path":"/\_xpack","statusCode":401,"response":"{\"error\":{\"root\_cause\":[{\"type\":\"security\_exception\",\"reason\":\"missing authentication token for REST request [/\_xpack]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security\_exception\",\"reason\":\"missing authentication token for REST request [/\_xpack]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}","wwwAuthenticateDirective":"Basic realm=\"security\" charset=\"UTF-8\""}"}  
> Aug 3 10:25:39 ELKD01 kibana[23568]: {"type":"response","@timestamp":"2018-08-03T15:25:39Z","tags":,"pid":23568,"method":"get","statusCode":401,"req":{"url":"/app/monitoring","method":"get","headers":{"connection":"upgrade","host":"[logsd.securecomwireless.com](http://logsd.securecomwireless.com)","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"[https://logsd.securecomwireless.com/app/kibana","upgrade-insecure-requests":"1"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"https://logsd.securecomwireless.com/app/kibana"},"res":{"statusCode":401,"responseTime":4,"contentLength":9},"message":"GET](https://logsd.securecomwireless.com/app/kibana%22,%22upgrade-insecure-requests%22:%221%22%7D,%22remoteAddress%22:%22127.0.0.1%22,%22userAgent%22:%22127.0.0.1%22,%22referer%22:%22https://logsd.securecomwireless.com/app/kibana%22%7D,%22res%22:%7B%22statusCode%22:401,%22responseTime%22:4,%22contentLength%22:9%7D,%22message%22:%22GET) /app/monitoring 401 4ms - 9.0B"}  
> Aug 3 10:25:39 ELKD01 kibana[23568]: {"type":"log","@timestamp":"2018-08-03T15:25:39Z","tags":["info","authentication"],"pid":23568,"message":"Authentication attempt failed: [security\_exception] unable to authenticate user [tjvadmin] for REST request [/\_xpack/security/\_authenticate], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } }"}  
> Aug 3 10:25:39 ELKD01 kibana[23568]: {"type":"log","@timestamp":"2018-08-03T15:25:39Z","tags":["license","warning","xpack"],"pid":23568,"message":"License information from the X-Pack plugin could not be obtained from Elasticsearch for the [data] cluster. [security\_exception] missing authentication token for REST request [/\_xpack], with { header={ WWW-Authenticate="Basic realm=\"security\" charset=\"UTF-8\"" } } :: {"path":"/\_xpack","statusCode":401,"response":"{\"error\":{\"root\_cause\":[{\"type\":\"security\_exception\",\"reason\":\"missing authentication token for REST request [/\_xpack]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}}],\"type\":\"security\_exception\",\"reason\":\"missing authentication token for REST request [/\_xpack]\",\"header\":{\"WWW-Authenticate\":\"Basic realm=\\\"security\\\" charset=\\\"UTF-8\\\"\"}},\"status\":401}","wwwAuthenticateDirective":"Basic realm=\"security\" charset=\"UTF-8\""}"}  
> Aug 3 10:25:39 ELKD01 kibana[23568]: {"type":"response","@timestamp":"2018-08-03T15:25:39Z","tags":,"pid":23568,"method":"get","statusCode":401,"req":{"url":"/app/monitoring","method":"get","headers":{"connection":"upgrade","host":"[logsd.securecomwireless.com](http://logsd.securecomwireless.com)","user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0","accept":"text/html,application/xhtml+xml,application/xml;q=0.9,_/_;q=0.8","accept-language":"en-US,en;q=0.5","accept-encoding":"gzip, deflate, br","referer":"[https://logsd.securecomwireless.com/app/kibana","upgrade-insecure-requests":"1"},"remoteAddress":"127.0.0.1","userAgent":"127.0.0.1","referer":"https://logsd.securecomwireless.com/app/kibana"},"res":{"statusCode":401,"responseTime":3,"contentLength":9},"message":"GET](https://logsd.securecomwireless.com/app/kibana%22,%22upgrade-insecure-requests%22:%221%22%7D,%22remoteAddress%22:%22127.0.0.1%22,%22userAgent%22:%22127.0.0.1%22,%22referer%22:%22https://logsd.securecomwireless.com/app/kibana%22%7D,%22res%22:%7B%22statusCode%22:401,%22responseTime%22:3,%22contentLength%22:9%7D,%22message%22:%22GET) /app/monitoring 401 3ms - 9.0B"}

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [August 3, 2018, 4:08pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/6 "2018-08-03T16:08:35Z")

</div>

You don't need nginx with basic auth in front of kibana now that you are using X-Pack.

The issue here is that Kibana can't communicate with Elasticsearch as Elasticsearch now needs authenticated requests ( security is enabled ) and you probably haven't configured Kibana for this.

Please read through our [documentation](https://www.elastic.co/guide/en/elastic-stack-overview/current/security-getting-started.html) on how to start with security. You can probably start [here](https://www.elastic.co/guide/en/elastic-stack-overview/current/get-started-built-in-users.html). Most of these initial required steps are well covered in there.

---

<div class="post-metadata">

### Author: ![tvoll](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tvoll/32/33651_2.png) [@tvoll](https://discuss.elastic.co/u/tvoll)
#### Post date: [August 3, 2018, 8:48pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/7 "2018-08-03T20:48:43Z")

</div>

Thank you!  
Those documents did help out a lot.

---

<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: [August 31, 2018, 8:48pm UTC](https://discuss.elastic.co/t/inability-to-set-up-shield-security-within-x-pack-trial/142924/8 "2018-08-31T20:48:50Z")

</div>

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