From 94abc7ed3e8105cf80ad60558d01fc0839adc027 Mon Sep 17 00:00:00 2001 From: Chmouel Boudjnah Date: Fri, 2 Mar 2012 11:34:16 +0000 Subject: Make sure we have a port number before int it. - Remove unused auth_location in s3_token along the way. - Fixes bug 944720. Change-Id: Ib6e48511d09798868c5ca3fa00472525bc9f8823 --- keystone/middleware/auth_token.py | 3 +-- keystone/middleware/s3_token.py | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/keystone/middleware/auth_token.py b/keystone/middleware/auth_token.py index a6673159..a99f8c57 100644 --- a/keystone/middleware/auth_token.py +++ b/keystone/middleware/auth_token.py @@ -129,8 +129,7 @@ class AuthProtocol(object): # where to find the auth service (we use this to validate tokens) self.auth_host = conf.get('auth_host') - self.auth_port = int(conf.get('auth_port')) - + self.auth_port = int(conf.get('auth_port', 35357)) auth_protocol = conf.get('auth_protocol', 'https') if auth_protocol == 'http': self.http_client_class = httplib.HTTPConnection diff --git a/keystone/middleware/s3_token.py b/keystone/middleware/s3_token.py index 8cf3e0a0..348fcc40 100644 --- a/keystone/middleware/s3_token.py +++ b/keystone/middleware/s3_token.py @@ -45,16 +45,9 @@ class S3Token(object): # where to find the auth service (we use this to validate tokens) self.auth_host = conf.get('auth_host') - self.auth_port = int(conf.get('auth_port')) + self.auth_port = int(conf.get('auth_port', 35357)) self.auth_protocol = conf.get('auth_protocol', 'https') - # where to tell clients to find the auth service (default to url - # constructed based on endpoint we have for the service to use) - self.auth_location = conf.get('auth_uri', - '%s://%s:%s' % (self.auth_protocol, - self.auth_host, - self.auth_port)) - # Credentials used to verify this component with the Auth service since # validating tokens is a privileged call self.admin_token = conf.get('admin_token') -- cgit