Bug 540544
| Summary: | backend API call up2date.subscribeChannels do not authenticate properly | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Miroslav Suchý <msuchy> | |
| Component: | Server | Assignee: | Miroslav Suchý <msuchy> | |
| Status: | CLOSED ERRATA | QA Contact: | Garik Khachikyan <gkhachik> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | low | |||
| Version: | 530 | CC: | cperry, gkhachik, jsherril, mkoci | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 540974 (view as bug list) | Environment: | ||
| Last Closed: | 2010-01-13 06:57:12 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: | 216808, 518256, 540974 | |||
rhnUser.check_user_password check if password is correct but we want rather call auth_username_password, which return object rhnUser. There is no need for additional checks. And they even did not worked, becouse we usually have in db crypted password, but password given as param is not crypted! Commited to Spacewalk git as: 22bddd07e3ba11ee5b70f8e205ab04e729634f05 ee4f1d0d44bbf90a1396532c83b9b4a0da646c74 Approved and moving to 531. We will need to collect this bug as part of an Errata. Server side fix being made in prep to support the proposed RFE to allow for the RHEL 5 client, with right username/password access to change child channels using the client, vs having to login to RHN or Satellite. Mirek will also clone to track for RHN fix. Cliff cherrypicked to satellite git as: 66256d0ae3e533ae55f669f516ad4640af74b160 2e4ff039c74eb7ac5c67294adc88a3f5ffe3eb76 err, correct api call is:
s.up2date.subscribeChannels(up2dateAuth.getSystemId(), ['foo'] , 'username',
'password')
or even simpler:
from up2date_client.rhnChannel import subscribeChannels, unsubscribeChannels
subscribeChannels(['rhn-tools-rhel-i386-server-5'], 'username', 'password')
# VERIFIED The call is now working correctly: in case of correct user/password subscribe/unsubscribes to/from the given channel. An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2010-0028.html |
Description of problem: backend API call up2date.(un)subscribeChannels do not authenticate properly. It call method rhnChannel.__auth_user() which compare crypted password with uncrypted password, which always fail. Version-Release number of selected component (if applicable): sat530 How reproducible: always Steps to Reproduce: 1. PYTHONPATH=/usr/share/rhn python import rhnserver import up2dateAuth s = rhnserver.RhnServer() s.up2date.subscribeChannels(up2dateAuth.getSystemId(), 'foo', 'username', 'password') Actual results: Error Class Code: 2 Error Class Info: Invalid username and password combination. Expected results: correct username and password, and error about unknown channel.