Bug 692238

Summary: Log authentication failure to broker in cumin logs [RFE]
Product: Red Hat Enterprise MRG Reporter: Trevor McKay <tmckay>
Component: cuminAssignee: Trevor McKay <tmckay>
Status: CLOSED ERRATA QA Contact: Jan Sarenik <jsarenik>
Severity: low Docs Contact:
Priority: low    
Version: 1.3CC: jsarenik, ltoscano, matt
Target Milestone: 2.0.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: cumin-0.1.4840-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-09-07 18:32:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Trevor McKay 2011-03-30 19:00:21 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Trevor McKay 2011-03-30 19:07:22 UTC
(Oops.  Hit return accidentally)

Description of problem:

Failure of cumin to authenticate to the broker does not show up in the log files.  It probably should to assist debugging.

Version-Release number of selected component (if applicable):


How reproducible:

100 %

Steps to Reproduce:
1.  Set up an authentication failure, for instance wrong user/password with PLAIN mechanism in force or ANONYMOUS authentication when ANONYMOUS is disallowed.

2. Run cumin
3. Verify with qpid-stat -c that cumin connection has not been made
4. Search logs for indication.

Actual results:

Couldn't find any indication in the logs.

Expected results:

There ought to be some indication that authentication failed, and probably in a positive sense there should be an indication that authentication passed.

Additional info:

Comment 2 Trevor McKay 2011-05-23 15:47:56 UTC
Fixed in revision 4777.

Added INFO level log entries on broker connected, broker connection failed, and broker disconnected callbacks from console object.  These entries are good indicators of the state of the broker connection and alert a user to connection problems.

Skip-errata requested since this is mostly for debugging support, and if the mechanism fails it really has no impact.

Comment 3 Jan Sarenik 2011-06-24 14:04:02 UTC
I am testing with cumin-0.1.4840-1.el5, but I do not see above-
mentioned behavior.

When I deliberately set wrong login credentials in cumin.conf,
there is still nothing in the log and after logging in to
Cumin, I can see the blue/green message "Broker not found".

brokers: nonsense/nonsense@localhost:5672

All I see in the logs is:
INFO Adding QMF broker at cumina/coumin@localhost:5672 with mech_list PLAIN

But there is no following message saying that it went wrong...

Comment 4 Trevor McKay 2011-06-24 14:34:00 UTC
Jan,

  This is kind of a negative indicator.  It turns out that there is not a good place where an authentication failure message is easily available to cumin from the internals.  So, what I did is write log entries from the qmf console callback functions.

  So, we will see  broker connected, broker connection failed, and
broker disconnected messages.  The idea is that if you think you should be connected, and cumin does not seem to be working, you can check the log for a "broker connected" message.  If it is not there, then the connection never happened (probably bad credentials).  Or, if there is a "broker disconnected" or "broker connection failed" message and no subsequent "broker connected" message, you know that the connection is broken.

  Better than nothing, best that can easily be done.

Comment 6 Jan Sarenik 2011-07-22 12:36:47 UTC
Verified with cumin-0.1.4878-1.el5.

The messages are:

26834 2011-07-22 08:32:26,948 INFO Broker connected localhost:5672
or
27539 2011-07-22 08:34:03,255 INFO Broker connection failed localhost:5672
or 
28212 2011-07-22 08:35:50,206 INFO Broker disconnected localhost:5672