Problem creating user [email protected]
Posted: Thu Apr 27, 2017 9:43 am
Hello,
A user having [email protected] as username is already present.
And I want to add [email protected] - it doesn't work.
I captured the elasticsearch traffic using tcpdump on the loopback interface, port 9200, tcp.
As I understand, when a user is created, 2 steps are needed:
1. check username is not already taken - using GET
2. send create user command - using POST
When trying to add [email protected]:
Step1: GET /nagioslogserver/user/_search?q=username%3Ab%40yahoo.com HTTP/1.1
Response:
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.5629939,"hits":[{"_index":"nagioslogserver","_type":"user","_id":"AVuvyabVfP97L5qVhfs6","_score":0.5629939,"_source":{"name":"A","username":"[email protected]","email":"[email protected]","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","apiaccess":"0","apikey":"","auth_type":"user","language":"default","auth_settings":[],"created":"2017-04-27 16:21:19","created_by":"1","default_dashboard":"\/dashboard\/elasticsearch\/AVuvyaaVfP97L5qVhfs5"}}]}}
Step2 is not taking place when I try to add "[email protected]" because the GET in step1 is returning results.
Step2 error in web interface: "Could not create the user."
Note: I am able to create the user [email protected] from the command line using curl, but I am not able to log in using [email protected], because of the same issue.
The login step involves checking if the username is available, but the result is made of 2 matches: [email protected] and [email protected], so the login fails.
curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"name":"B","username":"[email protected]","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"user","email":"[email protected]","language":"default","apiaccess":"0","apikey":"","created_by":1,"default_dashboard":"/dashboard/elasticsearch/default"}'
(which translates into GET /nagioslogserver/user/_search?q=username%3Ab%40yahoo.com HTTP/1.1)
Response: {"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.4965448,"hits":[{"_index":"nagioslogserver","_type":"user","_id":"AVuv0ncSfP97L5qVhfte","_score":1.4965448,"_source":{"name":"B","username":"[email protected]","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","auth_type":"user","email":"[email protected]","language":"default","apiaccess":"0","apikey":"","created_by":1,"default_dashboard":"/dashboard/elasticsearch/default","auth_settings":[]}},{"_index":"nagioslogserver","_type":"user","_id":"AVuvyabVfP97L5qVhfs6","_score":0.5629939,"_source":{"name":"A","username":"[email protected]","email":"[email protected]","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","apiaccess":"0","apikey":"","auth_type":"user","language":"default","auth_settings":[],"created":"2017-04-27 16:21:19","created_by":"1","default_dashboard":"\/dashboard\/elasticsearch\/AVuvyaaVfP97L5qVhfs5"}}]}}
I am using:
Nagios Log Server 1.4.4
Elasticsearch 1.6.0
Logstash 1.5.1
Kibana 3.1.1-nagios3
Questions:
1. What is the format expected in the username by nagios log server?
2. Is this considered a bug? If so, when is the next release fixing this bug available?
Thanks. Regards,
Liviu
A user having [email protected] as username is already present.
And I want to add [email protected] - it doesn't work.
I captured the elasticsearch traffic using tcpdump on the loopback interface, port 9200, tcp.
As I understand, when a user is created, 2 steps are needed:
1. check username is not already taken - using GET
2. send create user command - using POST
When trying to add [email protected]:
Step1: GET /nagioslogserver/user/_search?q=username%3Ab%40yahoo.com HTTP/1.1
Response:
{"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max_score":0.5629939,"hits":[{"_index":"nagioslogserver","_type":"user","_id":"AVuvyabVfP97L5qVhfs6","_score":0.5629939,"_source":{"name":"A","username":"[email protected]","email":"[email protected]","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","apiaccess":"0","apikey":"","auth_type":"user","language":"default","auth_settings":[],"created":"2017-04-27 16:21:19","created_by":"1","default_dashboard":"\/dashboard\/elasticsearch\/AVuvyaaVfP97L5qVhfs5"}}]}}
Step2 is not taking place when I try to add "[email protected]" because the GET in step1 is returning results.
Step2 error in web interface: "Could not create the user."
Note: I am able to create the user [email protected] from the command line using curl, but I am not able to log in using [email protected], because of the same issue.
The login step involves checking if the username is available, but the result is made of 2 matches: [email protected] and [email protected], so the login fails.
curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"name":"B","username":"[email protected]","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"user","email":"[email protected]","language":"default","apiaccess":"0","apikey":"","created_by":1,"default_dashboard":"/dashboard/elasticsearch/default"}'
(which translates into GET /nagioslogserver/user/_search?q=username%3Ab%40yahoo.com HTTP/1.1)
Response: {"took":1,"timed_out":false,"_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":2,"max_score":1.4965448,"hits":[{"_index":"nagioslogserver","_type":"user","_id":"AVuv0ncSfP97L5qVhfte","_score":1.4965448,"_source":{"name":"B","username":"[email protected]","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","auth_type":"user","email":"[email protected]","language":"default","apiaccess":"0","apikey":"","created_by":1,"default_dashboard":"/dashboard/elasticsearch/default","auth_settings":[]}},{"_index":"nagioslogserver","_type":"user","_id":"AVuvyabVfP97L5qVhfs6","_score":0.5629939,"_source":{"name":"A","username":"[email protected]","email":"[email protected]","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","apiaccess":"0","apikey":"","auth_type":"user","language":"default","auth_settings":[],"created":"2017-04-27 16:21:19","created_by":"1","default_dashboard":"\/dashboard\/elasticsearch\/AVuvyaaVfP97L5qVhfs5"}}]}}
I am using:
Nagios Log Server 1.4.4
Elasticsearch 1.6.0
Logstash 1.5.1
Kibana 3.1.1-nagios3
Questions:
1. What is the format expected in the username by nagios log server?
2. Is this considered a bug? If so, when is the next release fixing this bug available?
Thanks. Regards,
Liviu