File tree 6 files changed +31
-6
lines changed
6 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -3319,7 +3319,7 @@ Default value: `'none'`
3319
3319
3320
3320
##### <a name =" -postgresql--server--pg_hba_rule--auth_option " ></a >` auth_option `
3321
3321
3322
- Data type: ` Optional[String] `
3322
+ Data type: ` Optional[Variant[Sensitive[ String], String] ] `
3323
3323
3324
3324
For certain auth_method settings there are extra options that can be passed. Consult the PostgreSQL pg_hba.conf documentation for
3325
3325
further details.
@@ -4844,7 +4844,7 @@ Struct[{
4844
4844
user => String,
4845
4845
Optional[address] => Optional[Postgresql::Pg_hba_rule_address],
4846
4846
auth_method => String,
4847
- Optional[auth_option] => Optional[String],
4847
+ Optional[auth_option] => Optional[Variant[Sensitive[ String], String] ],
4848
4848
Optional[order] => Variant[String,Integer],
4849
4849
Optional[target] => Stdlib::Absolutepath,
4850
4850
Optional[postgresql_version] => String,
Original file line number Diff line number Diff line change 59
59
require => Service[" postgresqld_instance_${name} " ],
60
60
before => Anchor[" postgresql::server::service::end::${name} " ],
61
61
}
62
- Postgresql::Server::Database <| title == $default_database |> -> Postgresql_conn_validator[" validate_service_is_running_instance_${name} " ]
62
+ Postgresql::Server::Database <| title == $default_database |>
63
+ -> Postgresql_conn_validator[" validate_service_is_running_instance_${name} " ]
63
64
}
64
65
}
65
66
Original file line number Diff line number Diff line change 30
30
String[1] $auth_method ,
31
31
Optional[Postgresql::Pg_hba_rule_address] $address = undef ,
32
32
String[1] $description = ' none' ,
33
- Optional[String] $auth_option = undef ,
33
+ Optional[Variant[Sensitive[ String], String]] $auth_option = undef ,
34
34
Variant[String, Integer] $order = 150,
35
35
Stdlib::Absolutepath $target = $postgresql::server::pg_hba_conf_path,
36
36
String $postgresql_version = $postgresql::server::_version
Original file line number Diff line number Diff line change @@ -80,6 +80,30 @@ class { 'postgresql::server': }
80
80
end
81
81
end
82
82
83
+ context 'test template 3 with sensitive Data' do
84
+ let :pre_condition do
85
+ <<-MANIFEST
86
+ class { 'postgresql::server': }
87
+ MANIFEST
88
+ end
89
+
90
+ let :params do
91
+ {
92
+ type : 'host' ,
93
+ database : 'all' ,
94
+ user : 'all' ,
95
+ address : '0.0.0.0/0' ,
96
+ auth_method : 'ldap' ,
97
+ auth_option : sensitive ( 'foo=bar' ) ,
98
+ target : target
99
+ }
100
+ end
101
+
102
+ it do
103
+ expect ( subject ) . to contain_concat__fragment ( 'pg_hba_rule_test' ) . with ( content : sensitive ( %r{host\s +all\s +all\s +0\. 0\. 0\. 0/0\s +ldap\s +foo=bar} ) )
104
+ end
105
+ end
106
+
83
107
context 'validation' do
84
108
context 'validate supported auth_method' do
85
109
let :pre_condition do
Original file line number Diff line number Diff line change 7
7
String[1] $user,
8
8
Optional[Postgresql::Pg_hba_rule_address] $address,
9
9
String[1] $auth_method,
10
- Optional[String] $auth_option,
10
+ Optional[Variant[Sensitive[ String], String]] $auth_option,
11
11
| -%>
12
12
# Rule Name: <%= $name %>
13
13
# Description: <%= $description %>
Original file line number Diff line number Diff line change 7
7
user => String,
8
8
Optional[address] => Optional[Postgresql::Pg_hba_rule_address],
9
9
auth_method => String,
10
- Optional[auth_option] => Optional[String],
10
+ Optional[auth_option] => Optional[Variant[Sensitive[ String], String] ],
11
11
Optional[order] => Variant[String,Integer],
12
12
Optional[target] => Stdlib::Absolutepath,
13
13
Optional[postgresql_version] => String,
You can’t perform that action at this time.
0 commit comments