From 69f58f72a5a3778d7b09c8873c3d1aad4fa51373 Mon Sep 17 00:00:00 2001 From: David Hadas <davidh@il.ibm.com> Date: Mon, 10 Jun 2013 13:18:42 +0300 Subject: [PATCH] Tempauth - remove change made to HTTP_X_AUTH_TOKEN tempauth changes HTTP_X_AUTH_TOKEN although not required by function preventing swift extendability. (prevents other middleware to rely on HTTP_X_AUTH_TOKEN representing the token sent by the client). Change-Id: I7ed6f9b5d0a5a203326a3912ef27cf29d2d4e9ce Fixes: Bug #1189410 --- swift/common/middleware/tempauth.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/swift/common/middleware/tempauth.py b/swift/common/middleware/tempauth.py index 5f6ecd3b45..4636fc486b 100644 --- a/swift/common/middleware/tempauth.py +++ b/swift/common/middleware/tempauth.py @@ -141,12 +141,11 @@ class TempAuth(object): # Note: Empty reseller_prefix will match all tokens. groups = self.get_groups(env, token) if groups: - env['REMOTE_USER'] = groups user = groups and groups.split(',', 1)[0] or '' - # We know the proxy logs the token, so we augment it just a bit - # to also log the authenticated user. - env['HTTP_X_AUTH_TOKEN'] = \ - '%s,%s' % (user, 's3' if s3 else token) + trans_id = env.get('swift.trans_id') + self.logger.debug('User: %s uses token %s (trans_id %s)' % + (user, 's3' if s3 else token, trans_id)) + env['REMOTE_USER'] = groups env['swift.authorize'] = self.authorize env['swift.clean_acl'] = clean_acl if '.reseller_admin' in groups: