heat/heat/engine/resources/openstack
Zane Bitter 8437ec3fce Fix entropy problems with OS::Random::String
When generating a random string, once we had selected from the various
required pools, we continued by selecting a pool at random and then
selecting a character from that pool at random. This did not take into
account the differing sizes of the available pools, nor the fact that the
same character could appear in multiple pools, which resulted in a
non-uniform probability distribution of characters. Since users mostly make
use of this feature to generate default passwords for services they are
deploying, this would result in the generated passwords having slightly
less entropy than expected (and pathological cases were possible).

Rectify this by always selecting non-constrained characters from a single
combined pool, and by ensuring that each character appears only once in any
pool we're selecting from.

Since we also want to use this method to generate passwords for OpenStack
Users, the new implementation is in a separate module in heat.common rather
than mixed in with the resource's logic. Also, use a StringIO object to
collect the characters rather than repeatedly appending to a string.

Change-Id: Ia7b63e72c1e3c0649290caf4fea8a32f7f89560b
Closes-Bug: #1757300
Related-Bug: #1666129
Related-Bug: #1444429
(cherry picked from commit 6e16c051ba)
2018-03-23 12:41:06 -04:00
..
aodh Merge "Remove stack watch service" 2018-02-05 10:29:23 +00:00
barbican Add missing 'of' in order description 2017-09-04 03:47:00 +00:00
cinder Parse live data with correct key 'readonly' 2017-08-28 06:49:51 +00:00
designate Hidden OS::Designate::Record and OS::Designate::Domain 2017-10-18 01:27:34 +00:00
glance Don't override _show_resource() for image 2017-01-23 15:54:13 +08:00
heat Fix entropy problems with OS::Random::String 2018-03-23 12:41:06 -04:00
keystone Add project tags to heat orchestration 2018-01-09 16:33:13 +00:00
magnum Translate networks and subnet in cluster template 2017-12-01 12:27:13 +08:00
manila Fix python-novaclient 8.0.0 related issues 2017-05-16 16:12:04 +02:00
mistral Pass mistral execution argument by name 2018-02-16 16:11:29 +00:00
monasca Use correct raw string format 2017-11-16 18:23:58 -05:00
neutron Document RBAC Policy allowed values 2017-11-06 10:15:53 -05:00
nova Exclude updated networks - match actual interface state 2018-01-20 19:53:54 +01:00
octavia Fix some docstrings for octavia resources 2018-02-02 09:31:55 +05:30
sahara Merge "Define resource/output definition sections with constants" 2018-01-08 08:07:51 +00:00
senlin Never cache Senlin cluster outputs 2017-06-21 20:18:46 -04:00
swift Remove log translations 2017-03-25 17:11:50 +08:00
trove Enable to specify network for Trove Cluster 2017-12-15 11:52:49 +00:00
zaqar Fix OS::Zaqar::MistralSubscription with mistralclient 3.0 2017-07-17 18:26:26 -04:00
zun zun: add property mount to container 2018-02-01 04:45:05 +00:00
__init__.py Split scaling policy into separate files 2014-08-27 20:27:19 +08:00