Page 1 of 1

Problem creating user [email protected]

Posted: Thu Apr 27, 2017 9:43 am
by li_alm
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

Re: Problem creating user [email protected]

Posted: Thu Apr 27, 2017 3:12 pm
by mcapra
li_alm wrote: 1. What is the format expected in the username by nagios log server?
I would say the @ symbol is probably what's tripping it up.
li_alm wrote: 2. Is this considered a bug? If so, when is the next release fixing this bug available?
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.

Re: Problem creating user [email protected]

Posted: Fri Apr 28, 2017 1:20 am
by li_alm
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.
I would say the @ symbol is probably what's tripping it up.
There were multiple characters that needed special handling on the back-end.
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.
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 2: When is the next release (1.5.0) planned?

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 [email protected]

Posted: Fri Apr 28, 2017 12:03 pm
by mcapra
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 expected format is just letters and numbers I believe; No special characters.
li_alm wrote:Question 2: When is the next release (1.5.0) planned?
The current target is sometime in May. Unfortunately, that is subject to change and totally out of my control.
li_alm wrote:Question 3: Is there a public list of bug reports, where I can look up this ID 10302?
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.

Re: Problem creating user [email protected]

Posted: Tue May 02, 2017 7:52 am
by li_alm
OK, thanks, consider it solved.

Liviu

Re: Problem creating user [email protected]

Posted: Tue May 02, 2017 9:29 am
by tmcdonald
I'll be closing this thread now, but feel free to open another if you need anything in the future!