Skip to content

Commit f9b7f7f

Browse files
authored
Merge pull request #320 from gfa/gfa_mark_passwords_as_sensitive
Hide passwords from output
2 parents 8505a7c + 9592788 commit f9b7f7f

File tree

4 files changed

+18
-14
lines changed

4 files changed

+18
-14
lines changed

manifests/server/database.pp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@
9898

9999
if $database_password != undef and $manage_db_password {
100100
ini_setting { 'puppetdb_psdatabase_password':
101-
setting => 'password',
102-
value => $database_password,
101+
setting => 'password',
102+
value => $database_password,
103+
show_diff => false,
103104
}
104105
}
105106

manifests/server/read_database.pp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,9 @@
9292

9393
if $read_database_password != undef and $manage_db_password {
9494
ini_setting { 'puppetdb_read_database_password':
95-
setting => 'password',
96-
value => $read_database_password,
95+
setting => 'password',
96+
value => $read_database_password,
97+
show_diff => false,
9798
}
9899
}
99100

spec/unit/classes/server/database_ini_spec.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@
3838
it {
3939
is_expected.to contain_ini_setting('puppetdb_psdatabase_password')
4040
.with(
41-
'ensure' => 'present',
42-
'path' => "#{pdbconfdir}/database.ini",
43-
'section' => 'database',
44-
'setting' => 'password',
45-
'value' => 'puppetdb',
41+
'ensure' => 'present',
42+
'path' => "#{pdbconfdir}/database.ini",
43+
'section' => 'database',
44+
'setting' => 'password',
45+
'value' => 'puppetdb',
46+
'show_diff' => false,
4647
)
4748
}
4849
it {

spec/unit/classes/server/read_database_ini_spec.rb

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@
3838
it {
3939
is_expected.to contain_ini_setting('puppetdb_read_database_password')
4040
.with(
41-
'ensure' => 'present',
42-
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
43-
'section' => 'read-database',
44-
'setting' => 'password',
45-
'value' => 'puppetdb-read',
41+
'ensure' => 'present',
42+
'path' => '/etc/puppetlabs/puppetdb/conf.d/read_database.ini',
43+
'section' => 'read-database',
44+
'setting' => 'password',
45+
'value' => 'puppetdb-read',
46+
'show_diff' => false,
4647
)
4748
}
4849
it {

0 commit comments

Comments
 (0)