proxy/proxy/rhnProxyAuth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 57598ac46fbf15c744d5de4849b8e42569bf4f40 Author: Shannon Hughes shughes@redhat.com Date: Fri Apr 13 08:48:06 2012 -0400
811990 - refresh proxy auth cache for hostname changes
Worked with msuchy to get this patch into spacewalk. Patch changes the cache key to include hostname so when the incoming apache request has a different hostname in the url, the cache will now consider the hostname and update cache when hostnames differ.
Tested using a dual chained proxy attached to a Satellite:
Client -> Proxy A -> Proxy B -> Satellite
Ran elinks testing kickstart file generations with proxy A ip hostname and proxy A canonical hostname Ran kickstart installs Ran yum updates on packages
diff --git a/proxy/proxy/rhnProxyAuth.py b/proxy/proxy/rhnProxyAuth.py index 85ba60e..b26370b 100644 --- a/proxy/proxy/rhnProxyAuth.py +++ b/proxy/proxy/rhnProxyAuth.py @@ -22,6 +22,7 @@ import time import socket import xmlrpclib import sys +from hashlib import sha1
## local imports import rhnAuthCacheClient @@ -364,7 +365,7 @@ problems, isn't running, or the token is somehow corrupt. return serverObj
def __cache_proxy_key(self): - return 'p' + str(self.__serverid) + return 'p' + str(self.__serverid) + sha1(self.hostname).hexdigest()
def getProxyServerId(self): return self.__serverid
spacewalk-commits@lists.fedorahosted.org