summaryrefslogtreecommitdiffstats
path: root/apachekerbauth
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2013-12-26 14:24:19 +0530
committerLuis Pabon <lpabon@redhat.com>2014-01-10 07:45:51 -0800
commitf952c756ad024e100953a43b1f297f82b5c8f3e2 (patch)
treef30f155a1fd1c1929370af1094cb83567b5aed81 /apachekerbauth
parent2f9e3120bbd7ef6b7459fccb5b740b6542b13c57 (diff)
Return X-Storage-Url in passive mode
When auth_mode is set to 'passive', client can authenticate itself using account, user and key. This enables swiftkerbauth to return X-Storage-Url response header to client. X-Storage-Url contains account name provided in the request. This required a change in X-Storage-User header format from X-Storage-User: user to X-Storage-User: account:user This makes swiftkerbauth(passive mode) handle_get_token APIs to be more consistent with that of swauth and tempauth. Change-Id: Ic1d1520bb8afbc80cca443d92d659436f2f7cd0e Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/6595 Reviewed-by: Chetan Risbud <crisbud@redhat.com> Tested-by: Chetan Risbud <crisbud@redhat.com>
Diffstat (limited to 'apachekerbauth')
-rwxr-xr-xapachekerbauth/var/www/cgi-bin/swift-auth4
1 files changed, 2 insertions, 2 deletions
diff --git a/apachekerbauth/var/www/cgi-bin/swift-auth b/apachekerbauth/var/www/cgi-bin/swift-auth
index 45df45c..11fe0e2 100755
--- a/apachekerbauth/var/www/cgi-bin/swift-auth
+++ b/apachekerbauth/var/www/cgi-bin/swift-auth
@@ -24,7 +24,7 @@ from swift.common.memcached import MemcacheRing
from time import time, ctime
from swiftkerbauth import MEMCACHE_SERVERS, TOKEN_LIFE, DEBUG_HEADERS
from swiftkerbauth.kerbauth_utils import get_remote_user, get_auth_data, \
- generate_token, set_auth_data, get_groups
+ generate_token, set_auth_data, get_groups_from_username
def main():
@@ -48,7 +48,7 @@ def main():
if not token:
token = generate_token()
expires = time() + TOKEN_LIFE
- groups = get_groups(username)
+ groups = get_groups_from_username(username)
set_auth_data(mc, username, token, expires, groups)
print "X-Auth-Token: %s" % token