From ec70cf9605752e3b8a5c33ee7ef145f97df7567f Mon Sep 17 00:00:00 2001 From: Tim Burke Date: Mon, 10 Dec 2018 19:58:18 +0000 Subject: [PATCH] s3token: When caching is enabled, default auth_type to password Otherwise, if you just set secret_cache_duration and skip configuring auth_type, you get a not-very-obvious TypeError: sequence item 0: expected string, NoneType found bubbling up from stevedore. Now, you'd get something like MissingRequiredOptions: Auth plugin requires parameters which were not given: auth_url Change-Id: Ifddbb9df60207dfaaf0434877f4fe6af5c26bdf8 --- swift/common/middleware/s3api/s3token.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swift/common/middleware/s3api/s3token.py b/swift/common/middleware/s3api/s3token.py index db4aa77314..ab00cd747c 100644 --- a/swift/common/middleware/s3api/s3token.py +++ b/swift/common/middleware/s3api/s3token.py @@ -165,7 +165,7 @@ class S3Token(object): if self._secret_cache_duration > 0: try: auth_plugin = keystone_loading.get_plugin_loader( - conf.get('auth_type')) + conf.get('auth_type', 'password')) available_auth_options = auth_plugin.get_options() auth_options = {} for option in available_auth_options: