Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
4a65345
Add support for FreeBSD 14
smortex Jun 22, 2024
35d665b
puppet/systemd: allow 8.x
jay7x Dec 14, 2024
abe6d69
Merge pull request #438 from voxpupuli/puppet-systemd-9
bastelfreak Dec 14, 2024
0d78873
Allow Sensitive[String[1]] for rootpw
Dec 16, 2024
e8161a2
Update REFERENCE.md
Dec 16, 2024
369fcda
Add PPolicyCheckModule as a valid database/overlay option.
gcoxmoz Jan 22, 2025
786cd80
Merge pull request #440 from gcoxmoz/ppolicy-check-module
bastelfreak Jan 24, 2025
931535e
Merge pull request #439 from WoutResseler/master
bastelfreak Jan 24, 2025
67cce56
Merge pull request #427 from voxpupuli/freebsd-14
bastelfreak Jan 24, 2025
66a210c
Release 8.1.0
bastelfreak Jan 24, 2025
227dfdb
Merge pull request #441 from bastelfreak/rel810
bastelfreak Jan 24, 2025
8a105e2
[blacksmith] Bump version to 8.1.1-rc0
bastelfreak Jan 24, 2025
51449a6
Replace systemd::dropin_file with systemd::manage_dropin
gcoxmoz Jan 29, 2025
b915270
Add LastBind and LastBindPrecision to database options
gcoxmoz Feb 3, 2025
540a565
Add updates for REFERENCE.md
gcoxmoz Feb 3, 2025
e8b4d61
Merge pull request #443 from gcoxmoz/lastbind-2.6
smortex Feb 4, 2025
78b9e88
Merge pull request #442 from gcoxmoz/rhel8-dropin
smortex Feb 4, 2025
7e92016
modulesync 9.4.0
bastelfreak Feb 5, 2025
5dbdecd
Merge pull request #444 from voxpupuli/modulesync
bastelfreak Feb 5, 2025
d5accaf
modulesync 9.5.0-4-g2cf9dc0
pccibot Mar 19, 2025
51f7ec3
puppet-lint: autofix
bastelfreak Mar 19, 2025
f285f42
Merge pull request #447 from voxpupuli/modulesync
bastelfreak Mar 19, 2025
237f02e
Add openvox to metadata.json
jstraw Mar 19, 2025
c3f19c2
Merge pull request #448 from voxpupuli/add-openvox
bastelfreak Mar 19, 2025
7114dda
Segment testing of openldap_overlay
gcoxmoz Feb 5, 2025
1cbe668
Remove 'name' parameter from openldap_overlay test - unused / confusing
gcoxmoz Feb 5, 2025
b5ae170
Add test case for parsing instances of olcOverlay
gcoxmoz Feb 5, 2025
d91d5ac
Add chain overlay
gcoxmoz Feb 5, 2025
f2394c9
Allow to have Sensitive[String[1]] for rootdn and rootpw.
dabelenda Apr 24, 2025
628a5d1
Merge pull request #451 from dabelenda/also_allow_rootdn_sensitive
bastelfreak May 9, 2025
1424cdd
Allow matchingRule and attrstyle in olcAccess
cbergmann May 13, 2025
b02a908
Merge pull request #445 from gcoxmoz/chain-431
smortex May 19, 2025
80477d7
Merge pull request #452 from cbergmann/patch-1
smortex May 20, 2025
53b4c22
modulesync 9.6.0-4-gdb4d91b
pccibot May 28, 2025
70f1119
Fix idents
lbetz Jun 5, 2025
4bd2944
Merge pull request #453 from voxpupuli/modulesync
lbetz Jun 5, 2025
e3f4f2f
modulesync 9.7.0-10-g2151f5f
pccibot Jun 13, 2025
6873f11
Merge pull request #454 from voxpupuli/modulesync
bastelfreak Jun 13, 2025
c99faf6
Cleanup fixtures
TheMeier Jun 18, 2025
749705d
Merge pull request #455 from voxpupuli/cleanup_fixtures
smortex Jun 20, 2025
49616ec
Use flush for all ldiff changes to an openldap_access resource
JonasVerhofste Oct 24, 2024
b1b5bc3
revert new string indexing
WimRooseUG Feb 18, 2025
976cff6
Merge branch 'UGent-DICT:ldiff_flushing' into ldiff_flushing
cbergmann Jul 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
---
fixtures:
repositories:
stdlib: 'https://github.com/puppetlabs/puppetlabs-stdlib.git'
augeasproviders_shellvar: 'https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git'
augeasproviders_core: 'https://github.com/voxpupuli/puppet-augeasproviders_core.git'
systemd: 'https://github.com/voxpupuli/puppet-systemd.git'
epel: 'https://github.com/voxpupuli/puppet-epel.git'
yumrepo_core: 'https://github.com/puppetlabs/puppetlabs-yumrepo_core.git'
augeas_core: 'https://github.com/puppetlabs/puppetlabs-augeas_core.git'
facts: 'https://github.com/puppetlabs/puppetlabs-facts.git'
puppet_agent: 'https://github.com/puppetlabs/puppetlabs-puppet_agent.git'
provision: 'https://github.com/puppetlabs/provision.git'
augeas_core: https://github.com/puppetlabs/puppetlabs-augeas_core.git
augeasproviders_core: https://github.com/voxpupuli/puppet-augeasproviders_core.git
augeasproviders_shellvar: https://github.com/voxpupuli/puppet-augeasproviders_shellvar.git
epel: https://github.com/voxpupuli/puppet-epel.git
facts: https://github.com/puppetlabs/puppetlabs-facts.git
provision: https://github.com/puppetlabs/provision.git
puppet_agent: https://github.com/puppetlabs/puppetlabs-puppet_agent.git
stdlib: https://github.com/puppetlabs/puppetlabs-stdlib.git
systemd: https://github.com/voxpupuli/puppet-systemd.git
yumrepo_core: https://github.com/puppetlabs/puppetlabs-yumrepo_core.git
17 changes: 0 additions & 17 deletions .github/stale.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: read

