Hello,
A user having a@yahoo.com as username is already present.
And I want to add b@yahoo.com - 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 b@yahoo.com:
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":"a@yahoo.com","email":"a@yahoo.com","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 "b@yahoo.com" 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 b@yahoo.com from the command line using curl, but I am not able to log in using b@yahoo.com, because of the same issue.
The login step involves checking if the username is available, but the result is made of 2 matches: a@yahoo.com and b@yahoo.com, so the login fails.
curl -XPOST 'http://localhost:9200/nagioslogserver/user/' -d '{"name":"B","username":"b@yahoo.com","password":"c678bcf3b5138b9263a95c44d28097f22c2e02877193d2c25313478821d45c19","auth_type":"user","email":"b@yahoo.com","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":"b@yahoo.com","password":"a80b568a237f50391d2f1f97beaf99564e33d2e1c8a2e5cac21ceda701570312","auth_type":"user","email":"b@yahoo.com","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":"a@yahoo.com","email":"a@yahoo.com","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
Problem creating user b@yahoo.com
Re: Problem creating user b@yahoo.com
I would say the @ symbol is probably what's tripping it up.li_alm wrote: 1. What is the format expected in the username by nagios log server?
This was filed as a bug report a few months ago (ID 10302) and should be fixed in the next release of Nagios Log Server (1.5.0). There were multiple characters that needed special handling on the back-end.li_alm wrote: 2. Is this considered a bug? If so, when is the next release fixing this bug available?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Problem creating user b@yahoo.com
Dear Matt,
Thanks for your quick answer.
Still, I would like some precise info - as you can see above, I invested some time in understanding the bug, it is important for me & my clients.
Question 3: Is there a public list of bug reports, where I can look up this ID 10302?
Thanks. Regards,
Liviu
Thanks for your quick answer.
Still, I would like some precise info - as you can see above, I invested some time in understanding the bug, it is important for me & my clients.
I would say the @ symbol is probably what's tripping it up.
Question 1: Exactly, I want to know these characters - what is the expected format now. Maybe I won't use @, but I will step into other issues.There were multiple characters that needed special handling on the back-end.
Question 2: When is the next release (1.5.0) planned?This was filed as a bug report a few months ago (ID 10302) and should be fixed in the next release of Nagios Log Server (1.5.0)
Question 3: Is there a public list of bug reports, where I can look up this ID 10302?
Thanks. Regards,
Liviu
Re: Problem creating user b@yahoo.com
The expected format is just letters and numbers I believe; No special characters.li_alm wrote:Question 1: Exactly, I want to know these characters - what is the expected format now. Maybe I won't use @, but I will step into other issues.
The current target is sometime in May. Unfortunately, that is subject to change and totally out of my control.li_alm wrote:Question 2: When is the next release (1.5.0) planned?
There isn't a public place as of right now, though it's planned for the future. Opening a thread for information about a specific bug/feature ID is totally fine though.li_alm wrote:Question 3: Is there a public list of bug reports, where I can look up this ID 10302?
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Problem creating user b@yahoo.com
OK, thanks, consider it solved.
Liviu
Liviu
Re: Problem creating user b@yahoo.com
I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee