diff options
author | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2017-11-07 06:29:35 +0000 |
---|---|---|
committer | Juan Antonio Osorio Robles <jaosorior@redhat.com> | 2017-11-07 13:08:11 +0200 |
commit | a8d86df94099317f2918bd0cf1f147b822bfc599 (patch) | |
tree | 34296d2052d6577c8f4fe6e99988b8f704fa577f /oslo_context/tests | |
parent | e75f4c5ad91962e272d65daa770e00f70f931ecb (diff) | |
download | oslo-context-a8d86df94099317f2918bd0cf1f147b822bfc599.tar.gz |
Ouput a placeholder instead of the auth_token2.19.3
As the name of the get_logging_values suggests, that function will
get entries from the context for logging purposes. For this, we
shouldn't need the auth_token since it might potentially leak
in the logs.
This filters out the auth_token by setting it as '***' by
default.
Change-Id: I2b245c1665c3587be3c476b803122788d186e5d5
Diffstat (limited to 'oslo_context/tests')
-rw-r--r-- | oslo_context/tests/test_context.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/oslo_context/tests/test_context.py b/oslo_context/tests/test_context.py index f81f4f0..7fb8d60 100644 --- a/oslo_context/tests/test_context.py +++ b/oslo_context/tests/test_context.py @@ -486,6 +486,7 @@ class ContextTest(test_base.BaseTestCase): d = ctx.get_logging_values() self.assertIn('auth_token', d) + self.assertEqual(d['auth_token'], '***') self.assertIn('user', d) self.assertIn('tenant', d) self.assertIn('domain', d) |