Do not spam the log with uncritical stacktraces
This change reduces the amount of stacktrace spam in the keystone logs due to authentication attempts with identifiers that point to non-existent objects (users, domains, projects). Closes-Bug #1595513 Co-Authored-By: Rudolf Vriend <rudolf.vriend@sap.com> Change-Id: I4a8e572fe31ecda45de2e80425e22714fdd4403a
This commit is contained in:
parent
94c1c9026a
commit
ba1a07f2c3
|
@ -189,7 +189,7 @@ class AuthInfo(object):
|
|||
else:
|
||||
domain_ref = self.resource_api.get_domain(domain_id)
|
||||
except exception.DomainNotFound as e:
|
||||
LOG.exception(six.text_type(e))
|
||||
LOG.warning(six.text_type(e))
|
||||
raise exception.Unauthorized(e)
|
||||
self._assert_domain_is_enabled(domain_ref)
|
||||
return domain_ref
|
||||
|
@ -453,7 +453,7 @@ class Auth(controller.V3Controller):
|
|||
try:
|
||||
user_ref = self.identity_api.get_user(auth_context['user_id'])
|
||||
except exception.UserNotFound as e:
|
||||
LOG.exception(six.text_type(e))
|
||||
LOG.warning(six.text_type(e))
|
||||
raise exception.Unauthorized(e)
|
||||
|
||||
default_project_id = user_ref.get('default_project_id')
|
||||
|
|
|
@ -147,7 +147,7 @@ class BaseUserInfo(object):
|
|||
else:
|
||||
domain_ref = self.resource_api.get_domain(domain_id)
|
||||
except exception.DomainNotFound as e:
|
||||
LOG.exception(six.text_type(e))
|
||||
LOG.warning(six.text_type(e))
|
||||
raise exception.Unauthorized(e)
|
||||
self._assert_domain_is_enabled(domain_ref)
|
||||
return domain_ref
|
||||
|
@ -177,7 +177,7 @@ class BaseUserInfo(object):
|
|||
user_ref['domain_id'])
|
||||
self._assert_domain_is_enabled(domain_ref)
|
||||
except exception.UserNotFound as e:
|
||||
LOG.exception(six.text_type(e))
|
||||
LOG.warning(six.text_type(e))
|
||||
raise exception.Unauthorized(e)
|
||||
self._assert_user_is_enabled(user_ref)
|
||||
self.user_ref = user_ref
|
||||
|
|
Loading…
Reference in New Issue