|
293 | 293 | # |
294 | 294 | # @param tls_mode |
295 | 295 | # Defines if TLS is used for all network connections. Allowed values are 'requireTLS', 'preferTLS' or 'allowTLS'. |
| 296 | +# |
| 297 | +# @param tls_use_system_ca |
| 298 | +# Use the system-wide CA certificate store when connecting to a TLS-enabled server. |
| 299 | +# |
| 300 | +# @param tls_cluster_key |
| 301 | +# File that contains the x.509 certificate-key file for membership authentication for the cluster or replica set. |
| 302 | +# |
| 303 | +# @param tls_cluster_ca |
| 304 | +# file that contains the root certificate chain from the Certificate Authority used to validate the certificate |
| 305 | +# presented by a client establishing a connection. |
| 306 | +# |
| 307 | +# @param tls_invalid_certificates |
| 308 | +# Enable or disable the validation checks for TLS/SSL certificates on other servers in the cluster and allows |
| 309 | +# the use of invalid certificates. |
| 310 | +# |
296 | 311 | # @param admin_password_hash |
297 | 312 | # Hashed password. Hex encoded md5 hash of mongodb password. |
298 | 313 | # |
|
316 | 331 | # Administrator authentication mechanism. scram_sha_256 password synchronization verification is not supported. |
317 | 332 | # |
318 | 333 | # @param supported_auth_mechanisms |
319 | | -# Set the supported authentication mechanisms that the mmongoserver will support. Is set, make sure the $admin_auth_mechanism is also included. |
| 334 | +# Set the supported authentication mechanisms that the mmongoserver will support. Is set, make sure the |
| 335 | +# $admin_auth_mechanism is also included. |
320 | 336 | # |
321 | 337 | # @param admin_tls_key |
322 | 338 | # Filepath of the administrators x509 certificate. Its the user of this class that needs to manage this certificate. |
|
399 | 415 | $config_content = undef, |
400 | 416 | Optional[String] $config_template = undef, |
401 | 417 | Optional[Hash] $config_data = undef, |
402 | | - Optional[Boolean] $ssl = undef, |
| 418 | + Boolean $ssl = false, |
403 | 419 | Optional[Stdlib::Absolutepath] $ssl_key = undef, |
404 | 420 | Optional[Stdlib::Absolutepath] $ssl_ca = undef, |
405 | 421 | Boolean $ssl_weak_cert = false, |
406 | 422 | Boolean $ssl_invalid_hostnames = false, |
407 | | - Enum['requireSSL', 'preferSSL', 'allowSSL'] $ssl_mode = 'requireSSL', |
408 | | - Boolean $tls = false, |
| 423 | + Enum['disabled', 'requireSSL', 'preferSSL', 'allowSSL'] $ssl_mode = 'disabled', |
| 424 | + Boolean $tls = true, |
| 425 | + Enum['disabled', 'requireTLS', 'preferTLS', 'allowTLS'] $tls_mode = 'requireTLS', |
| 426 | + # cluster tls settings |
| 427 | + Optional[Boolean] $tls_use_system_ca = undef, |
| 428 | + Optional[Stdlib::Absolutepath] $tls_cluster_key = undef, |
| 429 | + Optional[Stdlib::Absolutepath] $tls_cluster_ca = undef, |
| 430 | + #client tls settings |
409 | 431 | Optional[Stdlib::Absolutepath] $tls_key = undef, |
410 | 432 | Optional[Stdlib::Absolutepath] $tls_ca = undef, |
411 | 433 | Boolean $tls_conn_without_cert = false, |
412 | 434 | Boolean $tls_invalid_hostnames = false, |
413 | | - Enum['requireTLS', 'preferTLS', 'allowTLS'] $tls_mode = 'requireTLS', |
| 435 | + Boolean $tls_invalid_certificates = false, |
414 | 436 | Boolean $restart = $mongodb::params::restart, |
415 | 437 | Optional[String] $storage_engine = undef, |
416 | 438 | Boolean $create_admin = $mongodb::params::create_admin, |
|
449 | 471 | $admin_password |
450 | 472 | } |
451 | 473 |
|
452 | | - # using x509, we need the admin clent certificate in the parameter --tlsCertificateKeyFile |
| 474 | + # Using x509, we need the admin client certificate in the parameter --tlsCertificateKeyFile |
453 | 475 | # there is no way where we can set this in neither the /etc/momgosh.yaml or the /etc/mongod.conf |
454 | 476 | # The mongodb provider reads in /etc/mongod.conf setParameters.authenticationMechanisms: MONGODB-X509 settings |
455 | 477 | # to determine that a client cert authentication is used. There is no setting to set the client cert to be used. |
456 | | - # so we store it in a file in roots home directory. (this is done in mongodb::server::config |
| 478 | + # so we store it in a file in roots home directory. (this is done in mongodb::server::config) |
457 | 479 |
|
458 | 480 | if $create_admin and ($service_ensure == 'running' or $service_ensure == true) { |
459 | 481 | mongodb::db { 'admin': |
|
0 commit comments