From b713a627404bb775a2003e718f1cf9c1a856432e Mon Sep 17 00:00:00 2001 From: Andrew Laski Date: Wed, 5 Oct 2016 12:54:23 -0400 Subject: [PATCH] Remove unnecessary credential sanitation for logging Now that the credentials dict is the return from context.to_policy_values() and not the context object itself there's no need to attempt to pop the 'auth_token' key out before logging. Change-Id: I3b4eacf6c7d97a4243aff026aefbb53017d5e840 --- nova/policy.py | 1 - 1 file changed, 1 deletion(-) diff --git a/nova/policy.py b/nova/policy.py index c77865ddf193..6f81fddec972 100644 --- a/nova/policy.py +++ b/nova/policy.py @@ -162,7 +162,6 @@ def authorize(context, action, target, do_raise=True, exc=None): with excutils.save_and_reraise_exception(): LOG.exception(_LE('Policy not registered')) except Exception: - credentials.pop('auth_token', None) with excutils.save_and_reraise_exception(): LOG.debug('Policy check for %(action)s failed with credentials ' '%(credentials)s',