Merge "Tempauth - remove change made to HTTP_X_AUTH_TOKEN"
This commit is contained in:
commit
0be53284c9
@ -141,12 +141,11 @@ class TempAuth(object):
|
|||||||
# Note: Empty reseller_prefix will match all tokens.
|
# Note: Empty reseller_prefix will match all tokens.
|
||||||
groups = self.get_groups(env, token)
|
groups = self.get_groups(env, token)
|
||||||
if groups:
|
if groups:
|
||||||
env['REMOTE_USER'] = groups
|
|
||||||
user = groups and groups.split(',', 1)[0] or ''
|
user = groups and groups.split(',', 1)[0] or ''
|
||||||
# We know the proxy logs the token, so we augment it just a bit
|
trans_id = env.get('swift.trans_id')
|
||||||
# to also log the authenticated user.
|
self.logger.debug('User: %s uses token %s (trans_id %s)' %
|
||||||
env['HTTP_X_AUTH_TOKEN'] = \
|
(user, 's3' if s3 else token, trans_id))
|
||||||
'%s,%s' % (user, 's3' if s3 else token)
|
env['REMOTE_USER'] = groups
|
||||||
env['swift.authorize'] = self.authorize
|
env['swift.authorize'] = self.authorize
|
||||||
env['swift.clean_acl'] = clean_acl
|
env['swift.clean_acl'] = clean_acl
|
||||||
if '.reseller_admin' in groups:
|
if '.reseller_admin' in groups:
|
||||||
|
Loading…
Reference in New Issue
Block a user