From cf8efabe0ca658b77dee0b01d82a30fa55596a8a Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Thu, 28 May 2015 07:01:30 +0100 Subject: [PATCH] Use uuid4 instead of uuid1 as a base for passwords uuid1 is intended to be uniq but not unpredictable. Knowing the mac address of the host generating the uuid and what time it was roughly generated at essentially reduces the parts of this uuid that have to be guessed from 128 bits down to less then 48, still a big number but there is no reason not to use the bigger of the two. Change-Id: If5d230a650c267247dc3a98c02a8d3021bb9eaab --- instack_undercloud/undercloud.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/instack_undercloud/undercloud.py b/instack_undercloud/undercloud.py index fe5fd3980..d3e3ad5c4 100644 --- a/instack_undercloud/undercloud.py +++ b/instack_undercloud/undercloud.py @@ -327,7 +327,7 @@ def _generate_password(length=40): Copied from rdomanager-oscplugin. This should eventually live in tripleo-common. """ - uuid_str = six.text_type(uuid.uuid1()).encode("UTF-8") + uuid_str = six.text_type(uuid.uuid4()).encode("UTF-8") return hashlib.sha1(uuid_str).hexdigest()[:length]