From 6e1b3a5644231b6f18257685cfeff7de29084f7c Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 21 Feb 2012 12:12:03 -0800 Subject: [PATCH] rgw: access key uses url safe chars Signed-off-by: Yehuda Sadeh --- teuthology/task/s3tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/teuthology/task/s3tests.py b/teuthology/task/s3tests.py index 5c64d4c260..55f76cfb6e 100644 --- a/teuthology/task/s3tests.py +++ b/teuthology/task/s3tests.py @@ -4,6 +4,8 @@ import base64 import contextlib import logging import os +import string +import random from teuthology import misc as teuthology from teuthology import contextutil @@ -43,7 +45,7 @@ def _config_user(s3tests_conf, section, user): s3tests_conf[section].setdefault('user_id', user) s3tests_conf[section].setdefault('email', '{user}+test@test.test'.format(user=user)) s3tests_conf[section].setdefault('display_name', 'Mr. {user}'.format(user=user)) - s3tests_conf[section].setdefault('access_key', base64.b64encode(os.urandom(20))) + s3tests_conf[section].setdefault('access_key', ''.join(random.choice(string.uppercase) for i in xrange(20))) s3tests_conf[section].setdefault('secret_key', base64.b64encode(os.urandom(40))) @contextlib.contextmanager -- 2.39.5