File tree Expand file tree Collapse file tree 6 files changed +31
-6
lines changed Expand file tree Collapse file tree 6 files changed +31
-6
lines changed Original file line number Diff line number Diff line change @@ -3319,7 +3319,7 @@ Default value: `'none'`
33193319
33203320##### <a name =" -postgresql--server--pg_hba_rule--auth_option " ></a >` auth_option `
33213321
3322- Data type: ` Optional[String] `
3322+ Data type: ` Optional[Variant[Sensitive[ String], String] ] `
33233323
33243324For certain auth_method settings there are extra options that can be passed. Consult the PostgreSQL pg_hba.conf documentation for
33253325further details.
@@ -4844,7 +4844,7 @@ Struct[{
48444844 user => String,
48454845 Optional[address] => Optional[Postgresql::Pg_hba_rule_address],
48464846 auth_method => String,
4847- Optional[auth_option] => Optional[String],
4847+ Optional[auth_option] => Optional[Variant[Sensitive[ String], String] ],
48484848 Optional[order] => Variant[String,Integer],
48494849 Optional[target] => Stdlib::Absolutepath,
48504850 Optional[postgresql_version] => String,
Original file line number Diff line number Diff line change 5959 require => Service[" postgresqld_instance_${name} " ],
6060 before => Anchor[" postgresql::server::service::end::${name} " ],
6161 }
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} " ]
6364 }
6465 }
6566
Original file line number Diff line number Diff line change 3030 String[1] $auth_method ,
3131 Optional[Postgresql::Pg_hba_rule_address] $address = undef ,
3232 String[1] $description = ' none' ,
33- Optional[String] $auth_option = undef ,
33+ Optional[Variant[Sensitive[ String], String]] $auth_option = undef ,
3434 Variant[String, Integer] $order = 150,
3535 Stdlib::Absolutepath $target = $postgresql::server::pg_hba_conf_path,
3636 String $postgresql_version = $postgresql::server::_version
Original file line number Diff line number Diff line change @@ -80,6 +80,30 @@ class { 'postgresql::server': }
8080 end
8181 end
8282
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+
83107 context 'validation' do
84108 context 'validate supported auth_method' do
85109 let :pre_condition do
Original file line number Diff line number Diff line change 77 String[1] $user,
88 Optional[Postgresql::Pg_hba_rule_address] $address,
99 String[1] $auth_method,
10- Optional[String] $auth_option,
10+ Optional[Variant[Sensitive[ String], String]] $auth_option,
1111| -%>
1212# Rule Name: <%= $name %>
1313# Description: <%= $description %>
Original file line number Diff line number Diff line change 77 user => String,
88 Optional[address] => Optional[Postgresql::Pg_hba_rule_address],
99 auth_method => String,
10- Optional[auth_option] => Optional[String],
10+ Optional[auth_option] => Optional[Variant[Sensitive[ String], String] ],
1111 Optional[order] => Variant[String,Integer],
1212 Optional[target] => Stdlib::Absolutepath,
1313 Optional[postgresql_version] => String,
You can’t perform that action at this time.
0 commit comments