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.