Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit 91075d2

Browse files
committed
Use secretbox to store randomly generated passwords
Secretbox is a function that generates a random password on first call and then retrieves those values for subsequent calls. This works in both master and masterless environments. See: https://forge.puppetlabs.com/sdodson/secretbox
1 parent 6fd2b7b commit 91075d2

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

.fixtures.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ fixtures:
22
repositories:
33
lokkit: "git://github.com/rharrison10/puppet-lokkit.git"
44
ntp: "git://github.com/puppetlabs/puppetlabs-ntp.git"
5+
secretbox: "git://github.com/sdodson/puppet-secretbox.git"
56
selinux_types: "git://github.com/blentz/puppet-selinux_types.git"
67
stdlib: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
78
sysctl: "git://github.com/duritong/puppet-sysctl.git"

Modulefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ dependency 'blentz/selinux_types', '>=0.1.0'
1313
dependency 'puppetlabs/haproxy', '>=0.4.1'
1414
dependency 'arioch/keepalived', '>=0.0.10'
1515
dependency 'duritong/sysctl', '>=0.0.6'
16+
dependency 'sdodson/secretbox', '>=0.1.2'

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@
807807
$msgserver_cluster_members = undef,
808808
$mcollective_cluster_members = undef,
809809
$msgserver_password = 'changeme',
810-
$msgserver_admin_password = inline_template('<%= require "securerandom"; SecureRandom.base64 %>'),
810+
$msgserver_admin_password = secretbox('msgserver_admin_password',16,'base64'),
811811
$mcollective_user = 'mcollective',
812812
$mcollective_password = 'marionette',
813813
$mongodb_admin_user = 'admin',
@@ -825,7 +825,7 @@
825825
$mongodb_key = 'changeme',
826826
$openshift_user1 = 'demo',
827827
$openshift_password1 = 'changeme',
828-
$conf_broker_auth_salt = inline_template('<%= require "securerandom"; SecureRandom.base64 %>'),
828+
$conf_broker_auth_salt = secretbox('conf_broker_auth_salt',16,'base64'),
829829
$conf_broker_auth_private_key = undef,
830830
$conf_broker_session_secret = undef,
831831
$conf_broker_multi_haproxy_per_node = false,

metadata.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@
5959
{
6060
"name": "duritong/sysctl",
6161
"version_requirement": ">=0.0.6"
62+
},
63+
{
64+
"name": "sdodson/secretbox",
65+
"version_requirement": ">=0.1.2"
6266
}
6367
]
6468
}

0 commit comments

Comments
 (0)