# Access Granted in access log but AuthorizationException in response

**URL:** https://discuss.elastic.co/t/access-granted-in-access-log-but-authorizationexception-in-response/62046
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [October 3, 2016, 10:30am UTC](https://discuss.elastic.co/t/access-granted-in-access-log-but-authorizationexception-in-response/62046 "2016-10-03T10:30:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![CharliesL](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CharliesL](https://discuss.elastic.co/u/CharliesL)
#### Post date: [October 3, 2016, 10:30am UTC](https://discuss.elastic.co/t/access-granted-in-access-log-but-authorizationexception-in-response/62046/1 "2016-10-03T10:30:03Z")

</div>

Hi All,

Have a strange issue. Using AD with shield to authenticate users and have an account that is tied to a role that is not being allowed to carry out it's actions.

With the account, I can execute a curl command against the basic url (localhost:9200) and get back the status response fine (with status, cluster name, version etc), but when I do anything else, for instance localhost:9200/\_cat/indices I get an access granted message in the log for it:

[2016-10-03 11:09:48,086] [node-d01] [transport] [access\_granted] origin\_type=[rest], origin\_address=[/192.168.1.18:37964], principal=[curator], action=[cluster:monitor/state], indices=[]

But in the response to the curl command I get an AuthorizationException:

{"error":"RemoteTransportException[[es-m01-node-m01][inet[/10.65.4.41:9300]][cluster:monitor/state]]; nested: AuthorizationException[action [cluster:monitor/state] is unauthorized for user [curator]]; ","status":403}

How is it possible that it's getting access granted and yet refused the action too!?

For reference, i've also now been trying this with the admin settings for that role (in roles.yml):

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

---

<div class="post-metadata">

### Author: ![jaymode](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaymode/32/50103_2.png) [@jaymode](https://discuss.elastic.co/u/jaymode)
#### Post date: [October 3, 2016, 1:34pm UTC](https://discuss.elastic.co/t/access-granted-in-access-log-but-authorizationexception-in-response/62046/2 "2016-10-03T13:34:22Z")

</div>

It looks like the role may not exist or has different permissions on a remote node in the cluster (`10.65.4.41`). Can your check the other node to see if the role exists there?

---

<div class="post-metadata">

### Author: ![CharliesL](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CharliesL](https://discuss.elastic.co/u/CharliesL)
#### Post date: [October 3, 2016, 2:38pm UTC](https://discuss.elastic.co/t/access-granted-in-access-log-but-authorizationexception-in-response/62046/3 "2016-10-03T14:38:20Z")

</div>

Yep that's fixed it! Thanks very much, as the curl was just talking to one node didn't think permissions on the others would be needed (and failed to see the different IP addresses in the curl response)

---

<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:41pm UTC](https://discuss.elastic.co/t/access-granted-in-access-log-but-authorizationexception-in-response/62046/4 "2017-07-06T13:41:46Z")

</div>


