Bug 488830

Summary: checkAuthToken API returns unhandled exception for correct token
Product: Red Hat Satellite 5 Reporter: Sayli Karmarkar <skarmark>
Component: APIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Sayli Karmarkar <skarmark>
Severity: medium Docs Contact:
Priority: low    
Version: 530CC: cperry, jsefler
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: sat530 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-09-10 19:54:41 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: 456996    

Description Sayli Karmarkar 2009-03-05 21:14:49 UTC
Description of problem:
server.auth.checkAuthToken("admin", key)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.4/xmlrpclib.py", line 1096, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1383, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.4/xmlrpclib.py", line 1147, in request
    return self._parse_response(h.getfile(), sock)
  File "/usr/lib/python2.4/xmlrpclib.py", line 1286, in _parse_response
    return u.close()
  File "/usr/lib/python2.4/xmlrpclib.py", line 744, in close
    raise Fault(**self._stack[0])
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: 28089x8fcfafa7ee0be302626480c9377766ae'>

How reproducible:

import xmlrpclib
server = xmlrpclib.Server("http://sat-url/rpc/api", verbose = 0)
key = server.auth.login("login", "password")
server.auth.checkAuthToken("login", key)
  
Actual results:
xmlrpclib.Fault: <Fault -1: 'redstone.xmlrpc.XmlRpcFault: unhandled internal exception: 28089x8fcfafa7ee0be302626480c9377766ae'>

Expected results:
No error

Comment 1 Brad Buckingham 2009-03-11 15:42:05 UTC
The session key returned by login() and the token validated by checkAuthToken() are different values.

I plan to update the API docs to make that clearer.

The auth token is currently only used for the Satellite-Cobbler interface; however, it could be used for other interfaces in the future.  The token is something that is created by Satellite and passed to Cobbler.

Comment 2 Brad Buckingham 2009-03-11 17:37:18 UTC
git commit: dd823002853b052036cb2e84600c06cd999faabc

After further discussion, we decided that since this API is not intended for use by users, the external API doc for it was removed.  With this change, the ./apidoc/handlers/AuthHandler.jsp will no longer include checkAuthToken.

Comment 3 Brad Buckingham 2009-03-17 21:17:46 UTC
mass move to ON_QA

Comment 4 Sayli Karmarkar 2009-03-18 20:03:05 UTC
verified.

Comment 5 John Sefler 2009-08-31 17:47:16 UTC
Verified on staged (Satellite-5.3.0-RHEL5-re20090724.0) with updates from Aug 20, 2009

Help|About > API > auth
https://sun-x4200-01.rhts.bos.redhat.com/rhn/apidoc/handlers/AuthHandler.jsp

Verified that method checkAuthToken() is not present in the api docs.

moving to RELEASE_PENDING

Comment 6 Brandon Perkins 2009-09-10 19:54:41 UTC
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/RHEA-2009-1434.html