Merge "s3token: Raise error on negative secret_cache_duration config"

This commit is contained in:
Zuul 2020-01-31 19:03:56 +00:00 committed by Gerrit Code Review
commit 43b43ca94a
1 changed files with 3 additions and 1 deletions

View File

@ -179,7 +179,9 @@ class S3Token(object):
self._verify = None
self._secret_cache_duration = int(conf.get('secret_cache_duration', 0))
if self._secret_cache_duration > 0:
if self._secret_cache_duration < 0:
raise ValueError('secret_cache_duration must be non-negative')
if self._secret_cache_duration:
try:
auth_plugin = keystone_loading.get_plugin_loader(
conf.get('auth_type', 'password'))