William Myers
10/20/2022, 9:56 PMglee
10/20/2022, 9:57 PMglee
10/20/2022, 9:57 PMDr Bunsen Honeydew
10/20/2022, 9:57 PMsaz-ssh module at https://forge.puppet.com/saz/ssh?src=slack&channel=puppetWilliam Myers
10/20/2022, 9:57 PMclass { 'apache::mod::ssl':
ssl_protocol => ['all','-SSLv3','-TLSv1','-TLSv1.1'],
ssl_cipher => 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4',
ssl_honorcipherorder => true,
ssl_compression => false,
ssl_sessiontickets => false,
}glee
10/20/2022, 9:57 PMWilliam Myers
10/20/2022, 9:57 PMDr Bunsen Honeydew
10/20/2022, 9:57 PMsaz-ssh module at https://forge.puppet.com/saz/ssh?src=slack&channel=puppetWilliam Myers
10/20/2022, 9:58 PMclass { 'apache::mod::ssl':
ssl_protocol => ['all','-SSLv3','-TLSv1','-TLSv1.1'],
ssl_cipher => 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4',
ssl_honorcipherorder => true,
ssl_compression => false,
ssl_sessiontickets => false,
}kenyon
10/20/2022, 10:04 PMglee
10/20/2022, 10:04 PMapache::mod::ssl::ssl_protocol: ['all','-SSLv3','-TLSv1','-TLSv1.1']
apache::mod::ssl::ssl_cipher: 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4'
apache::mod::ssl::ssl_honorcipherorder: true
apache::mod::ssl::ssl_compression: false,
apache::mod::ssl::ssl_sessiontickets: falseSlackbot
10/20/2022, 10:06 PMWilliam Myers
10/20/2022, 10:08 PM# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
# include onfig_phpipam::harden_apache
class config_phpipam::harden_apache {
# <https://github.com/puppetlabs/puppetlabs-apache/blob/main/REFERENCE.md>
class { 'apache':
mpm_module => false,
purge_configs => false,
default_vhost => false,
default_mods => false,
purge_vhost_dir => true,
# Misc config
log_level => 'info',
servername => $fqdn,
# Security Configuration
trace_enable => 'Off',
server_tokens => 'ProductOnly',
server_signature => 'Off',
root_directory_options => ['None'],
root_directory_secured => true,
limitreqfields => 100,
limitreqfieldsize => 1024,
}
class { 'apache::mod::ssl':
ssl_protocol => ['all','-SSLv3','-TLSv1','-TLSv1.1'],
ssl_cipher => 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4',
ssl_honorcipherorder => true,
ssl_compression => false,
ssl_sessiontickets => false,
}
# Install Modules
class { 'apache::mod::alias': }
class { 'apache::mod::auth_basic': }
class { 'apache::mod::authn_file': }
class { 'apache::mod::dav': }
class { 'apache::mod::dav_fs': }
class { 'apache::mod::deflate': }
class { 'apache::mod::dir': }
class { 'apache::mod::negotiation': }
class { 'apache::mod::security': }
class { 'apache::mod::setenvif': }
class { 'apache::mod::rewrite': }
class { 'apache::mod::reqtimeout': }
apache::vhost { 'phpipam':
docroot => '/var/www/html/phpipam',
error_log_file => '/var/log/apache2/phpipam-error_log',
access_log_file => '/var/log/apache2/phpipam-access_log',
port => 80,
ssl => false,
serveradmin => '<mailto:webmaster@britanniahome.net|webmaster@britanniahome.net>',
servername => '<http://ipam.britanniahome.net|ipam.britanniahome.net>',
serveraliases => $fqdn,
override => ['all'],
limitreqline => 512,
limitreqbody => 102400,
directories => [
{ 'path' => '/var/www/html/phpipam',
options => ['Indexes','FollowSymLinks'],
allow_override => ['All'],
},
],
rewrites => [
{
comment => 'Restrict IP-Based Requests',
rewrite_cond => ['%{HTTP_HOST} !^<http://ipam.britanniahome.net|ipam.britanniahome.net> [NC]','%{REQUEST_URI} !^/error [NC]'],
rewrite_rule => ['^.(.*) - [L,F]'],
},
],
}
# disable status module
exec { 'a2dismod status':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/status.load',
}
# disable status module
exec { 'a2dismod autoindex -f':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/autoindex.load',
}
}William Myers
10/20/2022, 10:09 PM# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
# include onfig_phpipam::harden_apache
class config_phpipam::harden_apache {
# <https://github.com/puppetlabs/puppetlabs-apache/blob/main/REFERENCE.md>
class { 'apache':
mpm_module => false,
purge_configs => false,
default_vhost => false,
default_mods => false,
purge_vhost_dir => true,
# Misc config
log_level => 'info',
servername => $fqdn,
# Security Configuration
trace_enable => 'Off',
server_tokens => 'ProductOnly',
server_signature => 'Off',
root_directory_options => ['None'],
root_directory_secured => true,
limitreqfields => 100,
limitreqfieldsize => 1024,
}
class { 'apache::mod::ssl':
ssl_protocol => ['all','-SSLv3','-TLSv1','-TLSv1.1'],
ssl_cipher => 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4',
ssl_honorcipherorder => true,
ssl_compression => false,
ssl_sessiontickets => false,
}
# Install Modules
class { 'apache::mod::alias': }
class { 'apache::mod::auth_basic': }
class { 'apache::mod::authn_file': }
class { 'apache::mod::dav': }
class { 'apache::mod::dav_fs': }
class { 'apache::mod::deflate': }
class { 'apache::mod::dir': }
class { 'apache::mod::negotiation': }
class { 'apache::mod::security': }
class { 'apache::mod::setenvif': }
class { 'apache::mod::rewrite': }
class { 'apache::mod::reqtimeout': }
apache::vhost { 'phpipam':
docroot => '/var/www/html/phpipam',
error_log_file => '/var/log/apache2/phpipam-error_log',
access_log_file => '/var/log/apache2/phpipam-access_log',
port => 80,
ssl => false,
serveradmin => '<mailto:webmaster@britanniahome.net|webmaster@britanniahome.net>',
servername => '<http://ipam.britanniahome.net|ipam.britanniahome.net>',
serveraliases => $fqdn,
override => ['all'],
limitreqline => 512,
limitreqbody => 102400,
directories => [
{ 'path' => '/var/www/html/phpipam',
options => ['Indexes','FollowSymLinks'],
allow_override => ['All'],
},
],
rewrites => [
{
comment => 'Restrict IP-Based Requests',
rewrite_cond => ['%{HTTP_HOST} !^<http://ipam.britanniahome.net|ipam.britanniahome.net> [NC]','%{REQUEST_URI} !^/error [NC]'],
rewrite_rule => ['^.(.*) - [L,F]'],
},
],
}
# disable status module
exec { 'a2dismod status':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/status.load',
}
# disable status module
exec { 'a2dismod autoindex -f':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/autoindex.load',
}
}William Myers
10/20/2022, 10:09 PM# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
# include onfig_phpipam::harden_apache
class config_phpipam::harden_apache {
# <https://github.com/puppetlabs/puppetlabs-apache/blob/main/REFERENCE.md>
class { 'apache':
mpm_module => false,
purge_configs => false,
default_vhost => false,
default_mods => false,
purge_vhost_dir => true,
# Misc config
log_level => 'info',
servername => $fqdn,
# Security Configuration
trace_enable => 'Off',
server_tokens => 'ProductOnly',
server_signature => 'Off',
root_directory_options => ['None'],
root_directory_secured => true,
limitreqfields => 100,
limitreqfieldsize => 1024,
}
class { 'apache::mod::ssl':
ssl_protocol => ['all','-SSLv3','-TLSv1','-TLSv1.1'],
ssl_cipher => 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4',
ssl_honorcipherorder => true,
ssl_compression => false,
ssl_sessiontickets => false,
}
# Install Modules
class { 'apache::mod::alias': }
class { 'apache::mod::auth_basic': }
class { 'apache::mod::authn_file': }
class { 'apache::mod::dav': }
class { 'apache::mod::dav_fs': }
class { 'apache::mod::deflate': }
class { 'apache::mod::dir': }
class { 'apache::mod::negotiation': }
class { 'apache::mod::security': }
class { 'apache::mod::setenvif': }
class { 'apache::mod::rewrite': }
class { 'apache::mod::reqtimeout': }
apache::vhost { 'phpipam':
docroot => '/var/www/html/phpipam',
error_log_file => '/var/log/apache2/phpipam-error_log',
access_log_file => '/var/log/apache2/phpipam-access_log',
port => 80,
ssl => false,
serveradmin => '<mailto:webmaster@britanniahome.net|webmaster@britanniahome.net>',
servername => '<http://ipam.britanniahome.net|ipam.britanniahome.net>',
serveraliases => $fqdn,
override => ['all'],
limitreqline => 512,
limitreqbody => 102400,
directories => [
{ 'path' => '/var/www/html/phpipam',
options => ['Indexes','FollowSymLinks'],
allow_override => ['All'],
},
],
rewrites => [
{
comment => 'Restrict IP-Based Requests',
rewrite_cond => ['%{HTTP_HOST} !^<http://ipam.britanniahome.net|ipam.britanniahome.net> [NC]','%{REQUEST_URI} !^/error [NC]'],
rewrite_rule => ['^.(.*) - [L,F]'],
},
],
}
# disable status module
exec { 'a2dismod status':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/status.load',
}
# disable status module
exec { 'a2dismod autoindex -f':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/autoindex.load',
}
}William Myers
10/20/2022, 10:10 PM# @summary A short summary of the purpose of this class
#
# A description of what this class does
#
# @example
# include onfig_phpipam::harden_apache
class config_phpipam::harden_apache {
# <https://github.com/puppetlabs/puppetlabs-apache/blob/main/REFERENCE.md>
class { 'apache':
mpm_module => false,
purge_configs => false,
default_vhost => false,
default_mods => false,
purge_vhost_dir => true,
# Misc config
log_level => 'info',
servername => $fqdn,
# Security Configuration
trace_enable => 'Off',
server_tokens => 'ProductOnly',
server_signature => 'Off',
root_directory_options => ['None'],
root_directory_secured => true,
limitreqfields => 100,
limitreqfieldsize => 1024,
}
class { 'apache::mod::ssl':
ssl_protocol => ['all','-SSLv3','-TLSv1','-TLSv1.1'],
ssl_cipher => 'HIGH:!aNULL:!NULL:!MD5:!IDEA:!DES:!3DES:!RC4',
ssl_honorcipherorder => true,
ssl_compression => false,
ssl_sessiontickets => false,
}
# Install Modules
class { 'apache::mod::alias': }
class { 'apache::mod::auth_basic': }
class { 'apache::mod::authn_file': }
class { 'apache::mod::dav': }
class { 'apache::mod::dav_fs': }
class { 'apache::mod::deflate': }
class { 'apache::mod::dir': }
class { 'apache::mod::negotiation': }
class { 'apache::mod::security': }
class { 'apache::mod::setenvif': }
class { 'apache::mod::rewrite': }
class { 'apache::mod::reqtimeout': }
apache::vhost { 'phpipam':
docroot => '/var/www/html/phpipam',
error_log_file => '/var/log/apache2/phpipam-error_log',
access_log_file => '/var/log/apache2/phpipam-access_log',
port => 80,
ssl => false,
serveradmin => '<mailto:webmaster@britanniahome.net|webmaster@britanniahome.net>',
servername => '<http://ipam.britanniahome.net|ipam.britanniahome.net>',
serveraliases => $fqdn,
override => ['all'],
limitreqline => 512,
limitreqbody => 102400,
directories => [
{ 'path' => '/var/www/html/phpipam',
options => ['Indexes','FollowSymLinks'],
allow_override => ['All'],
},
],
rewrites => [
{
comment => 'Restrict IP-Based Requests',
rewrite_cond => ['%{HTTP_HOST} !^<http://ipam.britanniahome.net|ipam.britanniahome.net> [NC]','%{REQUEST_URI} !^/error [NC]'],
rewrite_rule => ['^.(.*) - [L,F]'],
},
],
}
# disable status module
exec { 'a2dismod status':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/status.load',
}
# disable status module
exec { 'a2dismod autoindex -f':
path => '/usr/bin:/usr/sbin:/bin',
provider => shell,
onlyif => 'test -f /etc/apache2/mods-enabled/autoindex.load',
}
}whatsaranjit
10/20/2022, 10:31 PMSlackbot
10/21/2022, 1:05 AMkenyon
10/21/2022, 2:39 AMYorokobi
10/21/2022, 2:46 AMSlackbot
10/21/2022, 10:51 AMhelindbe
10/21/2022, 10:59 AMalias instead of `lookup`in the interpolationGanaparthi Nikhil
10/21/2022, 12:53 PMSlackbot
10/21/2022, 12:53 PMJoel Wilson
10/21/2022, 1:22 PMYorokobi
10/21/2022, 2:23 PM"Execution error (RuntimeError) at RUBY/<main> (/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/feature/base.rb:19).\n(Error) Cannot determine basic system flavour\n",
can be caused by setting noexec on /tmp. This is a no-no for CIS-compliant systems. Is there any effort to move execution from /tmp to /var/tmp ?vchepkov
10/21/2022, 2:27 PMJAVA_ARGS="-<http://Djava.io|Djava.io>.tmpdir=/opt/puppetlabs/server/apps/puppetserver/tmp"Yorokobi
10/21/2022, 2:33 PMLumiere
10/21/2022, 2:34 PMLumiere
10/21/2022, 2:34 PM