Skip to content

Commit 28d67f5

Browse files
committed
Remove unneeded fqdn_rand_string() calls
According to the puppetlabs-stdlib documentation, fqdn_rand_string()'s second argument is the character set to use when generating the random string, and its third argument is the seed. The certonly class incorrectly passes the domain name as the second argument, causing fqdn_rand_string() to use the host's fqdn as the seed, resulting in more-frequent-than-necessary hash collisions. The current implementation of fqdn_rand() seems to provide sufficient randomness, so fqdn_rand_string() doesn't seem to be necessary.
1 parent a03cf71 commit 28d67f5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

REFERENCE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ Data type: `Any`
283283
Optional string, integer or array of minute(s) the renewal command should
284284
run. E.g. 0 or '00' or [0,30].
285285

286-
Default value: `fqdn_rand(60, fqdn_rand_string(10))`
286+
Default value: `fqdn_rand(60)`
287287

288288
##### <a name="renew_cron_monthday"></a>`renew_cron_monthday`
289289

@@ -899,7 +899,7 @@ Data type: `Variant[Integer[0,59], String, Array]`
899899
Optional minute(s) that the renewal command should execute.
900900
e.g. 0 or '00' or [0,30]. Default - seeded random minute.
901901

902-
Default value: `fqdn_rand(60, fqdn_rand_string(10, $title))`
902+
Default value: `fqdn_rand(60, $title)`
903903

904904
##### <a name="cron_monthday"></a>`cron_monthday`
905905

manifests/certonly.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
Optional[String[1]] $cron_success_command = undef,
132132
Array[Variant[Integer[0, 59], String[1]]] $cron_monthday = ['*'],
133133
Variant[Integer[0,23], String, Array] $cron_hour = fqdn_rand(24, $title),
134-
Variant[Integer[0,59], String, Array] $cron_minute = fqdn_rand(60, fqdn_rand_string(10, $title)),
134+
Variant[Integer[0,59], String, Array] $cron_minute = fqdn_rand(60, $title),
135135
Stdlib::Unixpath $config_dir = $letsencrypt::config_dir,
136136
Variant[String[1], Array[String[1]]] $pre_hook_commands = [],
137137
Variant[String[1], Array[String[1]]] $post_hook_commands = [],

manifests/init.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
$renew_additional_args = [],
7777
$renew_cron_ensure = 'absent',
7878
$renew_cron_hour = fqdn_rand(24),
79-
$renew_cron_minute = fqdn_rand(60, fqdn_rand_string(10)),
79+
$renew_cron_minute = fqdn_rand(60),
8080
$renew_cron_monthday = '*',
8181
) {
8282
if $manage_install {

0 commit comments

Comments
 (0)