diff options
author | Zuul <zuul@review.opendev.org> | 2022-11-04 16:55:25 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-11-04 16:55:25 +0000 |
commit | e4f82893dd42d37feebe9b57e045df675b25de64 (patch) | |
tree | a199501c652f638f0329647e3e72ec3209511594 /keystone/token/token_formatters.py | |
parent | ed16a1c3104edc480136313986aa840d75d2e439 (diff) | |
parent | 7810813d22f1be4e217ad9596ce392b692fadcf5 (diff) | |
download | keystone-stable/wallaby.tar.gz |
Merge "Only log warnings about token length when length exceeds max_token_size" into stable/wallabystable/wallaby
Diffstat (limited to 'keystone/token/token_formatters.py')
-rw-r--r-- | keystone/token/token_formatters.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/keystone/token/token_formatters.py b/keystone/token/token_formatters.py index bb407ab09..76220b0ef 100644 --- a/keystone/token/token_formatters.py +++ b/keystone/token/token_formatters.py @@ -156,10 +156,11 @@ class TokenFormatter(object): # characters. Even though Keystone isn't storing a Fernet token # anywhere, we can't say it isn't being stored somewhere else with # those kind of backend constraints. - if len(token) > 255: - LOG.info('Fernet token created with length of %d ' - 'characters, which exceeds 255 characters', - len(token)) + if len(token) > CONF.max_token_size: + LOG.info( + f'Fernet token created with length of {len(token)} ' + f'characters, which exceeds {CONF.max_token_size} characters', + ) return token |