summaryrefslogtreecommitdiffstats
path: root/keystonemiddleware-moon/keystonemiddleware
diff options
context:
space:
mode:
Diffstat (limited to 'keystonemiddleware-moon/keystonemiddleware')
-rw-r--r--keystonemiddleware-moon/keystonemiddleware/moon_agent.py2
-rw-r--r--keystonemiddleware-moon/keystonemiddleware/moon_mgrs/authz_mgr/authz_mgr.py14
2 files changed, 8 insertions, 8 deletions
diff --git a/keystonemiddleware-moon/keystonemiddleware/moon_agent.py b/keystonemiddleware-moon/keystonemiddleware/moon_agent.py
index 7e196ef6..fd878fea 100644
--- a/keystonemiddleware-moon/keystonemiddleware/moon_agent.py
+++ b/keystonemiddleware-moon/keystonemiddleware/moon_agent.py
@@ -82,7 +82,7 @@ class MoonAgentKeystoneMiddleware(object):
self.conf = conf
self._LOG = logging.getLogger(conf.get('log_name', __name__))
# FIXME: events are duplicated in log file
- moon_agent_fh = logging.FileHandler(CONF.moon_keystonemiddleware_agent["logfile"])
+ moon_agent_fh = logging.FileHandler(self.conf.get('logfile', "/tmp/keystonemiddleware.log"))
self._LOG.setLevel(logging.DEBUG)
self._LOG.addHandler(moon_agent_fh)
self._LOG.info(_LI('Starting Moon KeystoneMiddleware Agent'))
diff --git a/keystonemiddleware-moon/keystonemiddleware/moon_mgrs/authz_mgr/authz_mgr.py b/keystonemiddleware-moon/keystonemiddleware/moon_mgrs/authz_mgr/authz_mgr.py
index 0d81a790..9a0a4009 100644
--- a/keystonemiddleware-moon/keystonemiddleware/moon_mgrs/authz_mgr/authz_mgr.py
+++ b/keystonemiddleware-moon/keystonemiddleware/moon_mgrs/authz_mgr/authz_mgr.py
@@ -10,13 +10,13 @@ from oslo_config import cfg
_OPTS = [
- cfg.StrOpt('authz_mgr_login',
+ cfg.StrOpt('authz_login',
default="admin",
help='Name of the administrator who will connect to the Keystone Moon backends.'),
- cfg.StrOpt('authz_mgr_password',
+ cfg.StrOpt('authz_password',
default="nomoresecrete",
help='Password of the administrator who will connect to the Keystone Moon backends.'),
- cfg.StrOpt('authz_mgr_logfile',
+ cfg.StrOpt('logfile',
default="/tmp/moon_authz_mgr.log", # TODO: update in paste.init
help='File where logs goes.'),
]
@@ -34,11 +34,11 @@ class ServiceError(Exception):
class AuthzMgr(object):
def __init__(self, conf):
+ self.conf = conf
self._LOG = logging.getLogger(conf.get('log_name', __name__))
- authz_mgr_fh = logging.FileHandler(CONF.moon_authz_mgr["authz_mgr_logfile"])
+ authz_mgr_fh = logging.FileHandler(self.conf.get('logfile', "/tmp/keystonemiddleware.log"))
self._LOG.setLevel(logging.DEBUG)
self._LOG.addHandler(authz_mgr_fh)
- self._conf = conf
self.response_content = ""
def _deny_request(self, code):
@@ -67,7 +67,7 @@ class AuthzMgr(object):
self._LOG.debug('X-Auth-Token={}'.format(auth_token))
try:
_url = '{}/moon/authz/{}/{}/{}/{}'.format(
- self._conf["_request_uri"],
+ self.conf["_request_uri"],
agent_data['tenant_id'],
agent_data['user_id'],
agent_data['resource_id'],
@@ -75,7 +75,7 @@ class AuthzMgr(object):
self._LOG.info(_url)
response = requests.get(_url,
headers=headers,
- verify=self._conf["_verify"])
+ verify=self.conf["_verify"])
except requests.exceptions.RequestException as e:
self._LOG.error(_LI('HTTP connection exception: %s'), e)
resp = self._deny_request('InvalidURI')