Skip to content

Commit 875256f

Browse files
committed
Change all passwords default values to Sensitive
Default values for passwords is a terrible idea. Removing them is a backwards-incompatible change, so we jump on this occasion to mandate the use of Sensitive data type to pass passwords. In order to be able to test each change, we first switch these default values to Sensitive. This will allow us to remove support for String passwords next, and then the default values.
1 parent 5493743 commit 875256f

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

REFERENCE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ Data type: `Bacula::Password`
384384

385385
A password to use for communication with this File Daemon
386386

387-
Default value: `'secret'`
387+
Default value: `Sensitive('secret')`
388388

389389
##### <a name="-bacula--client--max_concurrent_jobs"></a>`max_concurrent_jobs`
390390

@@ -589,7 +589,7 @@ Data type: `Bacula::Password`
589589

590590
The database user's password
591591

592-
Default value: `'notverysecret'`
592+
Default value: `Sensitive('notverysecret')`
593593

594594
##### <a name="-bacula--director--db_user"></a>`db_user`
595595

@@ -686,7 +686,7 @@ Data type: `Bacula::Password`
686686

687687
password to connect to the director
688688

689-
Default value: `'secret'`
689+
Default value: `Sensitive('secret')`
690690

691691
##### <a name="-bacula--director--port"></a>`port`
692692

@@ -941,7 +941,7 @@ Data type: `Bacula::Password`
941941

942942
Specifies the password that must be supplied by the named Director
943943

944-
Default value: `'secret'`
944+
Default value: `Sensitive('secret')`
945945

946946
##### <a name="-bacula--storage--port"></a>`port`
947947

@@ -1482,7 +1482,7 @@ Data type: `Bacula::Password`
14821482

14831483
Bacula director configuration for Storage option 'Password'
14841484

1485-
Default value: `'secret'`
1485+
Default value: `Sensitive('secret')`
14861486

14871487
##### <a name="-bacula--director--storage--device_name"></a>`device_name`
14881488

manifests/client.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
String[1] $ensure = 'present',
6464
Stdlib::Port $port = 9102,
6565
Array[String[1]] $listen_address = [],
66-
Bacula::Password $password = 'secret',
66+
Bacula::Password $password = Sensitive('secret'),
6767
Integer[1] $max_concurrent_jobs = 2,
6868
String[1] $director_name = $bacula::director_name,
6969
Bacula::Yesno $autoprune = true,

manifests/director.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
Bacula::Yesno $manage_db = true,
4545
Stdlib::Absolutepath $conf_dir = $bacula::conf_dir,
4646
String[1] $db_name = 'bacula',
47-
Bacula::Password $db_pw = 'notverysecret',
47+
Bacula::Password $db_pw = Sensitive('notverysecret'),
4848
String[1] $db_user = 'bacula',
4949
Optional[String[1]] $db_address = undef,
5050
Optional[Stdlib::Port] $db_port = undef,
@@ -56,7 +56,7 @@
5656
Array[String[1]] $listen_address = [],
5757
Integer[1] $max_concurrent_jobs = 20,
5858
Boolean $manage_defaults = true,
59-
Bacula::Password $password = 'secret',
59+
Bacula::Password $password = Sensitive('secret'),
6060
Stdlib::Port $port = 9101,
6161
Stdlib::Absolutepath $rundir = $bacula::rundir,
6262
String[1] $storage_name = $bacula::storage_name,

manifests/director/storage.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
define bacula::director::storage (
2020
String[1] $address = $name,
2121
Stdlib::Port $port = 9103,
22-
Bacula::Password $password = 'secret',
22+
Bacula::Password $password = Sensitive('secret'),
2323
String[1] $device_name = "${facts['networking']['fqdn']}-device",
2424
String[1] $media_type = 'File',
2525
Optional[Integer[1]] $maxconcurjobs = undef,

manifests/storage.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
Optional[Integer[1]] $maxconcurjobs = undef,
4646
Integer[1] $max_concurrent_jobs = 20,
4747
String[1] $media_type = 'File',
48-
Bacula::Password $password = 'secret',
48+
Bacula::Password $password = Sensitive('secret'),
4949
Stdlib::Port $port = 9103,
5050
Stdlib::Absolutepath $rundir = $bacula::rundir,
5151
String[1] $storage = $trusted['certname'], # storage here is not storage_name

0 commit comments

Comments
 (0)