Browse Source

Password should be secured

Change-Id: Ida7de5b611ee74ebb86efe9c26a7e32db247dce8
Closes-Bug: #1676708
changes/53/450553/1
ZhongShengping 5 years ago
parent
commit
a12c6a8d77
  1. 52
      manifests/messaging/amqp.pp
  2. 6
      spec/defines/oslo_messaging_amqp_spec.rb
  3. 2
      spec/defines/oslo_messaging_default_spec.rb
  4. 2
      spec/defines/oslo_messaging_notifications_spec.rb
  5. 2
      spec/defines/oslo_messaging_rabbit_spec.rb

52
manifests/messaging/amqp.pp

@ -146,33 +146,33 @@ define oslo::messaging::amqp(
$default_send_timeout = $::os_service_default,
$default_notify_timeout = $::os_service_default,
){
$amqp_options={ 'oslo_messaging_amqp/addressing_mode' => { value => $addressing_mode },
'oslo_messaging_amqp/server_request_prefix' => { value => $server_request_prefix },
'oslo_messaging_amqp/broadcast_prefix' => { value => $broadcast_prefix },
'oslo_messaging_amqp/group_request_prefix' => { value => $group_request_prefix },
'oslo_messaging_amqp/rpc_address_prefix' => { value => $rpc_address_prefix },
'oslo_messaging_amqp/notify_address_prefix' => { value => $notify_address_prefix },
'oslo_messaging_amqp/multicast_address' => { value => $multicast_address },
'oslo_messaging_amqp/unicast_address' => { value => $unicast_address },
'oslo_messaging_amqp/anycast_address' => { value => $anycast_address },
$amqp_options={ 'oslo_messaging_amqp/addressing_mode' => { value => $addressing_mode },
'oslo_messaging_amqp/server_request_prefix' => { value => $server_request_prefix },
'oslo_messaging_amqp/broadcast_prefix' => { value => $broadcast_prefix },
'oslo_messaging_amqp/group_request_prefix' => { value => $group_request_prefix },
'oslo_messaging_amqp/rpc_address_prefix' => { value => $rpc_address_prefix },
'oslo_messaging_amqp/notify_address_prefix' => { value => $notify_address_prefix },
'oslo_messaging_amqp/multicast_address' => { value => $multicast_address },
'oslo_messaging_amqp/unicast_address' => { value => $unicast_address },
'oslo_messaging_amqp/anycast_address' => { value => $anycast_address },
'oslo_messaging_amqp/default_notification_exchange' => { value => $default_notification_exchange },
'oslo_messaging_amqp/default_rpc_exchange' => { value => $default_rpc_exchange },
'oslo_messaging_amqp/pre_settled' => { value => any2array($pre_settled) },
'oslo_messaging_amqp/container_name' => { value => $container_name },
'oslo_messaging_amqp/idle_timeout' => { value => $idle_timeout },
'oslo_messaging_amqp/trace' => { value => $trace },
'oslo_messaging_amqp/ssl_ca_file' => { value => $ssl_ca_file },
'oslo_messaging_amqp/ssl_cert_file' => { value => $ssl_cert_file },
'oslo_messaging_amqp/ssl_key_file' => { value => $ssl_key_file },
'oslo_messaging_amqp/ssl_key_password' => { value => $ssl_key_password },
'oslo_messaging_amqp/allow_insecure_clients' => { value => $allow_insecure_clients },
'oslo_messaging_amqp/sasl_mechanisms' => { value => $sasl_mechanisms },
'oslo_messaging_amqp/sasl_config_dir' => { value => $sasl_config_dir },
'oslo_messaging_amqp/sasl_config_name' => { value => $sasl_config_name },
'oslo_messaging_amqp/username' => { value => $username },
'oslo_messaging_amqp/password' => { value => $password },
'oslo_messaging_amqp/default_send_timeout' => { value => $default_send_timeout },
'oslo_messaging_amqp/default_notify_timeout' => { value => $default_notify_timeout },
'oslo_messaging_amqp/default_rpc_exchange' => { value => $default_rpc_exchange },
'oslo_messaging_amqp/pre_settled' => { value => any2array($pre_settled) },
'oslo_messaging_amqp/container_name' => { value => $container_name },
'oslo_messaging_amqp/idle_timeout' => { value => $idle_timeout },
'oslo_messaging_amqp/trace' => { value => $trace },
'oslo_messaging_amqp/ssl_ca_file' => { value => $ssl_ca_file },
'oslo_messaging_amqp/ssl_cert_file' => { value => $ssl_cert_file },
'oslo_messaging_amqp/ssl_key_file' => { value => $ssl_key_file },
'oslo_messaging_amqp/ssl_key_password' => { value => $ssl_key_password, secret => true },
'oslo_messaging_amqp/allow_insecure_clients' => { value => $allow_insecure_clients },
'oslo_messaging_amqp/sasl_mechanisms' => { value => $sasl_mechanisms },
'oslo_messaging_amqp/sasl_config_dir' => { value => $sasl_config_dir },
'oslo_messaging_amqp/sasl_config_name' => { value => $sasl_config_name },
'oslo_messaging_amqp/username' => { value => $username },
'oslo_messaging_amqp/password' => { value => $password, secret => true },
'oslo_messaging_amqp/default_send_timeout' => { value => $default_send_timeout },
'oslo_messaging_amqp/default_notify_timeout' => { value => $default_notify_timeout },
}
create_resources($name, $amqp_options)
}

6
spec/defines/oslo_messaging_amqp_spec.rb

@ -26,13 +26,13 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/ssl_ca_file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/ssl_cert_file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/ssl_key_file').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/ssl_key_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_amqp/allow_insecure_clients').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_mechanisms').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_config_dir').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/sasl_config_name').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/username').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_send_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_amqp/default_notify_timeout').with_value('<SERVICE DEFAULT>')
end
@ -52,7 +52,7 @@ describe 'oslo::messaging::amqp' do
is_expected.to contain_keystone_config('oslo_messaging_amqp/idle_timeout').with_value(2000)
is_expected.to contain_keystone_config('oslo_messaging_amqp/container_name').with_value('openstack')
is_expected.to contain_keystone_config('oslo_messaging_amqp/username').with_value('newuser')
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('p@ssw0rd')
is_expected.to contain_keystone_config('oslo_messaging_amqp/password').with_value('p@ssw0rd').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_amqp/pre_settled').with_value(['rpc-cast','rpc-reply','notify'])
end

