diff --git a/lib/pact_broker/config/basic_auth_configuration.rb b/lib/pact_broker/config/basic_auth_configuration.rb index 5a046bab0..5946beebf 100644 --- a/lib/pact_broker/config/basic_auth_configuration.rb +++ b/lib/pact_broker/config/basic_auth_configuration.rb @@ -20,6 +20,13 @@ def self.included(anyway_config) sensitive_values(:basic_auth_password, :basic_auth_read_only_password) + coerce_types( + basic_auth_username: :string, + basic_auth_password: :string, + basic_auth_read_only_username: :string, + basic_auth_read_only_password: :string + ) + def basic_auth_credentials_provided? basic_auth_username&.not_blank? && basic_auth_password&.not_blank? end diff --git a/lib/pact_broker/config/runtime_configuration_database_methods.rb b/lib/pact_broker/config/runtime_configuration_database_methods.rb index fd674b454..2bc499e7a 100644 --- a/lib/pact_broker/config/runtime_configuration_database_methods.rb +++ b/lib/pact_broker/config/runtime_configuration_database_methods.rb @@ -31,6 +31,11 @@ def self.included(anyway_config) database_connection_validation_timeout: nil ) + coerce_types( + database_username: :string, + database_password: :string + ) + def database_configuration database_credentials .merge(