# Elastic Cloud Heroku REST not allowed

**URL:** <https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138>\
**Category:** Elasticsearch\
**Created:** [December 6, 2016, 8:37am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138 "2016-12-06T08:37:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shirsendu\_Karmakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shirsendu_karmakar/32/13642_2.png) [@Shirsendu\_Karmakar](https://discuss.elastic.co/u/Shirsendu_Karmakar)\
**Post date:** [December 6, 2016, 8:37am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138/1 "2016-12-06T08:37:21Z")

</div>

Hii,

I am getting the following error while trying to setup a RoR application. What am I missing?

Elasticsearch::Transport::Transport::Errors::Unauthorized: [401] {"error":{"root\_cause":[{"type":"security\_exception","reason":"unable to authenticate user [maplenest\_rw] for REST request [/products]","header":{"WWW-Authenticate":"Basic realm="shield" charset="UTF-8""}}],"type":"security\_exception","reason":"unable to authenticate user [maplenest\_rw] for REST request [/products]","header":{"WWW-Authenticate":"Basic realm="shield" charset="UTF-8""}},"status":401}

Cluster ID: e41aa1....

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [December 6, 2016, 8:45am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138/2 "2016-12-06T08:45:08Z")

</div>

Hi @Shirsendu_Karmakar,

the user "maplenest\_rw" cannot be authenticated. Did you double-check your configuration in Elastic Cloud and in your Rails application?

Please try first whether you can connect to the cluster with curl. Something along those lines should produce a HTTP 200:

```auto
curl --user maplenest_rw:CHANGE_THIS_TO_YOUR_PASSWORD https://CHANGE_THIS_TO_YOUR_CLOUD_CLUSTER_URL:9243

```

Daniel

---

<div class="post-metadata">

**Author:** ![Shirsendu\_Karmakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shirsendu_karmakar/32/13642_2.png) [@Shirsendu\_Karmakar](https://discuss.elastic.co/u/Shirsendu_Karmakar)\
**Post date:** [December 6, 2016, 8:56am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138/3 "2016-12-06T08:56:39Z")

</div>

Hii Daniel,

Thanks for the quick reply. maplenest\_rw doesn't seem to have access maplenest\_admin however does. What change needs to be made in the following to allow it access?

readwrite:  
cluster: monitor  
indices:  
'\*': all

---

<div class="post-metadata">

**Author:** ![Shirsendu\_Karmakar](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/shirsendu_karmakar/32/13642_2.png) [@Shirsendu\_Karmakar](https://discuss.elastic.co/u/Shirsendu_Karmakar)\
**Post date:** [December 6, 2016, 9:07am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138/4 "2016-12-06T09:07:26Z")

</div>

Hii Daniel,

Nevermind. I fixed it. Not sure how but I am guessing I wasn't copying the username and passwords correctly 😕

Sorry about that.

Thanks.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [December 6, 2016, 9:45am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138/5 "2016-12-06T09:45:19Z")

</div>

Hi @Shirsendu_Karmakar,

no worries. Great that it works now. 🙂

Daniel

---

<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:** [January 3, 2017, 9:45am UTC](https://discuss.elastic.co/t/elastic-cloud-heroku-rest-not-allowed/68138/6 "2017-01-03T09:45:20Z")

</div>

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