diff --git a/murano/common/helpers/token_sanitizer.py b/murano/common/helpers/token_sanitizer.py index acb7742cc..f1ed28769 100644 --- a/murano/common/helpers/token_sanitizer.py +++ b/murano/common/helpers/token_sanitizer.py @@ -21,7 +21,8 @@ class TokenSanitizer(object): Simply searches attribute with `look a like` name as one of the token and replace it value with message. """ - def __init__(self, tokens=('token', 'pass'), message='*** SANITIZED ***'): + def __init__(self, tokens=('token', 'pass', 'trustid'), + message='*** SANITIZED ***'): """Init method of TokenSanitizer. :param tokens: iterable with tokens :param message: string by which each token going to be replaced diff --git a/murano/tests/unit/common/helpers/token_sanitizer_tests.py b/murano/tests/unit/common/helpers/token_sanitizer_tests.py index 0a47d167a..cbd98efce 100644 --- a/murano/tests/unit/common/helpers/token_sanitizer_tests.py +++ b/murano/tests/unit/common/helpers/token_sanitizer_tests.py @@ -25,11 +25,12 @@ class TokenSanitizerTests(base.MuranoTestCase): self.assertEqual(value['token'], self.sanitizer.message) def test_dict_with_few_value(self): - source = {'token': 'value', 'pass': 'value'} + source = {'token': 'value', 'pass': 'value', 'TrustId': 'value'} value = self.sanitizer.sanitize(source) self.assertEqual(value['token'], self.sanitizer.message) self.assertEqual(value['pass'], self.sanitizer.message) + self.assertEqual(value['TrustId'], self.sanitizer.message) def test_dict_with_nested_dict(self): source = {'obj': {'pass': 'value'}}