Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1111344

Summary: Spacewalk-splice-checkin cannot use passwords with exclamation points (!)
Product: [Retired] Subscription Asset Manager Reporter: Rich Jerrido <rjerrido>
Component: spacewalk-splice-toolAssignee: Katello Internal Mailing List <katello-internal>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.4CC: bkearney, pghadge
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-26 20:34:33 UTC Type: Bug
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: 971511    
Attachments:
Description Flags
Proposed patch to /usr/lib/python2.6/site-packages/katello/client/server.py none

Description Rich Jerrido 2014-06-19 19:40:28 UTC
Description of problem:
when configuring a (katello) admin user with an exclamation point (!) in their password, spacewalk-splice-checkin fails with an 'invalid credentials' error. 

Version-Release number of selected component (if applicable):
spacewalk-splice-tool-0.50-1.el6sam.noarch


How reproducible:
100%

Steps to Reproduce:
1. Install SAM 1.4 with enhanced reporting. 
2. change the admin users password to one containing a '!'. In my case, I used 'Samrocks1!.
3. Update /etc/splice/checkin.conf with this new password. 
4. run spacewalk-splice-checkin as the splice user. 

Actual results:
$ spacewalk-splice-checkin 
Traceback (most recent call last):
  File "/usr/bin/spacewalk-splice-checkin", line 96, in <module>
    checkin.main(opts)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 275, in main
    spacewalk_sync(options)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/checkin.py", line 193, in spacewalk_sync
    kps.update_owners(spacewalk_details['org_list'], client.prefix)
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_sync.py", line 53, in update_owners
    owners = self.katello_client.get_owners()
  File "/usr/lib/python2.6/site-packages/spacewalk_splice_tool/katello_connect.py", line 48, in get_owners
    return self.orgapi.organizations()
  File "/usr/lib/python2.6/site-packages/katello/client/api/organization.py", line 40, in organizations
    orgs = self.server.GET(path)[1]
  File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 425, in GET
    return self._request('GET', path, queries, custom_headers=custom_headers)
  File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 249, in _request
    return self._process_response(connection.getresponse())
  File "/usr/lib/python2.6/site-packages/katello/client/server.py", line 307, in _process_response
    raise ServerRequestError(response.status, response_body, None)
katello.client.server.ServerRequestError: (401, {u'displayMessage': u'Invalid credentials', u'errors': [u'Invalid credentials']}, None)



Expected results:
successful run of spacewalk-splice-checkin

Additional info:
I've confirmed that this password does in fact work via the UI. Additionally, I've confirmed that I can access the API (sam/api/organizations as an example) via REST. I suspect spacewalk-splice-checkin may not be properly escaping passwords with special characters. Also, attempts to escape the password with either single or double quotes were unsuccessful.

Comment 1 Rich Jerrido 2014-06-20 00:13:03 UTC
Created attachment 910597 [details]
Proposed patch to /usr/lib/python2.6/site-packages/katello/client/server.py

The affixed patch allows spacewalk-splice-tool to successfully connect to using passwords containing exclamation points and other special characters.

Comment 4 Bryan Kearney 2017-06-26 20:34:33 UTC
The release of Satellite 5.8 we are deprecating the support of Subscription Asset Manager. The release notes for 5.8 can be found at https://access.redhat.com/documentation/en-us/red_hat_satellite/5.8/pdf/release_notes/Red_Hat_Satellite-5.8-Release_Notes-en-US.pdf.

I am therefore closing out this bug as WONTFIX. If you believe this to be an error, please feel free tor each out to either Rich Jerrido or Bryan Kearney. Thank you!