This module provides secure configuration of your base OS with hardening.
- Puppet
system_environment = defaultdefine the context in which the system runs. Some options don't work fordocker/lxcdesktop_enabled = falsetrue if this is a desktop system, ie Xorg, KDE/GNOME/Unity/etcenable_ipv4_forwarding = falsetrue if this system requires packet forwarding in IPv4 (eg Router), false otherwiseenable_ipv6_forwarding = falsetrue if this system requires packet forwarding in IPv6 (eg Router), false otherwiseenable_ipv6 = falsearp_restricted = truetrue if you want the behavior of announcing and replying to ARP to be restricted, false otherwiseextra_user_paths = []add additional paths to the user'sPATHvariable (default is empty).umask = "027"password_max_age = 60maximum password agepassword_min_age = 7minimum password age (before allowing any other password change)auth_retries = 5the maximum number of authentication attempts, before the account is locked for some timeauth_lockout_time = 600time in seconds that needs to pass, if the account was locked due to too many failed authentication attemptslogin_timeout = 60authentication timeout in seconds, so login will exit if this time passesallow_login_without_home = falsetrue if to allow users without home to loginpasswdqc_enabled = truetrue if you want to use strong password checking in PAM using passwdqcpasswdqc_options = "min=disabled,disabled,16,12,8"set to any option line (as a string) that you want to pass to passwdqcallow_change_user = falseif a user may usesuto change his loginenable_module_loading = truetrue if you want to allowed to change kernel modules once the system is running (egmodprobe,rmmod)load_modules = []load this modules via initramfs if enable_module_loading is falseenable_sysrq = falseenable_core_dump = falsecpu_vendor = 'intel'only required ifenable_module_loading = false: set the CPU vendor for modules to loadroot_ttys = ["console","tty1","tty2","tty3","tty4","tty5","tty6"]registered TTYs for rootwhitelist = []all files which should keep their SUID/SGID bits if set (will be combined with pre-defined whiteliste of files)blacklist = []all files which should have their SUID/SGID bits removed if set (will be combined with pre-defined blacklist of files)remove_from_unknown = falseif true will search through the mounted filesystems and make sure no files contain SUID/SGID bits (except for the user-defined and system-defined whitelist)dry_run_on_unkown = falsewhen usingremove_from_unkownand setting this to true, will not actually remove SUID/SGID bits from the found files but instead print the affected files
After adding this module, you can use the class:
class { 'os_hardening': }
For the original port of chef-os-hardening to puppet:
- Artem Sidorenko artem-sidorenko
- Frank Kloeker eumel8
- Edmund Haselwanter ehaselwanter
- Patrick Meier atomic111
Thank you all!!
- Author:: Dominik Richter dominik.richter@gmail.com
- Author:: Deutsche Telekom AG
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.