diff --git a/magnum/api/auth.py b/magnum/api/auth.py index 2b36c33f5d..7d0326fcee 100644 --- a/magnum/api/auth.py +++ b/magnum/api/auth.py @@ -15,7 +15,7 @@ import re -from keystoneclient.middleware import auth_token +from keystonemiddleware import auth_token from oslo.config import cfg from oslo.utils import importutils from pecan import hooks @@ -38,7 +38,6 @@ AUTH_OPTS = [ CONF = cfg.CONF CONF.register_opts(AUTH_OPTS) -CONF.register_opts(auth_token.opts, group=OPT_GROUP_NAME) PUBLIC_ENDPOINTS = [ ] @@ -79,7 +78,7 @@ class AuthProtocolWrapper(auth_token.AuthProtocol): def __call__(self, env, start_response): path = env.get('PATH_INFO') if AUTH.is_endpoint_public(path): - return self.app(env, start_response) + return self._app(env, start_response) return super(AuthProtocolWrapper, self).__call__(env, start_response) @@ -117,7 +116,7 @@ class AuthInformationHook(hooks.PecanHook): raise Exception('Not authorized') auth_url = headers.get('X-Auth-Url') if auth_url is None: - importutils.import_module('keystoneclient.middleware.auth_token') + importutils.import_module('keystonemiddleware.auth_token') auth_url = cfg.CONF.keystone_authtoken.auth_uri auth_token_info = state.request.environ.get('keystone.token_info') diff --git a/requirements.txt b/requirements.txt index 3589c1709f..88953ff15c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,6 +11,7 @@ oslo.messaging>=1.4.0 oslo.serialization>=1.0.0 oslo.utils>=1.0.0 pecan>=0.8.0 +keystonemiddleware>=1.0.0 python-keystoneclient>=0.11.1 python-zaqarclient>=0.0.3 six>=1.7.0