Attaching a patch for review against proxy. Proxy continues to cache the
authentication token across requests that have different parsed
hostnames from the rhn proxy borker logic(ip vs canonical) for the
current proxy. This cache forces the spacewalk server to generate
incorrect kickstart files since it uses the proxy auth header to know
what hostname to replace in the generated kickstart file.
full details are in the spacewalk bug
https://bugzilla.redhat.com/show_bug.cgi?id=811990
Regards,
Shannon Hughes
Senior SEG/GSS
>From ba810fec2bb1c3e7700f7288290da845bee21454 Mon Sep 17 00:00:00 2001
From: Shannon Hughes <shug...@redhat.com>
Date: Thu, 12 Apr 2012 08:05:32 -0400
Subject: [PATCH] check proxy token for old host and refresh auth token if
necessary
---
proxy/proxy/rhnProxyAuth.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/proxy/proxy/rhnProxyAuth.py b/proxy/proxy/rhnProxyAuth.py
index 85ba60e..72b3304 100644
--- a/proxy/proxy/rhnProxyAuth.py
+++ b/proxy/proxy/rhnProxyAuth.py
@@ -118,7 +118,8 @@ class ProxyAuth:
log_debug(3)
oldToken = self.get_cached_token()
token = oldToken
- if not token or forceRefresh or self.__processSystemid():
+ oldHost = string.split(oldToken, ':')[-1]
+ if not token or forceRefresh or self.__processSystemid() or (oldHost != self.hostname):
token = self.login()
if token and token != oldToken:
self.set_cached_token(token)
--
1.7.7.6
_______________________________________________
Spacewalk-devel mailing list
Spacewalk-devel@redhat.com
https://www.redhat.com/mailman/listinfo/spacewalk-devel