# Security\_exception: action \[cluster:monitor/main\] is unauthorized for user \[user.name\]

**URL:** https://discuss.elastic.co/t/security-exception-action-cluster-monitor-main-is-unauthorized-for-user-user-name/189823
**Category:** Elasticsearch
**Created:** [July 10, 2019, 4:04pm UTC](https://discuss.elastic.co/t/security-exception-action-cluster-monitor-main-is-unauthorized-for-user-user-name/189823 "2019-07-10T16:04:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![alexus](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alexus/32/12696_2.png) [@alexus](https://discuss.elastic.co/u/alexus)
#### Post date: [July 10, 2019, 4:04pm UTC](https://discuss.elastic.co/t/security-exception-action-cluster-monitor-main-is-unauthorized-for-user-user-name/189823/1 "2019-07-10T16:04:31Z")

</div>

Hello World!

I'm trying to authenticate against my cluster, yet running into following security exception:

```
# curl -v --user user.name:password http://localhost:9200/?pretty
* Trying ::1...
* TCP_NODELAY set
* connect to ::1 port 9200 failed: Connection refused
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 9200 (#0)
* Server auth using Basic with user 'user.name'
> GET /?pretty HTTP/1.1
> Host: localhost:9200
> Authorization: Basic XXX
> User-Agent: curl/7.52.1
> Accept: */*
> 
< HTTP/1.1 403 Forbidden
< content-type: application/json; charset=UTF-8
< content-length: 334
< 
{
  "error" : {
    "root_cause" : [
      {
        "type" : "security_exception",
        "reason" : "action [cluster:monitor/main] is unauthorized for user [user.name]"
      }
    ],
    "type" : "security_exception",
    "reason" : "action [cluster:monitor/main] is unauthorized for user [user.name]"
  },
  "status" : 403
}
* Curl_http_done: called premature == 0
* Connection #0 to host localhost left intact
# 

```

I double checked, `user.name` has a role assigned with `read` privilege, I also reset user.name' password, that didn't help either. I can't figure out what else I did wrong(

Please advise.

---

<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 7, 2019, 4:10pm UTC](https://discuss.elastic.co/t/security-exception-action-cluster-monitor-main-is-unauthorized-for-user-user-name/189823/2 "2019-08-07T16:10:15Z")

</div>

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