jobs:
puppet:
name: Puppet
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ name: "Pull Request Labeler"
on:
pull_request_target: {}

permissions:
contents: read
pull-requests: write

jobs:
labeler:
permissions:
Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

name: 'Prepare Release'

on:
workflow_dispatch:
inputs:
version:
description: 'Module version to be released. Must be a valid semver string without leading v. (1.2.3)'
required: false

permissions:
contents: write
pull-requests: write

jobs:
release_prep:
uses: 'voxpupuli/gha-puppet/.github/workflows/prepare_release.yml@v3'
with:
version: ${{ github.event.inputs.version }}
allowed_owner: 'voxpupuli'
secrets:
# Configure secrets here:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
github_pat: '${{ secrets.PCCI_PAT_RELEASE_PREP }}'
10 changes: 3 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
tags:
- '*'

permissions:
contents: write

jobs:
release:
name: Release
Expand All @@ -21,10 +24,3 @@ jobs:
# https://docs.github.com/en/actions/security-guides/encrypted-secrets
username: ${{ secrets.PUPPET_FORGE_USERNAME }}
api_key: ${{ secrets.PUPPET_FORGE_API_KEY }}

create-github-release:
name: Create GitHub Release
runs-on: ubuntu-latest
steps:
- name: Create GitHub release
uses: voxpupuli/gha-create-a-github-release@v1
2 changes: 1 addition & 1 deletion .msync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Managed by modulesync - DO NOT EDIT
# https://voxpupuli.org/docs/updating-files-managed-with-modulesync/

modulesync_config_version: '9.3.0'
modulesync_config_version: '10.0.0'
6 changes: 0 additions & 6 deletions .vscode/extensions.json

This file was deleted.

16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@ All notable changes to this project will be documented in this file.
Each new release typically also includes the latest modulesync defaults.
These should not affect the functionality of the module.

## [v8.0.0](https://github.com/voxpupuli/puppet-openldap/tree/v8.0.0) (2024-06-09)
## [v8.1.0](https://github.com/voxpupuli/puppet-openldap/tree/v8.1.0) (2025-01-24)

