Skip to content

Commit

Permalink
add parameter $backup_notls
Browse files Browse the repository at this point in the history
This new parameter is primarely introduced to workaround a bug in 389-ds
version 1.4.3, which causes TLS connections to fail. However, using an
unencrypted connection on localhost should be fine in many cases.

More information:
389ds/389-ds-base#4460
  • Loading branch information
fraenki committed Jan 20, 2021
1 parent 0e3c959 commit dc83607
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.5.0] - 2021-01-20

### Added
* Add parameter `$backup_notls` to defined type `ds_389::instance`

## [2.4.0] - 2020-11-30

### Added
Expand Down
17 changes: 15 additions & 2 deletions manifests/instance.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
# @param backup_enable
# Whether to enable a periodic backup job for this instance.
#
# @param backup_notls
# Whether to disable TLS connection for the backup job.
#
# @param base_load_ldifs
# A hash of ldif add files to load after all other config files have been added. Optional.
#
Expand Down Expand Up @@ -81,6 +84,7 @@
Variant[String,Sensitive[String]] $root_dn_pass,
String $suffix,
Boolean $backup_enable = false,
Boolean $backup_notls = false,
Boolean $create_suffix = true,
String $group = $ds_389::group,
Integer $minssf = 0,
Expand Down Expand Up @@ -554,13 +558,22 @@

# Configure backup.
if $backup_enable {
$_server_protocol = $backup_notls ? {
true => 'ldap',
default => 'ldaps',
}
$_server_port = $backup_notls ? {
true => $server_port,
default => $server_ssl_port,
}

ds_389::backup { $server_id:
protocol => 'ldaps',
protocol => $_server_protocol,
root_dn => $root_dn,
root_dn_pass => $root_dn_pass,
server_host => $server_host,
server_id => $server_id,
server_port => $server_ssl_port,
server_port => $_server_port,
}
}

Expand Down

0 comments on commit dc83607

Please sign in to comment.