2
spec/defines/oslo_messaging_default_spec.rb

@ -9,7 +9,7 @@ describe 'oslo::messaging::default' do
context 'with default parameters' do
it 'configure DEFAULT default params' do
is_expected.to contain_keystone_config('DEFAULT/rpc_response_timeout').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('DEFAULT/transport_url').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('DEFAULT/control_exchange').with_value('<SERVICE DEFAULT>')
end

2
spec/defines/oslo_messaging_notifications_spec.rb

@ -9,7 +9,7 @@ describe 'oslo::messaging::notifications' do
context 'with default parameters' do
it 'configure oslo_messaging_notifications default params' do
is_expected.to contain_keystone_config('oslo_messaging_notifications/driver').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_notifications/transport_url').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_notifications/transport_url').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_notifications/topics').with_value('<SERVICE DEFAULT>')
end

2
spec/defines/oslo_messaging_rabbit_spec.rb

@ -18,7 +18,7 @@ describe 'oslo::messaging::rabbit' do
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_hosts').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/ssl').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_userid').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_password').with_value('<SERVICE DEFAULT>').with_secret(true)
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_login_method').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_virtual_host').with_value('<SERVICE DEFAULT>')
is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_retry_interval').with_value('<SERVICE DEFAULT>')

Loading…
Cancel
Save