[Full Changelog](https://github.com/voxpupuli/puppet-openldap/compare/v8.0.0...v8.1.0)

**Implemented enhancements:**

- Add `PPolicyCheckModule` as a valid database/overlay option [\#440](https://github.com/voxpupuli/puppet-openldap/pull/440) ([gcoxmoz](https://github.com/gcoxmoz))
- Allow Sensitive\[String\[1\]\] for rootpw [\#439](https://github.com/voxpupuli/puppet-openldap/pull/439) ([WoutResseler](https://github.com/WoutResseler))
- Add support for FreeBSD 14 [\#427](https://github.com/voxpupuli/puppet-openldap/pull/427) ([smortex](https://github.com/smortex))

**Merged pull requests:**

- puppet/systemd: allow 8.x [\#438](https://github.com/voxpupuli/puppet-openldap/pull/438) ([jay7x](https://github.com/jay7x))

## [v8.0.0](https://github.com/voxpupuli/puppet-openldap/tree/v8.0.0) (2024-06-10)

[Full Changelog](https://github.com/voxpupuli/puppet-openldap/compare/v7.0.2...v8.0.0)

Expand Down
14 changes: 5 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
source ENV['GEM_SOURCE'] || 'https://rubygems.org'

group :test do
gem 'voxpupuli-test', '~> 9.0', :require => false
gem 'coveralls', :require => false
gem 'simplecov-console', :require => false
gem 'puppet_metadata', '~> 4.0', :require => false
gem 'voxpupuli-test', '~> 11.0', :require => false
gem 'puppet_metadata', '~> 5.0', :require => false
end

group :development do
Expand All @@ -16,17 +14,15 @@ group :development do
end

group :system_tests do
gem 'voxpupuli-acceptance', '~> 3.0', :require => false
gem 'voxpupuli-acceptance', '~> 3.5', :require => false
end

group :release do
gem 'voxpupuli-release', '~> 3.0', :require => false
gem 'voxpupuli-release', '~> 4.0', :require => false
end

gem 'rake', :require => false
gem 'facter', ENV['FACTER_GEM_VERSION'], :require => false, :groups => [:test]

puppetversion = ENV['PUPPET_GEM_VERSION'] || [">= 7.24", "< 9"]
gem 'puppet', puppetversion, :require => false, :groups => [:test]
gem 'openvox', ENV.fetch('OPENVOX_GEM_VERSION', [">= 7", "< 9"]), :require => false, :groups => [:test]

# vim: syntax=ruby
40 changes: 34 additions & 6 deletions REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,8 @@ The following parameters are available in the `openldap::server::database` defin
* [`dbmaxsize`](#-openldap--server--database--dbmaxsize)
* [`timelimit`](#-openldap--server--database--timelimit)
* [`updateref`](#-openldap--server--database--updateref)
* [`lastbind`](#-openldap--server--database--lastbind)
* [`lastbindprecision`](#-openldap--server--database--lastbindprecision)
* [`limits`](#-openldap--server--database--limits)
* [`dboptions`](#-openldap--server--database--dboptions)
* [`synctype`](#-openldap--server--database--synctype)
Expand Down Expand Up @@ -943,15 +945,15 @@ Default value: `undef`

##### <a name="-openldap--server--database--rootdn"></a>`rootdn`

Data type: `Optional[String[1]]`
Data type: `Optional[Variant[Sensitive[String[1]],String[1]]]`



Default value: `undef`

##### <a name="-openldap--server--database--rootpw"></a>`rootpw`

Data type: `Optional[String[1]]`
Data type: `Optional[Variant[Sensitive[String[1]],String[1]]]`



Expand Down Expand Up @@ -1003,6 +1005,22 @@ Data type: `Optional[String[1]]`



Default value: `undef`

##### <a name="-openldap--server--database--lastbind"></a>`lastbind`

Data type: `Optional[Boolean]`



Default value: `undef`

##### <a name="-openldap--server--database--lastbindprecision"></a>`lastbindprecision`

Data type: `Optional[Integer[0]]`



Default value: `undef`

##### <a name="-openldap--server--database--limits"></a>`limits`
Expand Down Expand Up @@ -1368,6 +1386,16 @@ Default value: `present`

The index of the database.

##### `lastbind`

Valid values: `true`, `false`

This option controls whether slapd will automatically maintain the pwdLastSuccess attribute for entries

##### `lastbindprecision`

specifies how frequently pwdLastSuccess will be updated

##### `limits`

Limits the number entries returned and/or the time spent by a request
Expand Down Expand Up @@ -1745,10 +1773,10 @@ Alias of

```puppet
Hash[Openldap::Access_title, Struct[{
position => Optional[Variant[Integer,String[1]]],
what => Optional[String[1]],
access => Array[Openldap::Access_rule],
suffix => Optional[String[1]],
position => Optional[Variant[Integer,String[1]]],
what => Optional[String[1]],
access => Array[Openldap::Access_rule],
suffix => Optional[String[1]],
}]]
```

Expand Down
3 changes: 3 additions & 0 deletions lib/puppet/provider/openldap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ def add_or_replace_key(key, force_replace = :false)
IndexSubstrAnyLen
IndexSubstrAnyStep
IndexIntLen
LastBind
LastBindPrecision
LastMod
ListenerThreads
LocalSSF
Expand Down Expand Up @@ -212,6 +214,7 @@ def add_or_replace_key(key, force_replace = :false)
DbMaxSize
DbMode
DbSearchStack
PPolicyCheckModule
PPolicyDefault
PPolicyHashCleartext
PPolicyForwardUpdates
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/openldap_access/olc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def self.instances
suffix = line.split[1]
when %r{^olcAccess: }
begin
position, what, bys = line.match(%r{^olcAccess:\s+\{(\d+)\}to\s+(\S+(?:\s+filter=\S+)?(?:\s+attrs=\S+)?(?:\s+val=\S+)?)(\s+by\s+.*)+$}).captures
position, what, bys = line.match(%r{^olcAccess:\s+\{(\d+)\}to\s+(\S+(?:\s+filter=\S+)?(?:\s+attrs=\S+)?(?:\s+val(?:/\S+)?(?:\.\S+)?=\S+)?)(\s+by\s+.*)+$}).captures
rescue StandardError
raise Puppet::Error, "Failed to parse olcAccess for suffix '#{suffix}': #{line}"
end
Expand Down
20 changes: 20 additions & 0 deletions lib/puppet/provider/openldap_database/olc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ def self.instances
dbmaxsize = nil
timelimit = nil
updateref = nil
lastbind = nil
lastbindprecision = nil
dboptions = {}
mirrormode = nil
multiprovider = nil
Expand Down Expand Up @@ -59,6 +61,10 @@ def self.instances
timelimit = line.split[1]
when %r{^olcUpdateref: }i
updateref = line.split[1]
when %r{^olcLastBind: }
lastbind = line.split[1] == 'TRUE' ? :true : :false
when %r{^olcLastBindPrecision: }
lastbindprecision = line.split[1]
when %r{^olcDb\S+: }i
optname, optvalue = line.split(': ', 2)
optname.downcase!
Expand Down Expand Up @@ -120,6 +126,8 @@ def self.instances
timelimit: timelimit,
dbmaxsize: dbmaxsize,
updateref: updateref,
lastbind: lastbind,
lastbindprecision: lastbindprecision,
dboptions: dboptions,
mirrormode: mirrormode,
multiprovider: multiprovider,
Expand Down Expand Up @@ -243,6 +251,8 @@ def create
t << "olcDbMaxSize: #{resource[:dbmaxsize]}\n" if resource[:dbmaxsize]
t << "olcTimeLimit: #{resource[:timelimit]}\n" if resource[:timelimit]
t << "olcUpdateref: #{resource[:updateref]}\n" if resource[:updateref]
t << "olcLastBind: #{resource[:lastbind] == :true ? 'TRUE' : 'FALSE'}\n" if resource[:lastbind]
t << "olcLastBindPrecision: #{resource[:lastbindprecision]}\n" if resource[:lastbindprecision]
resource[:dboptions]&.each do |k, v|
t << case k
when 'dbnosync'
Expand Down Expand Up @@ -338,6 +348,14 @@ def updateref=(value)
@property_flush[:updateref] = value
end

def lastbind=(value)
@property_flush[:lastbind] = value
end

def lastbindprecision=(value)
@property_flush[:lastbindprecision] = value
end

def dboptions=(value)
@property_flush[:dboptions] = value
end
Expand Down Expand Up @@ -416,6 +434,8 @@ def flush
end
t << "replace: olcSyncrepl\n#{resource[:syncrepl].map { |x| "olcSyncrepl: #{x}" }.join("\n")}\n-\n" if @property_flush[:syncrepl]
t << "replace: olcUpdateref\nolcUpdateref: #{resource[:updateref]}\n-\n" if @property_flush[:updateref]
t << "replace: olcLastBind\nolcLastBind: #{resource[:lastbind] == :true ? 'TRUE' : 'FALSE'}\n-\n" if @property_flush[:lastbind]
t << "replace: olcLastBindPrecision\nolcLastBindPrecision: #{resource[:lastbindprecision]}\n" if @property_flush[:lastbindprecision]
t << "replace: olcMirrorMode\nolcMirrorMode: #{resource[:mirrormode] == :true ? 'TRUE' : 'FALSE'}\n-\n" if @property_flush[:mirrormode]
t << "replace: olcMultiProvider\nolcMultiProvider: #{resource[:multiprovider] == :true ? 'TRUE' : 'FALSE'}\n-\n" if @property_flush[:multiprovider]
t << "replace: olcSyncUseSubentry\nolcSyncUseSubentry: #{resource[:syncusesubentry]}\n-\n" if @property_flush[:syncusesubentry]
Expand Down
7 changes: 6 additions & 1 deletion lib/puppet/provider/openldap_overlay/olc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def create
'auditlog' => 'olcAuditLogConfig',
'autoca' => 'olcAutoCAConfig',
'autogroup' => 'olcAutomaticGroups',
'chain' => 'olcChainConfig',
'collect' => 'olcCollectConfig',
'constraint' => 'olcConstraintConfig',
'dds' => 'olcDDSConfig',
Expand Down Expand Up @@ -115,7 +116,10 @@ def create
end

def getDn(suffix)
if suffix == 'cn=config'
case suffix
when 'cn=frontend'
'olcDatabase={-1}frontend,cn=config'
when 'cn=config'
if resource[:overlay].to_s == 'rwm'
slapcat('(olcDatabase=relay)').split("\n").map do |line|
return line.split[1] if line =~ %r{^dn: }
Expand All @@ -134,6 +138,7 @@ def self.getSuffix(database)
found = false
slapcat("(olcDatabase=#{database})").split("\n").map do |line|
found = true if line =~ %r{^dn: olcDatabase=#{database.gsub('{', '\{').gsub('}', '\}')},}
return 'cn=frontend' if database == '{-1}frontend'
return 'cn=config' if database == '{0}config'
return 'cn=config' if database =~ %r{\{\d+\}relay$}
return line.split[1] if line =~ %r{^olcSuffix: } && found
Expand Down
9 changes: 9 additions & 0 deletions lib/puppet/type/openldap_database.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,15 @@ def should_to_s(_newvalue)
desc 'This directive is only applicable in a slave slapd. It specifies the URL to return to clients which submit update requests upon the replica.'
end

newproperty(:lastbind, boolean: true) do
desc 'This option controls whether slapd will automatically maintain the pwdLastSuccess attribute for entries'
newvalues(:true, :false)
end

newproperty(:lastbindprecision) do
desc 'specifies how frequently pwdLastSuccess will be updated'
end

newproperty(:dboptions) do
desc 'Hash to pass specific HDB/BDB options for the database'

Expand Down
Loading