# Shield on Containerized Elasticsearch \*RESOLVED\*

**URL:** https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [August 25, 2015, 9:07pm UTC](https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053 "2015-08-25T21:07:46Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![kunickiaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kunickiaj/32/4396_2.png) [@kunickiaj](https://discuss.elastic.co/u/kunickiaj)
#### Post date: [August 25, 2015, 9:07pm UTC](https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053/1 "2015-08-25T21:07:46Z")

</div>

Hi, I'd like to try out shield and installed it in a docker container running es 1.7.1, however authentication always fails. Anyone else run into this?

I've verified that a user exists and has the admin role.

```
esusers useradd admin -r admin -p password
# esusers list
admin : admin

# curl -uadmin:password localhost:9200
{"error":"AuthenticationException[unable to authenticate user [admin] for REST request [/]]","status":401}

```

ES Logs:

```
^[[O[2015-08-25 21:04:57,496][INFO][node] [Theresa Cassidy] version[1.7.1], pid[1], build[b88f43f/2015-07-29T09:54:16Z]
[2015-08-25 21:04:57,500][INFO][node] [Theresa Cassidy] initializing ...
[2015-08-25 21:04:57,615][INFO][plugins] [Theresa Cassidy] loaded [license, shield], sites [head]
[2015-08-25 21:04:57,643][INFO][env] [Theresa Cassidy] using [1] data paths, mounts [[/usr/share/elasticsearch/data (/dev/sda1)]], net usable_space [16.6gb], net total_space [18.1gb], types [ext4]
[2015-08-25 21:04:57,919][INFO][transport] [Theresa Cassidy] Using [org.elasticsearch.shield.transport.ShieldServerTransportService] as transport service, overridden by [shield]
[2015-08-25 21:04:57,920][INFO][transport] [Theresa Cassidy] Using [org.elasticsearch.shield.transport.netty.ShieldNettyTransport] as transport, overridden by [shield]
[2015-08-25 21:04:57,920][INFO][http] [Theresa Cassidy] Using [org.elasticsearch.shield.transport.netty.ShieldNettyHttpServerTransport] as http transport, overridden by [shield]
[2015-08-25 21:05:00,468][INFO][node] [Theresa Cassidy] initialized
[2015-08-25 21:05:00,468][INFO][node] [Theresa Cassidy] starting ...
[2015-08-25 21:05:00,816][INFO][shield.transport] [Theresa Cassidy] bound_address {inet[/0:0:0:0:0:0:0:0:9300]}, publish_address {inet[/172.17.0.18:9300]}
[2015-08-25 21:05:00,841][INFO][discovery] [Theresa Cassidy] elasticsearch/T_8-EMKQR7u6HF2dK3YPpQ
[2015-08-25 21:05:04,613][INFO][cluster.service] [Theresa Cassidy] new_master [Theresa Cassidy][T_8-EMKQR7u6HF2dK3YPpQ][5fa13efdf042][inet[/172.17.0.18:9300]], reason: zen-disco-join (elected_as_master)
[2015-08-25 21:05:04,640][INFO][http] [Theresa Cassidy] bound_address {inet[/0:0:0:0:0:0:0:0:9200]}, publish_address {inet[/172.17.0.18:9200]}
[2015-08-25 21:05:04,641][INFO][node] [Theresa Cassidy] started
[2015-08-25 21:05:04,644][INFO][gateway] [Theresa Cassidy] recovered [0] indices into cluster_state
[2015-08-25 21:05:04,647][INFO][shield.license] [Theresa Cassidy] enabling license for [shield]
[2015-08-25 21:05:04,648][INFO][license.plugin.core] [Theresa Cassidy] license for [shield] - valid
[2015-08-25 21:05:04,655][ERROR][shield.license] [Theresa Cassidy]
#
# Shield license will expire on [Thursday, September 24, 2015]. Cluster health, cluster stats and indices stats operations are
# blocked on Shield license expiration. All data operations (read and write) continue to work. If you
# have a new license, please update it. Otherwise, please reach out to your support contact.
#

```

* * *

Turns out that the "official" elasticsearch image keeps configs in /usr/share/elasticsearch/config but the shield plugin expects configs in /etc/elasticsearch (even when installed with -Des.path.conf=/usr/share/elasticsearch) so my solution was to symlink the real shield configs into /etc/elasticsearch/shield from /usr/share/elasticsearch/config/shield since shield complains if the configs are in a different directory.

---

<div class="post-metadata">

### Author: ![kunickiaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kunickiaj/32/4396_2.png) [@kunickiaj](https://discuss.elastic.co/u/kunickiaj)
#### Post date: [August 25, 2015, 9:42pm UTC](https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053/2 "2015-08-25T21:42:59Z")

</div>

As a follow up, I can tell you that the standalone tarball version of 1.7.1 works fine for me, but the official docker container (with plugin added) does not.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [August 25, 2015, 9:45pm UTC](https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053/3 "2015-08-25T21:45:22Z")

</div>

That may the official _Docker_ container but it's not managed by us.

Did you follow all the installation instructions?

---

<div class="post-metadata">

### Author: ![kunickiaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kunickiaj/32/4396_2.png) [@kunickiaj](https://discuss.elastic.co/u/kunickiaj)
#### Post date: [August 25, 2015, 10:01pm UTC](https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053/4 "2015-08-25T22:01:05Z")

</div>

Gotcha, didn't realize Docker was actually maintaining those. I'll be sure to post an update if I do get it working, meanwhile the instructions work fine for the official distribution from Elastic 😄

---

<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 6, 2017, 1:48pm UTC](https://discuss.elastic.co/t/shield-on-containerized-elasticsearch-resolved/28053/5 "2017-07-06T13:48:29Z")

</div>


