Why this SSSD module, when there are so many others on the forge?
This is a minimalist SSSD module that supports incrementally building the config (via /etc/sssd/conf.d) or setting it all at once.
- Description
- Setup - The basics of getting started with sssd
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Manage the SSD package, config, and services. You can manage some or all of these elements. Additionally you can build the SSSD config incrementally via either the $configs parameter or by calling the sssd::config defined type yourself.
Simply including the class is enough to get the packages and services. If you want any running authentication domains, you'll need to add those. Examples are included in the Usage section.
The two parameters you probably care most about are $main_config and $configs.
The key thing to remember is if a domain is not listed within
[sssd]
domains=XXXXXXXXXXXIt will not be consulted. So when dropping in overrides make sure to set the domain as you want it.
NOTE: sssd does not merge the config elements. An override from inside /etc/sssd/conf.d/*.conf will REPLACE the entry defined earlier. If you are defining domains somewhat dynamically, you'll need to get that sorted out.
This is a hash that gets mapped directly into /etc/sssd/sssd.conf (or your $main_config_file)
The "value" entries can be either a String or an Array. In the case of an Array, the content will be automatically joined with a ', ' in your config file. This should let you merge and knockout elements as needed and possibly have cleaner looking formatting.
class { 'sssd':
main_config => {
sssd => {
'setting' => ['value', 'a']
},
pam => {
'setting' => 'value, a'
},
nss => {
'setting' => 'value'
},
sudo => {
'setting' => 'value'
},
domain/a => {
'setting' => 'value'
},
domain/b => {
'setting' => 'value'
},
}
}or in hiera
sssd::main_config:
sssd:
setting:
- value
- a
pam:
setting: 'value, a'
nss:
setting: value
sudo:
setting: value
'domain/a':
setting:value
'domain/b':
setting:valueThese will produce
[sssd]
setting=value, a
[pam]
setting=value, a
[nss]
setting=value
[sudo]
setting=value
[domain/a]
setting=value
[domain/b]
setting=valueItems in the $configs hash are passed directly into the sssd::config defined type.
Their structure is basically the same as main_config, but with one extra layer of nesting.
sssd::main_config:
sssd:
setting:
- value
- a
pam:
setting: 'value, a'
sssd::configs:
'override sssd':
filename: example.conf
stanzas:
sssd:
setting:
- value
- b
override_pam:
stanzas:
pam:
debug: 0This will produce the $main_config in /etc/sssd/sssd.conf and extra configs in /etc/sssd/conf.d containing the stanzas defined under each title.
# /etc/sssd/sssd.conf
[sssd]
setting=value, a
[pam]
setting=value, a#/etc/sssd/conf.d/example.conf
[sssd]
setting=value, b#/etc/sssd/conf.d/50-pam.conf
[pam]
debug=0Newer versions of sssd runs as user sssd instead of root.
On Enterprise Linux 10 (RHEL, CentOS Stream, Rocky, AlmaLinux and Oracle Linux), the module defaults already match the permissions shipped by the sssd-common package, so no extra configuration is needed.
On Debian 13, sssd still runs as root, but sssd.service resets /etc/sssd to root:root and adds group read at every start. The module defaults match those permissions so Puppet does not keep reverting them.
On other platforms, the module assumes that the service is running as root. The changes below will allow it to run as the sssd user.
sssd::pki_group: sssd
sssd::pki_mode: '0751'
sssd::advanced_permissions: trueWhen sssd::advanced_permissions is enabled, sssd::config resources default to the main_config_* ownership and mode.
The following parameters can be used to tweak owner and group ownership and file mode for directories and files:
sssd::config_dir_owner
sssd::config_dir_group
sssd::config_dir_mode
sssd::main_config_owner
sssd::main_config_group
sssd::main_config_mode
This module specifically does not manipulate files or services
that do not belong to sssd. There are other modules on the forge
that can configure pam/authselect and oddjob/login.defs.
If you want to manipulate the sssd startup units, I'd recommend the
systemd::dropin features from puppet-systemd
SSSD makes use of inotify to watch some files. The inotify appears to run with all permissions dropped, so non-world accessible files cannot be watched.
Hop on over to the git repo listed in metadata.json
