Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge from Upstream #1

Closed
wants to merge 56 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
f37be7c
Using name instead of shortname in client definition for filename, fi…
fbrehm Jun 16, 2022
6fa9a86
Version bump to 3.9.2+dpx1
fbrehm Oct 31, 2022
9e3216f
Version bump to 3.9.2+dpx2 and updating CHANGELOG.md
fbrehm Jan 4, 2023
858aeae
Merge branch 'main' into pp-main
cruelsmith Aug 16, 2023
e748b88
Merge branch 'use_name_instead_of_shortname' into pp-main
cruelsmith Aug 16, 2023
2745003
Version bump to 3.9.2+dpx3 and updating CHANGELOG.md
cruelsmith Aug 16, 2023
ae121cf
Change resource names to be generic
nward Apr 7, 2023
de7ef50
Merge pull request #191 from SearchLightNZ/183-rework-manifests-to-en…
djjudas21 Aug 18, 2023
2b3f232
Bump minimum stdlib version to be 4.25.0 (#193)
sircubbi Aug 18, 2023
9eb32b6
Update to latest GitHub Actions
djjudas21 Aug 18, 2023
11e3d32
Merge pull request #204 from djjudas21/update_github_actions
nward Aug 18, 2023
97648be
Add drop-in to disable certificate bootstrap, and update systemd modu…
minorOffense Oct 31, 2022
564a719
add tests for conditional definition of systemd dropin on different OSes
nward Aug 18, 2023
781b034
Merge pull request #194 from djjudas21/144_rocky8_support
djjudas21 Aug 18, 2023
473fd51
Allow puppet 8, and update module dependencies to allow more modern v…
nward Aug 18, 2023
d91f194
Merge pull request #207 from SearchLightNZ/allow_puppet_8_and_update_…
nward Aug 18, 2023
72b165e
Fix locking in freeradius::module::detail
amateo Sep 25, 2023
7b77721
Merge pull request #211 from amateo/detail
djjudas21 Sep 27, 2023
770ab90
Adding trigger conf with test option
deligatedgeek Nov 10, 2023
8eacab2
Added reference to trigger as well
deligatedgeek Nov 10, 2023
048b5b6
Add snmp_traps array to init.pp
deligatedgeek Nov 10, 2023
b950e88
Moved hash to next line
deligatedgeek Nov 10, 2023
e05bb4e
Added server start to hash
deligatedgeek Nov 10, 2023
1f63759
test if array empty and populate it
deligatedgeek Nov 10, 2023
66544d6
Added remaining template variables
deligatedgeek Nov 10, 2023
5d98df5
Equals test with single =
deligatedgeek Nov 10, 2023
096d213
Removed an unneeded s
deligatedgeek Nov 10, 2023
cbad6ae
changing snmp_traps to undef
deligatedgeek Nov 10, 2023
f74c32f
Used second trap variable to check passed trap list
deligatedgeek Nov 10, 2023
0ddb4d1
Merge pull request #212 from sohonet/feature/snmp_traps
djjudas21 Mar 18, 2024
3b91c4d
improvment: add a new parameter to allow the use of vulnerable SSL/TL…
JGodin-C2C Apr 25, 2024
90109c9
Merge pull request #215 from camptocamp/allow_vuln_ssl
djjudas21 Apr 25, 2024
89e4243
fix: allow vulnerable ssl versions
JGodin-C2C Apr 25, 2024
4ddee71
Merge pull request #216 from camptocamp/allow_vuln_ssl
djjudas21 Apr 30, 2024
75d354d
Remove is_ip_address function removed from stdlib in 9.x
coreone May 14, 2024
93b3c83
Update the puppetlabs firewall module requirement to be >7
nward May 15, 2024
a314d78
Update calls to the firewall module with modern parameters
nward May 15, 2024
612eff6
Fix link target
nward Aug 18, 2023
4e90820
We don't use the v prefix in version numbers
djjudas21 May 15, 2024
7d3911c
Prepare release 4.0.0
djjudas21 May 15, 2024
72f3d2b
Publish on new release only
djjudas21 May 15, 2024
43a29e7
Update Forge publish action
djjudas21 May 15, 2024
738232d
Version 4.0.1 fix Puppet 8 compatibility, replace classic facts
jorhett Sep 7, 2024
20eefea
Bugfix cannot reassign variable fr_service
jorhett Sep 7, 2024
977edd1
Update metadata.json
deligatedgeek Jul 9, 2024
2542325
Update metadata.json
deligatedgeek Jul 9, 2024
e858769
Added Ubuntu Default paramters
deligatedgeek Sep 16, 2024
46977b0
Replaced buster/sid with 16.04
deligatedgeek Oct 25, 2024
acf08d6
Missing $ on facts ?
deligatedgeek Oct 25, 2024
fa1ce3f
Adding content option to policy so templates can be used.
deligatedgeek Oct 25, 2024
48c166f
Testing content and source as undefined
deligatedgeek Oct 25, 2024
d84106b
For MFA at LDAP, 1 second isnt long enough
deligatedgeek Nov 4, 2024
d8af21e
Remove subdirectories of $purged_dirs
deligatedgeek Nov 7, 2024
66b6aca
Merge pull request #234 from sohonet/fix/certs_realms_sub
djjudas21 Nov 7, 2024
e0d43fd
Merge branch 'main' into pp-main
fbrehm Nov 25, 2024
bc2a0a1
Merge remote-tracking branch 'upstream/main' into pp-main
fbrehm Nov 25, 2024
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
2 changes: 1 addition & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ fixtures:
logrotate: "puppet/logrotate"
rsyslog: "saz/rsyslog"
stdlib: "puppetlabs/stdlib"
systemd: "camptocamp/systemd"
systemd: "puppet/systemd"
11 changes: 5 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
name: Build and publish to Puppet Forge

on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Get latest tag
id: vars
run: echo ::set-output name=tag::${GITHUB_REF:10}
run: echo "{tag}=${GITHUB_REF:10}" >> $GITHUB_OUTPUT
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
ref: ${{ steps.vars.outputs.tag }}
- name: Build and publish module
uses: barnumbirr/action-forge-publish@v2.8.0
uses: barnumbirr/action-forge-publish@v2.15.0
env:
FORGE_API_KEY: ${{ secrets.FORGE_API_KEY }}
REPOSITORY_URL: https://forgeapi.puppet.com/v3/releases
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run unit tests
uses: puppets-epic-show-theatre/action-pdk-test-unit@v1
Expand All @@ -24,7 +24,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Run PDK validate
uses: puppets-epic-show-theatre/action-pdk-validate@v1
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
## Changelog

Please refer to the [GitHub releases page](https://github.com/djjudas21/puppet-freeradius/releases) for the changelog for 4.0.0 and onwards

### 3.9.2+dpx3
* Bugfix: Fix spec test for client definition
* Merge Upstream changes from main for stdlib 9.x support

### 3.9.2+dpx2
* Bugfix: Using name instead of shortname in client definition for filename, firewall rule and
huntgroup to allow the same shortname for different clients

### 3.9.2
* Bugfix: Restart FreeRADIUS after any huntgroups modification

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ Add a syslog rule (using the `saz/rsyslog` module). Default: `false`.
##### `log_auth`
Log authentication requests (yes/no). Default: `no`.

##### `allow_vulnerable_openssl`
Allow the server to start with versions of OpenSSL known to have critical vulnerabilities. (yes/no). Default: `yes`.

##### `package_ensure`
Choose whether the package is just installed and left (`installed`), or updated every Puppet run (`latest`). Default: `installed`

Expand Down Expand Up @@ -167,7 +170,7 @@ The shared secret for the status server. Required.
The port to listen for status requests on. Default: `18121`

##### `listen`
The address to listen on. Defaults to listen on all addresses but you could set this to `$::ipaddress` or `127.0.0.1`. Default: `*`
The address to listen on. Defaults to listen on all addresses but you could set this to `$facts['networking]['ip']` or `127.0.0.1`. Default: `*`

```puppet
# Enable status server
Expand Down
15 changes: 6 additions & 9 deletions manifests/attr.pp
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,24 @@
Optional[String] $prefix = 'filter',
Optional[Freeradius::Boolean] $relaxed = undef,
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group
$fr_moduleconfigpath = $::freeradius::params::fr_moduleconfigpath
$fr_modulepath = $::freeradius::params::fr_modulepath

# Install the attribute filter snippet
file { "${fr_moduleconfigpath}/attr_filter/${name}":
file { "freeradius attr_filter/${name}":
ensure => $ensure,
path => "${fr_moduleconfigpath}/attr_filter/${name}",
mode => '0640',
owner => 'root',
group => $fr_group,
source => $source,
require => [Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
require => [Package['freeradius'], Group['radiusd']],
notify => Service['radiusd'],
}

# Reference all attribute snippets in one file
concat::fragment { "attr-${name}":
target => "${fr_basepath}/mods-available/attr_filter",
concat::fragment { "freeradius attr-${name}":
target => 'freeradius mods-available/attr_filter',
content => template('freeradius/attr.erb'),
order => 20,
}
Expand Down
19 changes: 9 additions & 10 deletions manifests/blank.pp
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
# Blank unneeded config files to reduce complexity
define freeradius::blank {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group

file { "${fr_basepath}/${name}":
file { "freeradius ${name}":
path => "${fr_basepath}/${name}",
mode => '0644',
owner => 'root',
group => $fr_group,
require => [File[$fr_basepath], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
require => [File['freeradius raddb'], Package['freeradius'], Group['radiusd']],
notify => Service['radiusd'],
content => @(BLANK/L),
# This file is intentionally left blank to reduce complexity. \
Blanking it but leaving it present is safer than deleting it, \
since the package manager will replace some files if they are \
deleted, leading to unexpected behaviour!
|-BLANK
# This file is intentionally left blank to reduce complexity. \
Blanking it but leaving it present is safer than deleting it, \
since the package manager will replace some files if they are \
deleted, leading to unexpected behaviour!
|-BLANK
}
}
9 changes: 4 additions & 5 deletions manifests/cert.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Optional[String] $type = 'key',
Freeradius::Ensure $ensure = present,
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group

Expand All @@ -16,15 +14,16 @@
default => '0644',
}

file { "${fr_basepath}/certs/${name}":
file { "freeradius certs/${name}":
ensure => $ensure,
path => "${fr_basepath}/certs/${name}",
mode => $permission,
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
show_diff => false,
require => [File["${fr_basepath}/certs"], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
require => [File['freeradius certs'], Package['freeradius'], Group['radiusd']],
notify => Service['radiusd'],
}
}
22 changes: 11 additions & 11 deletions manifests/client.pp
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,18 @@
Variant[Array, Hash, String] $attributes = [],
Optional[String] $huntgroups = undef,
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group

file { "${fr_basepath}/clients.d/${name}.conf":
file { "freeradius clients.d/${name}.conf":
ensure => $ensure,
path => "${fr_basepath}/clients.d/${name}.conf",
mode => '0640',
owner => 'root',
group => $fr_group,
content => template('freeradius/client.conf.erb'),
require => [File["${fr_basepath}/clients.d"], Group[$fr_group]],
notify => Service[$fr_service],
require => [File['freeradius clients.d'], Group['radiusd']],
notify => Service['radiusd'],
}

if ($firewall and $ensure == 'present') {
Expand All @@ -62,17 +61,18 @@
if $port {
if $ip {
firewall { "100 ${name} ${port_description} v4":
proto => 'udp',
dport => $port,
action => 'accept',
source => $ip,
proto => 'udp',
dport => $port,
jump => 'ACCEPT',
protocol => 'IPv4',
source => $ip,
}
} elsif $ip6 {
firewall { "100 ${name} ${port_description} v6":
proto => 'udp',
dport => $port,
action => 'accept',
provider => 'ip6tables',
jump => 'ACCEPT',
protocol => 'IPv6',
source => $ip6,
}
}
Expand Down
9 changes: 4 additions & 5 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,18 @@
Optional[String] $content = undef,
Freeradius::Ensure $ensure = present,
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_group = $::freeradius::params::fr_group
$fr_moduleconfigpath = $::freeradius::params::fr_moduleconfigpath

file { "${fr_moduleconfigpath}/${name}":
file { "freeradius mods-config/${name}":
ensure => $ensure,
path => "${fr_moduleconfigpath}/${name}",
mode => '0640',
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
require => [Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
require => [Package['freeradius'], Group['radiusd']],
notify => Service['radiusd'],
}
}
13 changes: 6 additions & 7 deletions manifests/dictionary.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
Optional[Integer] $order = 50,
Freeradius::Ensure $ensure = 'present',
) {
$fr_package = $::freeradius::params::fr_package
$fr_service = $::freeradius::params::fr_service
$fr_basepath = $::freeradius::params::fr_basepath
$fr_group = $::freeradius::params::fr_group

Expand All @@ -15,26 +13,27 @@
}

# Install dictionary in dictionary.d
file { "${fr_basepath}/dictionary.d/dictionary.${name}":
file { "freeradius dictionary.d/dictionary.${name}":
ensure => $ensure,
path => "${fr_basepath}/dictionary.d/dictionary.${name}",
mode => '0644',
owner => 'root',
group => $fr_group,
source => $source,
content => $content,
require => [File["${fr_basepath}/dictionary.d"], Package[$fr_package], Group[$fr_group]],
notify => Service[$fr_service],
require => [File['freeradius dictionary.d'], Package['freeradius'], Group['radiusd']],
notify => Service['radiusd'],
}

# Reference policy.d in the global includes file
# If no order priority is given, assume 50

if ($ensure == 'present') {
concat::fragment { "dictionary.${name}":
target => "${fr_basepath}/dictionary",
target => 'freeradius dictionary',
content => "\$INCLUDE ${fr_basepath}/dictionary.d/dictionary.${name}",
order => $order,
require => File["${fr_basepath}/dictionary.d/dictionary.${name}"],
require => File["freeradius dictionary.d/dictionary.${name}"],
}
}
}
4 changes: 1 addition & 3 deletions manifests/home_server.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
Optional[String] $virtual_server = undef,
Optional[Integer] $zombie_period = undef,
) {
$fr_basepath = $::freeradius::params::fr_basepath

# Configure config fragment for this home server
concat::fragment { "homeserver-${name}":
target => "${fr_basepath}/proxy.conf",
target => 'freeradius proxy.conf',
content => template('freeradius/home_server.erb'),
order => 10,
}
Expand Down
4 changes: 1 addition & 3 deletions manifests/home_server_pool.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
Optional[String] $virtual_server = undef,
Optional[String] $fallback = undef,
) {
$fr_basepath = $::freeradius::params::fr_basepath

# Configure config fragment for this home server
concat::fragment { "homeserverpool-${name}":
target => "${fr_basepath}/proxy.conf",
target => 'freeradius proxy.conf',
content => template('freeradius/home_server_pool.erb'),
order => 20,
}
Expand Down
7 changes: 2 additions & 5 deletions manifests/huntgroup.pp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@
Optional[Array[String]] $conditions = [],
Optional[Variant[String, Integer]] $order = 50,
) {
$fr_basepath = $::freeradius::params::fr_basepath
$fr_service = $::freeradius::params::fr_service

concat::fragment { "huntgroup.${title}":
target => "${fr_basepath}/mods-config/preprocess/huntgroups",
target => 'freeradius mods-config/preprocess/huntgroups',
content => template('freeradius/huntgroup.erb'),
order => $order,
notify => Service[$fr_service],
notify => Service['radiusd'],
}
}
Loading
Loading