Bug 756401

Summary: SPQR defaults to PLAIN authentication if a username is specified
Product: Red Hat Enterprise MRG Reporter: Will Benton <willb>
Component: ruby-spqrAssignee: Will Benton <willb>
Status: CLOSED ERRATA QA Contact: Lubos Trilety <ltrilety>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.0CC: ltoscano, ltrilety, matt
Target Milestone: 2.1.1   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ruby-spqr-0.3.5 Doc Type: Bug Fix
Doc Text:
C: The SPQR library, which is used by the Wallaby service, is designed to automatically select an authentication mechanism based on certain selected options if one is not explicitly specified. However, if a user specified a username and the ANONYMOUS mechanism, SPQR would override the user's explicit mechanism selection and instead choose PLAIN authentication. C: This behavior is confusing to users. F: SPQR now prioritizes explicitly-specified mechanisms over implicitly-selected ones. R: SPQR and services built upon it should now behave as users expect them to.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-06 18:18:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 765607    

Description Will Benton 2011-11-23 13:07:16 UTC
Description of problem:

As in title.

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

spqr-0.3.3

How reproducible:

Specify a username but select another authentication mechanism (e.g. "ANONYMOUS").
  
Actual results:

SPQR will use PLAIN.

Expected results:

SPQR should use the specified authentication mechanism and only fall back to PLAIN when a user id is specified but no mechanism is.

Additional info:

Comment 3 Will Benton 2012-01-09 15:52:02 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
C:  The SPQR library, which is used by the Wallaby service, is designed to automatically select an authentication mechanism based on certain selected options if one is not explicitly specified.  However, if a user specified a username and the ANONYMOUS mechanism, SPQR would override the user's explicit mechanism selection and instead choose PLAIN authentication.
C:  This behavior is confusing to users.
F:  SPQR now prioritizes explicitly-specified mechanisms over implicitly-selected ones.
R:  SPQR and services built upon it should now behave as users expect them to.

Comment 4 Lubos Trilety 2012-01-10 13:36:47 UTC
Successfully reproduced with:
ruby-spqr-0.3.3-1

# cat /usr/lib/ruby/site_ruby/1.8/spqr/app.rb
...
   settings.mechanism = @explicit_mechanism || implicit_mechanism
...

using setting "export WALLABY_BROKER_MECHANISM=GSSAPI" in /etc/sysconfig/wallaby-agent without user or password spqr always use "ANONYMOUS", if those two are filled it always uses "PLAIN"

Comment 5 Lubos Trilety 2012-01-10 13:39:04 UTC
Tested with:
ruby-spqr-0.3.5-1

Tested on:
RHEL5 i386,x86_64
RHEL6 i386,x86_64

# cat /usr/lib/ruby/site_ruby/1.8/spqr/app.rb
...
   settings.mechanism = @qmf_explicit_mechanism || implicit_mechanism
...

spqr uses chosen mechanism

>>> VERIFIED

Comment 6 errata-xmlrpc 2012-02-06 18:18:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHSA-2012-0100.html