Problem creating user b@yahoo.com

This support forum board is for support questions relating to Nagios Log Server, our solution for managing and monitoring critical log data.
Locked
li_alm
Posts: 19
Joined: Thu Oct 13, 2016 4:44 am

Problem creating user b@yahoo.com

Post by li_alm »

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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Problem creating user b@yahoo.com

Post 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.
Former Nagios employee
https://www.mcapra.com/
li_alm
Posts: 19
Joined: Thu Oct 13, 2016 4:44 am

Re: Problem creating user b@yahoo.com

Post 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
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Problem creating user b@yahoo.com

Post 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.
Former Nagios employee
https://www.mcapra.com/
li_alm
Posts: 19
Joined: Thu Oct 13, 2016 4:44 am

Re: Problem creating user b@yahoo.com

Post by li_alm »

OK, thanks, consider it solved.

Liviu
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Problem creating user b@yahoo.com

Post by tmcdonald »

I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked