cloud-mu 3.6.10 → 3.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/Berksfile +2 -3
  3. data/Berksfile.lock +11 -14
  4. data/bin/mu-aws-setup +16 -4
  5. data/bin/mu-configure +2 -1
  6. data/cloud-mu.gemspec +2 -2
  7. data/cookbooks/mu-firewall/Berksfile +1 -1
  8. data/cookbooks/mu-firewall/attributes/default.rb +2 -2
  9. data/cookbooks/mu-firewall/metadata.rb +3 -3
  10. data/cookbooks/mu-firewall/recipes/default.rb +11 -2
  11. data/cookbooks/mu-master/Berksfile +1 -1
  12. data/cookbooks/mu-master/attributes/default.rb +14 -1
  13. data/cookbooks/mu-master/files/default/389ds-perl/ASDialogs.pm +173 -0
  14. data/cookbooks/mu-master/files/default/389ds-perl/AdminMigration.pm +569 -0
  15. data/cookbooks/mu-master/files/default/389ds-perl/AdminServer.pm +952 -0
  16. data/cookbooks/mu-master/files/default/389ds-perl/AdminUtil.pm +983 -0
  17. data/cookbooks/mu-master/files/default/389ds-perl/ConfigDSDialogs.pm +449 -0
  18. data/cookbooks/mu-master/files/default/389ds-perl/DSCreate.pm +1551 -0
  19. data/cookbooks/mu-master/files/default/389ds-perl/DSDialogs.pm +233 -0
  20. data/cookbooks/mu-master/files/default/389ds-perl/DSMigration.pm +1175 -0
  21. data/cookbooks/mu-master/files/default/389ds-perl/DSUpdate.pm +534 -0
  22. data/cookbooks/mu-master/files/default/389ds-perl/DSUpdateDialogs.pm +152 -0
  23. data/cookbooks/mu-master/files/default/389ds-perl/DSUtil.pm +1710 -0
  24. data/cookbooks/mu-master/files/default/389ds-perl/Dialog.pm +249 -0
  25. data/cookbooks/mu-master/files/default/389ds-perl/DialogManager.pm +212 -0
  26. data/cookbooks/mu-master/files/default/389ds-perl/FileConn.pm +461 -0
  27. data/cookbooks/mu-master/files/default/389ds-perl/Inf.pm +268 -0
  28. data/cookbooks/mu-master/files/default/389ds-perl/Migration.pm +327 -0
  29. data/cookbooks/mu-master/files/default/389ds-perl/RegDSDialogs.pm +94 -0
  30. data/cookbooks/mu-master/files/default/389ds-perl/Resource.pm +137 -0
  31. data/cookbooks/mu-master/files/default/389ds-perl/Setup.pm +240 -0
  32. data/cookbooks/mu-master/files/default/389ds-perl/SetupDialogs.pm +243 -0
  33. data/cookbooks/mu-master/files/default/389ds-perl/SetupLog.pm +82 -0
  34. data/cookbooks/mu-master/files/default/setCertName.ldif +4 -0
  35. data/cookbooks/mu-master/libraries/mu.rb +2 -2
  36. data/cookbooks/mu-master/metadata.rb +1 -1
  37. data/cookbooks/mu-master/recipes/389ds.rb +71 -32
  38. data/cookbooks/mu-master/recipes/basepackages.rb +5 -0
  39. data/cookbooks/mu-master/recipes/default.rb +16 -5
  40. data/cookbooks/mu-master/recipes/init.rb +36 -3
  41. data/cookbooks/mu-master/recipes/ssl-certs.rb +6 -0
  42. data/cookbooks/mu-master/recipes/sssd.rb +85 -62
  43. data/cookbooks/mu-master/recipes/update_nagios_only.rb +7 -1
  44. data/cookbooks/mu-master/templates/default/389-directory-setup.inf.erb +11 -26
  45. data/cookbooks/mu-master/templates/default/sssd.conf.erb +18 -8
  46. data/cookbooks/mu-tools/files/default/Mu_CA.pem +33 -0
  47. data/cookbooks/mu-tools/metadata.rb +0 -1
  48. data/cookbooks/mu-tools/recipes/set_local_fw.rb +7 -1
  49. data/cookbooks/mu-tools/templates/amazon/sshd_config.erb +5 -1
  50. data/cookbooks/nagios/CHANGELOG.md +679 -0
  51. data/cookbooks/nagios/LICENSE +201 -0
  52. data/cookbooks/nagios/README.md +340 -0
  53. data/cookbooks/nagios/attributes/config.rb +163 -0
  54. data/cookbooks/nagios/attributes/default.rb +204 -0
  55. data/cookbooks/nagios/libraries/base.rb +311 -0
  56. data/cookbooks/nagios/libraries/command.rb +68 -0
  57. data/cookbooks/nagios/libraries/contact.rb +229 -0
  58. data/cookbooks/nagios/libraries/contactgroup.rb +111 -0
  59. data/cookbooks/{firewall/recipes/disable_firewall.rb → nagios/libraries/custom_option.rb} +20 -7
  60. data/cookbooks/nagios/libraries/data_bag_helper.rb +23 -0
  61. data/cookbooks/nagios/libraries/default.rb +90 -0
  62. data/cookbooks/nagios/libraries/helpers.rb +229 -0
  63. data/cookbooks/nagios/libraries/host.rb +410 -0
  64. data/cookbooks/nagios/libraries/hostdependency.rb +178 -0
  65. data/cookbooks/nagios/libraries/hostescalation.rb +170 -0
  66. data/cookbooks/nagios/libraries/hostgroup.rb +117 -0
  67. data/cookbooks/nagios/libraries/nagios.rb +277 -0
  68. data/cookbooks/nagios/libraries/resource.rb +59 -0
  69. data/cookbooks/nagios/libraries/service.rb +449 -0
  70. data/cookbooks/nagios/libraries/servicedependency.rb +213 -0
  71. data/cookbooks/nagios/libraries/serviceescalation.rb +193 -0
  72. data/cookbooks/nagios/libraries/servicegroup.rb +142 -0
  73. data/cookbooks/nagios/libraries/timeperiod.rb +159 -0
  74. data/cookbooks/nagios/libraries/users_helper.rb +54 -0
  75. data/cookbooks/nagios/metadata.json +44 -0
  76. data/cookbooks/nagios/metadata.rb +22 -0
  77. data/cookbooks/nagios/recipes/_load_databag_config.rb +153 -0
  78. data/cookbooks/nagios/recipes/_load_default_config.rb +241 -0
  79. data/cookbooks/nagios/recipes/apache.rb +114 -0
  80. data/cookbooks/nagios/recipes/default.rb +41 -0
  81. data/cookbooks/nagios/recipes/nginx.rb +114 -0
  82. data/cookbooks/nagios/recipes/pagerduty.rb +95 -0
  83. data/cookbooks/nagios/recipes/server.rb +182 -0
  84. data/cookbooks/nagios/recipes/server_package.rb +85 -0
  85. data/cookbooks/nagios/recipes/server_source.rb +137 -0
  86. data/cookbooks/nagios/resources/command.rb +34 -0
  87. data/cookbooks/nagios/resources/conf.rb +52 -0
  88. data/cookbooks/nagios/resources/contact.rb +34 -0
  89. data/cookbooks/nagios/resources/contactgroup.rb +35 -0
  90. data/cookbooks/nagios/resources/host.rb +35 -0
  91. data/cookbooks/nagios/resources/hostdependency.rb +35 -0
  92. data/cookbooks/nagios/resources/hostescalation.rb +36 -0
  93. data/cookbooks/nagios/resources/hostgroup.rb +35 -0
  94. data/cookbooks/nagios/resources/resource.rb +34 -0
  95. data/cookbooks/nagios/resources/service.rb +35 -0
  96. data/cookbooks/nagios/resources/servicedependency.rb +35 -0
  97. data/cookbooks/nagios/resources/serviceescalation.rb +35 -0
  98. data/cookbooks/nagios/resources/servicegroup.rb +35 -0
  99. data/cookbooks/nagios/resources/timeperiod.rb +35 -0
  100. data/cookbooks/nagios/templates/apache2.conf.erb +102 -0
  101. data/cookbooks/nagios/templates/cgi.cfg.erb +266 -0
  102. data/cookbooks/nagios/templates/commands.cfg.erb +13 -0
  103. data/cookbooks/nagios/templates/contacts.cfg.erb +37 -0
  104. data/cookbooks/nagios/templates/hostgroups.cfg.erb +25 -0
  105. data/cookbooks/nagios/templates/hosts.cfg.erb +15 -0
  106. data/cookbooks/nagios/templates/htpasswd.users.erb +6 -0
  107. data/cookbooks/nagios/templates/nagios.cfg.erb +22 -0
  108. data/cookbooks/nagios/templates/nginx.conf.erb +80 -0
  109. data/cookbooks/nagios/templates/pagerduty.cgi.erb +185 -0
  110. data/cookbooks/nagios/templates/resource.cfg.erb +27 -0
  111. data/cookbooks/nagios/templates/servicedependencies.cfg.erb +15 -0
  112. data/cookbooks/nagios/templates/servicegroups.cfg.erb +14 -0
  113. data/cookbooks/nagios/templates/services.cfg.erb +14 -0
  114. data/cookbooks/nagios/templates/spawn-fcgi.erb +10 -0
  115. data/cookbooks/nagios/templates/templates.cfg.erb +31 -0
  116. data/cookbooks/nagios/templates/timeperiods.cfg.erb +13 -0
  117. data/extras/platform_berksfile_base +3 -3
  118. data/extras/python_rpm/build.sh +4 -4
  119. data/extras/python_rpm/muthon.spec +2 -4
  120. data/extras/vault_tools/export_vaults.sh +11 -1
  121. data/install/installer +1 -1
  122. data/modules/mu/kittens.rb +27523 -0
  123. data/modules/mu/master/ldap.rb +48 -31
  124. data/modules/mu/master.rb +69 -0
  125. data/modules/mu/mu.yaml.rb +351 -0
  126. data/modules/mu/providers/aws/firewall_rule.rb +3 -1
  127. data/modules/mu/providers/aws.rb +11 -5
  128. data/modules/mu.rb +5 -4
  129. metadata +99 -48
  130. data/cookbooks/firewall/CHANGELOG.md +0 -488
  131. data/cookbooks/firewall/LICENSE +0 -202
  132. data/cookbooks/firewall/README.md +0 -366
  133. data/cookbooks/firewall/TODO.md +0 -6
  134. data/cookbooks/firewall/attributes/default.rb +0 -5
  135. data/cookbooks/firewall/attributes/firewalld.rb +0 -8
  136. data/cookbooks/firewall/attributes/iptables.rb +0 -17
  137. data/cookbooks/firewall/attributes/ufw.rb +0 -12
  138. data/cookbooks/firewall/attributes/windows.rb +0 -8
  139. data/cookbooks/firewall/libraries/helpers.rb +0 -105
  140. data/cookbooks/firewall/libraries/helpers_firewalld.rb +0 -116
  141. data/cookbooks/firewall/libraries/helpers_firewalld_dbus.rb +0 -72
  142. data/cookbooks/firewall/libraries/helpers_iptables.rb +0 -112
  143. data/cookbooks/firewall/libraries/helpers_nftables.rb +0 -170
  144. data/cookbooks/firewall/libraries/helpers_ufw.rb +0 -142
  145. data/cookbooks/firewall/libraries/helpers_windows.rb +0 -129
  146. data/cookbooks/firewall/libraries/provider_firewall_firewalld.rb +0 -179
  147. data/cookbooks/firewall/libraries/provider_firewall_iptables.rb +0 -171
  148. data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu.rb +0 -200
  149. data/cookbooks/firewall/libraries/provider_firewall_iptables_ubuntu1404.rb +0 -200
  150. data/cookbooks/firewall/libraries/provider_firewall_rule.rb +0 -34
  151. data/cookbooks/firewall/libraries/provider_firewall_ufw.rb +0 -138
  152. data/cookbooks/firewall/libraries/provider_firewall_windows.rb +0 -126
  153. data/cookbooks/firewall/libraries/resource_firewall.rb +0 -26
  154. data/cookbooks/firewall/libraries/resource_firewall_rule.rb +0 -52
  155. data/cookbooks/firewall/metadata.json +0 -40
  156. data/cookbooks/firewall/metadata.rb +0 -15
  157. data/cookbooks/firewall/recipes/default.rb +0 -76
  158. data/cookbooks/firewall/recipes/firewalld.rb +0 -87
  159. data/cookbooks/firewall/resources/firewalld.rb +0 -28
  160. data/cookbooks/firewall/resources/firewalld_config.rb +0 -39
  161. data/cookbooks/firewall/resources/firewalld_helpers.rb +0 -106
  162. data/cookbooks/firewall/resources/firewalld_icmptype.rb +0 -88
  163. data/cookbooks/firewall/resources/firewalld_ipset.rb +0 -104
  164. data/cookbooks/firewall/resources/firewalld_policy.rb +0 -115
  165. data/cookbooks/firewall/resources/firewalld_service.rb +0 -98
  166. data/cookbooks/firewall/resources/firewalld_zone.rb +0 -118
  167. data/cookbooks/firewall/resources/nftables.rb +0 -71
  168. data/cookbooks/firewall/resources/nftables_rule.rb +0 -113
  169. data/cookbooks/firewall/templates/default/ufw/default.erb +0 -13
  170. /data/cookbooks/{firewall → nagios}/chefignore +0 -0
  171. /data/cookbooks/{firewall → nagios}/renovate.json +0 -0
@@ -18,7 +18,41 @@
18
18
 
19
19
  include_recipe 'mu-master::firewall-holes'
20
20
 
21
- package ["389-ds", "389-ds-console"]
21
+ # We had to hand-roll 389DS packages for Amazon 2023. It was ludicrious.
22
+ if node['platform_family'] == 'amazon' && node['platform_version'].to_i == 2023
23
+ base_url = "https://s3.amazonaws.com/icras-ruby/"
24
+
25
+ # Mozilla's ancient LDAP library. We don't actually run code out of it, but
26
+ # a bunch of the supporting tools for 389DS insist on linking to it.
27
+ pkgs = ["mozldap-6.0.7-1.amzn2023.x86_64.rpm", "mozldap-devel-6.0.7-1.amzn2023.x86_64.rpm", "mozldap-tools-6.0.7-1.amzn2023.x86_64.rpm"]
28
+ execute "install legacy Mozilla LDAP library" do
29
+ command "rpm -ivh #{pkgs.map { |p| base_url+p }.join(' ')}"
30
+ not_if "rpm -q mozldap mozldap-devel mozldap-tools"
31
+ end
32
+ link "/usr/local/mozldap/lib" do
33
+ to "/usr/local/mozldap/lib64"
34
+ end
35
+
36
+ # Prereqs for 389-admin, including miscellaneous difficult-to-source Perl modules
37
+ package ["cyrus-sasl-gssapi", "cyrus-sasl-md5", "nss-tools", "perl-Archive-Tar", "perl-DB_File", "perl-debugger", "perl-sigtrap", "openssl-perl", "python3-pytest", "perl-FileHandle", "perl-Log-Log4perl", "perl-LDAP"]
38
+
39
+ version = "3.1.1"
40
+ pkgs = ["389-ds-base-libs-#{version}-icrasmu.x86_64.rpm", "389-ds-base-3.1.1-icrasmu.x86_64.rpm", "python3-lib389-#{version}-icrasmu.noarch.rpm", "389-ds-base-devel-#{version}-icrasmu.x86_64.rpm"]
41
+ # XXX These RPMs will conflict with themselves if they try to install twice. They are very stupid.
42
+ execute "install 389DS packages" do
43
+ command "rpm -ivh #{pkgs.map { |p| base_url+p }.join(' ')}"
44
+ not_if "rpm -q 389-ds-base 389-ds-base-libs python3-lib389 389-ds-base-devel"
45
+ end
46
+
47
+ pkgs = ["389-adminutil-devel-1.1.23-1.amzn2023.x86_64.rpm", "389-adminutil-1.1.23-1.amzn2023.x86_64.rpm"]
48
+ execute "install 389DS adminutil packages" do
49
+ command "rpm -ivh #{pkgs.map { |p| base_url+p }.join(' ')}"
50
+ not_if "rpm -q 389-adminutil 389-adminutil-devel"
51
+ end
52
+ else
53
+ package ["389-ds", "389-ds-console"]
54
+ end
55
+
22
56
 
23
57
  include_recipe 'chef-vault'
24
58
 
@@ -34,7 +68,7 @@ $CREDS = {
34
68
  "user" => "CN=mu_join_creds,#{$MU_CFG["ldap"]['user_ou']}"
35
69
  },
36
70
  "cfg_directory_adm" => {
37
- "user" => "admin"
71
+ "user" => "cn=Directory Manager"
38
72
  },
39
73
  "root_dn_user" => {
40
74
  "user" => "CN=root_dn_user"
@@ -73,10 +107,12 @@ end
73
107
 
74
108
  # %x{/usr/sbin/setenforce 0}
75
109
  execute "initialize 389 Directory Services" do
76
- command "/usr/sbin/setup-ds-admin.pl -s -f /root/389ds.tmp/389-directory-setup.inf --continue --debug #{Dir.exist?("/etc/dirsrv/slapd-#{$MU_CFG["hostname"]}") ? "--update" : ""}"
110
+ command "/usr/sbin/dscreate from-file /root/389ds.tmp/389-directory-setup.inf"
77
111
  action :nothing
78
112
  end
79
113
 
114
+ confdir = "/etc/dirsrv/slapd-#{$MU_CFG["hostname"]}"
115
+
80
116
  template "/root/389ds.tmp/389-directory-setup.inf"do
81
117
  source "389-directory-setup.inf.erb"
82
118
  variables :hostname => $MU_CFG["hostname"],
@@ -84,7 +120,7 @@ template "/root/389ds.tmp/389-directory-setup.inf"do
84
120
  :domain => $MU_CFG["ldap"]["domain_name"],
85
121
  :domain_dn => $MU_CFG["ldap"]["domain_name"].split(/\./).map{ |x| "DC=#{x}" }.join(","),
86
122
  :creds => $CREDS
87
- not_if { ::Dir.exist?("/etc/dirsrv/slapd-#{$MU_CFG["hostname"]}") }
123
+ not_if { ::Dir.exist?(confdir) }
88
124
  notifies :run, "execute[initialize 389 Directory Services]", :immediately
89
125
  end
90
126
 
@@ -115,49 +151,52 @@ file "/root/389ds.tmp/blank" do
115
151
  content ""
116
152
  action :nothing
117
153
  end
118
- execute "389ds cert util" do
154
+
155
+ # This is the PIN for the certificate store, not the LDAP server's root password
156
+ execute "ensure plainpin.txt" do
157
+ command "cat #{confdir}/pin.txt | cut -d: -f 2 > #{confdir}/plainpin.txt"
158
+ not_if { File.exist?("#{confdir}/plainpin.txt") }
159
+ end
160
+
161
+ # ... the LDAP server's root password is a crypt in #{confdir}/dse.ldif, the
162
+ # line nsslapd-rootpw. You can generate a new one with the /usr/bin/pwdhash
163
+ # utility.
164
+
165
+ execute "389ds set Mu CA" do
119
166
  if $MU_CFG['ssl'] and $MU_CFG['ssl']['chain']
120
- command "/usr/bin/certutil -d /etc/dirsrv/slapd-#{$MU_CFG["hostname"]} -A -n \"Mu Master CA\" -t CT,, -a -i #{$MU_CFG['ssl']['chain']}"
167
+ command "/usr/bin/certutil -d #{confdir} -A -f #{confdir}/plainpin.txt -n \"Mu Master CA\" -t CTP,C,C -a -i #{$MU_CFG['ssl']['chain']}"
121
168
  else
122
- command "/usr/bin/certutil -d /etc/dirsrv/slapd-#{$MU_CFG["hostname"]} -A -n \"Mu Master CA\" -t CT,, -a -i /opt/mu/var/ssl/Mu_CA.pem"
169
+ command "/usr/bin/certutil -d #{confdir} -A -f #{confdir}/plainpin.txt -n \"Mu Master CA\" -t CTP,C,C -a -i /opt/mu/var/ssl/Mu_CA.pem"
123
170
  end
124
171
  action :nothing
125
172
  notifies :restart, "service[#{service_name}]", :delayed
126
173
  end
127
174
 
128
- # Why is this utility interactive-only? So much hate.
129
- ruby_block "import SSL certificates for 389ds" do
130
- block do
131
- certimportcmd = "/usr/bin/pk12util -i /opt/mu/var/ssl/ldap.p12 -d /etc/dirsrv/slapd-#{$MU_CFG["hostname"]} -w /root/389ds.tmp/blank -W \"\""
132
- require 'pty'
133
- require 'expect'
134
- PTY.spawn(certimportcmd) { |r, w, _pid|
135
- begin
136
- r.expect("Enter new password:") do
137
- w.puts
138
- end
139
- r.expect("Re-enter password:") do
140
- w.puts
141
- end
142
- rescue Errno::EIO
143
- break
144
- end
145
- }
146
-
147
- end
148
- notifies :create, "file[/root/389ds.tmp/blank]", :before
149
- notifies :run, "execute[389ds cert util]", :immediately
175
+ execute "remove existing Server-Cert" do
176
+ command "/usr/bin/certutil -D -d #{confdir} -f #{confdir}/plainpin.txt -n Server-Cert"
177
+ only_if "/usr/bin/certutil -L -d #{confdir} -f #{confdir}/plainpin.txt -n Server-Cert | grep CN=ssca.389ds.example.com" # XXX make this look for any mismatch with the correct one
150
178
  end
151
179
 
180
+ # certutil is too stupid to import a key, so we have to do this little dance with pk12util instead
181
+ execute "389ds set Mu server key" do
182
+ command "PW=\"`cat #{confdir}/plainpin.txt`\" /usr/bin/pk12util -d #{confdir} -i /opt/mu/var/ssl/ldap.p12 -W \"\" -K \"`cat #{confdir}/plainpin.txt`\""
183
+ # not_if # XXX be a lot cooler if we guarded this
184
+ notifies :restart, "service[#{service_name}]", :delayed
185
+ end
186
+ execute "389ds set Mu server cert" do
187
+ command "/usr/bin/certutil -d #{confdir} -A -f #{confdir}/plainpin.txt -n ldap -t TP,, -a -i /opt/mu/var/ssl/ldap.crt"
188
+ notifies :run, "execute[389ds set Mu CA]", :before
189
+ end
152
190
 
153
- {"ssl_enable.ldif" => "nsslapd-security: on", "addRSA.ldif" => "nsSSLActivation: on"}.each_pair { |ldif, guardstr|
191
+ #{"ssl_enable.ldif" => "nsSSL3: off", "addRSA.ldif" => "nsSSLActivation: on"}.each_pair { |ldif, guardstr|
192
+ {"setCertName.ldif" => "nsSSLPersonalitySSL: ldap"}.each_pair { |ldif, guardstr|
154
193
  cookbook_file "/root/389ds.tmp/#{ldif}" do
155
194
  source ldif
156
195
  end
157
196
 
158
- execute "/usr/bin/ldapmodify -x -D #{$CREDS["root_dn_user"]['user']} -w #{$CREDS["root_dn_user"]['pw']} -f /root/389ds.tmp/#{ldif}" do
197
+ execute "/usr/bin/ldapmodify -x -D \"#{$CREDS["cfg_directory_adm"]['user']}\" -w \"#{$CREDS["cfg_directory_adm"]['pw']}\" -f /root/389ds.tmp/#{ldif}" do
159
198
  notifies :restart, "service[#{service_name}]", :delayed
160
- not_if "grep '#{guardstr}' /etc/dirsrv/slapd-#{$MU_CFG['hostname']}/dse.ldif"
199
+ not_if "grep '#{guardstr}' #{confdir}/dse.ldif"
161
200
  end
162
201
  }
163
202
 
@@ -57,6 +57,11 @@ when 'amazon'
57
57
  when 2
58
58
  basepackages.concat(["gecode-devel", "mariadb", "qt", "qt-x11", "iptables-services"])
59
59
 
60
+ when 2023
61
+ basepackages.concat(["iptables-services"])
62
+ basepackages.delete("java-1.8.0-openjdk")
63
+ basepackages.delete("cryptsetup-luks")
64
+
60
65
  else
61
66
  raise "Mu does not support Amazon #{node['platform_version']}"
62
67
  end
@@ -164,7 +164,7 @@ include_recipe "mu-master::update_nagios_only" if !$MU_CFG['disable_nagios']
164
164
 
165
165
  if !node['update_nagios_only']
166
166
  if !$MU_CFG['disable_nagios']
167
- package %w(nagios-plugins-breeze nagios-plugins-by_ssh nagios-plugins-cluster nagios-plugins-dhcp nagios-plugins-dig nagios-plugins-disk nagios-plugins-disk_smb nagios-plugins-dns nagios-plugins-dummy nagios-plugins-file_age nagios-plugins-flexlm nagios-plugins-fping nagios-plugins-game nagios-plugins-hpjd nagios-plugins-http nagios-plugins-icmp nagios-plugins-ide_smart nagios-plugins-ircd nagios-plugins-ldap nagios-plugins-load nagios-plugins-log nagios-plugins-mailq nagios-plugins-mrtg nagios-plugins-mrtgtraf nagios-plugins-nagios nagios-plugins-nt nagios-plugins-ntp nagios-plugins-ntp-perl nagios-plugins-nwstat nagios-plugins-oracle nagios-plugins-overcr nagios-plugins-pgsql nagios-plugins-ping nagios-plugins-procs nagios-plugins-real nagios-plugins-rpc nagios-plugins-sensors nagios-plugins-smtp nagios-plugins-snmp nagios-plugins-ssh nagios-plugins-swap nagios-plugins-tcp nagios-plugins-time nagios-plugins-ups nagios-plugins-users nagios-plugins-wave) do
167
+ package %w(nagios-plugins-breeze nagios-plugins-by_ssh nagios-plugins-cluster nagios-plugins-dhcp nagios-plugins-dig nagios-plugins-disk nagios-plugins-disk_smb nagios-plugins-dns nagios-plugins-dummy nagios-plugins-file_age nagios-plugins-flexlm nagios-plugins-fping nagios-plugins-game nagios-plugins-hpjd nagios-plugins-http nagios-plugins-icmp nagios-plugins-ide_smart nagios-plugins-ircd nagios-plugins-load nagios-plugins-log nagios-plugins-mailq nagios-plugins-mrtg nagios-plugins-mrtgtraf nagios-plugins-nagios nagios-plugins-nt nagios-plugins-ntp nagios-plugins-nwstat nagios-plugins-oracle nagios-plugins-overcr nagios-plugins-pgsql nagios-plugins-ping nagios-plugins-procs nagios-plugins-real nagios-plugins-rpc nagios-plugins-sensors nagios-plugins-smtp nagios-plugins-snmp nagios-plugins-ssh nagios-plugins-swap nagios-plugins-tcp nagios-plugins-time nagios-plugins-ups nagios-plugins-users nagios-plugins-wave) do
168
168
  action :install
169
169
  end
170
170
 
@@ -218,6 +218,14 @@ if !node['update_nagios_only']
218
218
  if !$MU_CFG['public_address'].match(/^\d+\.\d+\.\d+\.\d+$/)
219
219
  svrname = $MU_CFG['public_address']
220
220
  end
221
+
222
+ directory "/etc/httpd/conf" do
223
+ recursive true
224
+ mode 0755
225
+ end
226
+
227
+ package ["php8.3", "php8.3-devel", "php8.3-cli", "php8.3-modphp", "php-pear"]
228
+
221
229
  apache2_install "" do
222
230
  docroot_dir "/var/www/html"
223
231
  modules %w{status alias auth_basic authn_core authn_file authz_core authz_groupfile authz_host authz_user autoindex deflate dir env mime negotiation setenvif log_config logio unixd systemd headers proxy proxy_http rewrite ssl ldap authnz_ldap slotmem_shm}
@@ -231,11 +239,11 @@ if !node['update_nagios_only']
231
239
  apache2_mod_cgid ""
232
240
  apache2_mod_ssl ""
233
241
 
234
- link "/usr/lib64/httpd/modules/mod_php5.so" do
235
- to "/usr/lib64/httpd/modules/libphp5.so"
236
- end
242
+ # link "/usr/lib64/httpd/modules/mod_php5.so" do
243
+ # to "/usr/lib64/httpd/modules/libphp5.so"
244
+ # end
237
245
  apache2_mod "php"
238
- apache2_module "php5"
246
+ # apache2_module "php5"
239
247
  apache2_module "cgi"
240
248
  apache2_default_site "" do
241
249
  action :enable
@@ -465,6 +473,9 @@ if !node['update_nagios_only']
465
473
 
466
474
  template "Mu Master /etc/ssh/sshd_config" do
467
475
  path "/etc/ssh/sshd_config"
476
+ variables(
477
+ :allowgroups => ["mu-users"]
478
+ )
468
479
  source "sshd_config.erb"
469
480
  mode 0600
470
481
  owner "root"
@@ -31,7 +31,7 @@ chef_gem "cloud-mu" do
31
31
  end
32
32
 
33
33
  CHEF_SERVER_VERSION="14.11.31-1"
34
- CHEF_CLIENT_VERSION="18.5.0"
34
+ CHEF_CLIENT_VERSION="18.7.6"
35
35
 
36
36
  # The versions of these must not bring in a newer version of aws-sdk-core
37
37
  # than whatever Chef prefers (aws-sdk-core 3.171.0 as of Chef 18.5.0,
@@ -262,7 +262,7 @@ when 'amazon'
262
262
  elversion = '7'
263
263
 
264
264
  when '2023'
265
- basepackages.concat(['libX11', 'mariadb105-devel', 'cryptsetup', 'ncurses-devel', 'ncurses-compat-libs', 'iptables-services', 'libxcrypt-compat', 'ruby'])
265
+ basepackages.concat(['libX11', 'mariadb105-devel', 'cryptsetup', 'ncurses-devel', 'ncurses-compat-libs', 'iptables-services', 'libxcrypt-compat', 'ruby', 'nspr-devel', 'nss-devel >= 3.34', 'openldap-clients', 'openldap-devel', 'lmdb-devel', 'cyrus-sasl-devel', 'icu', 'libicu-devel', 'pcre2-devel', 'cracklib-devel', 'json-c-devel', 'libatomic', 'clang', 'compiler-rt', 'lld', 'gcc', 'gcc-c++', 'libasan', 'libtsan', 'libubsan', 'libdb-devel', 'net-snmp-devel', 'bzip2-devel', 'openssl-devel', 'pam-devel', 'systemd-units', 'systemd-devel', 'pkgconfig', 'krb5-devel', 'autoconf', 'automake', 'libtool', 'doxygen', 'libcmocka-devel', 'python3', 'python3-devel', 'python3-setuptools', 'python3-ldap', 'python3-pyasn1', 'python3-pyasn1-modules', 'python3-dateutil', 'python3-argcomplete', 'python3-policycoreutils', 'python3-libselinux', 'python3-cryptography', 'rsync', 'python3-pip'])
266
266
  basepackages.delete('curl')
267
267
  removepackages = ['nagios', 'firewalld']
268
268
  elversion = '7'
@@ -298,7 +298,7 @@ end
298
298
 
299
299
  # this takes up a huge amount of space, save it until we're fully operational
300
300
  if !RUNNING_STANDALONE
301
- rpms["python38"] = "https://s3.amazonaws.com/cloudamatic/muthon-3.8.3-1.el#{elversion}.x86_64.rpm"
301
+ rpms["python38"] = "https://s3.amazonaws.com/icras-ruby/muthon-3.13.1-1.#{shorthand}#{node['platform_version'].split('.')[0]}.x86_64.rpm"
302
302
  end
303
303
 
304
304
  package basepackages
@@ -795,6 +795,39 @@ execute "ensure Chef indexes aren't read-only" do
795
795
  command %Q{curl -XPUT -H "Content-Type: application/json" http://127.0.0.1:9200/_all/_settings -d '{"index.blocks.read_only_allow_delete": null}'}
796
796
  end
797
797
 
798
+ if node['platform_family'] == "amazon" and node['platform_version'].split('.')[0] == "2023"
799
+ execute "install python's argparse-manpage" do
800
+ command "/usr/bin/pip3 install argparse-manpage"
801
+ not_if { File.exist?("/usr/local/bin/argparse-manpage") }
802
+ end
803
+
804
+ execute "fetch Rust installer" do
805
+ command "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /root/rust-install.sh && chmod 700 /root/rust-install.sh"
806
+ action :nothing
807
+ end
808
+
809
+ execute "install Rust for root only" do
810
+ command "/root/rust-install.sh -y"
811
+ notifies :run, "execute[fetch Rust installer]", :before
812
+ not_if { File.exist?("/root/.cargo/bin/rustc") }
813
+ end
814
+
815
+ execute "fetch NodeJS repo installer" do
816
+ command "curl -fsSL https://rpm.nodesource.com/setup_23.x -o /root/nodesource_setup.sh"
817
+ action :nothing
818
+ end
819
+
820
+ execute "enable NodeJS repo" do
821
+ command "sh /root/nodesource_setup.sh"
822
+ action :nothing
823
+ end
824
+
825
+ package "nodejs" do
826
+ notifies :run, "execute[enable NodeJS repo]", :before
827
+ action :install
828
+ end
829
+ end
830
+
798
831
  directory TMPDIR do
799
832
  action :delete
800
833
  recursive true
@@ -80,6 +80,9 @@ end
80
80
  remote_file "#{$MU_CFG['installdir']}/lib/cookbooks/mu-tools/files/default/Mu_CA.pem" do
81
81
  source "file://#{$MU_CFG['datadir']}/ssl/Mu_CA.pem"
82
82
  end
83
+ execute "chcon -t httpd_config_t #{$MU_CFG['datadir']}/ssl/Mu_CA.pem" do
84
+ not_if "ls -aZ #{$MU_CFG['datadir']}/ssl/Mu_CA.pem | grep 'object_r:httpd_config_t'"
85
+ end
83
86
 
84
87
  service_certs.each { |cert|
85
88
  bash "generate service cert for #{cert}" do
@@ -102,6 +105,9 @@ service_certs.each { |cert|
102
105
  file "#{$MU_CFG['datadir']}/ssl/#{cert}.#{type}" do
103
106
  mode 0400
104
107
  end
108
+ execute "chcon -t httpd_config_t #{$MU_CFG['datadir']}/ssl/#{cert}.#{type}" do
109
+ not_if "ls -aZ #{$MU_CFG['datadir']}/ssl/#{cert}.#{type} | grep 'object_r:httpd_config_t'"
110
+ end
105
111
  end
106
112
 
107
113
  file "#{$MU_CFG['datadir']}/ssl/#{cert}.csr" do
@@ -19,72 +19,95 @@
19
19
  include_recipe 'mu-master::firewall-holes'
20
20
  include_recipe "mu-master::389ds"
21
21
 
22
+ # XXX SSSD seems to not work on Amazon 2023 at all right now. It fails silently
23
+ # on startup over some kind of systemd/permission issue (it can't write its
24
+ # PID file, no it's not SELinux's fault either).
25
+ #
26
+ # If you run it interactively (sssd -i), it can't seem to enumerate users from
27
+ # the LDAP server, though they are definitely present.
28
+ #
29
+ # Working around this problem elsewhere.
22
30
  package "sssd"
23
- package "sssd-ldap"
31
+ package "sssd-tools"
24
32
  package "sssd-client"
25
- package "nss-pam-ldapd" do
26
- action :remove
27
- end
28
- package "pam_ldap" do
29
- action :remove
30
- end
31
- package "dbus"
32
- service "messagebus" do
33
- action [:enable, :start]
34
- end
35
- package "nscd"
36
- service "nscd" do
37
- action [:disable, :stop]
38
- end
39
- package "oddjob-mkhomedir"
40
- execute "restorecon -r /usr/sbin"
41
- service "sshd" do
42
- action :nothing
43
- end
44
-
45
- # SELinux Policy for oddjobd and its interaction with syslogd
46
- cookbook_file "syslogd_oddjobd.pp" do
47
- path "#{Chef::Config[:file_cache_path]}/syslogd_oddjobd.pp"
48
- end
49
-
50
- execute "Add oddjobd and syslogd interaction to SELinux allow list" do
51
- command "/usr/sbin/semodule -i syslogd_oddjobd.pp"
52
- cwd Chef::Config[:file_cache_path]
53
- not_if "/usr/sbin/semodule -l | grep syslogd_oddjobd"
54
- notifies :restart, "service[oddjobd]", :delayed
55
- end
56
-
57
- service "oddjobd" do
58
- start_command "sh -x /etc/init.d/oddjobd start" if %w{redhat centos}.include?(node['platform']) && node['platform_version'].to_i == 6 # seems to actually work
59
- action [:enable, :start]
60
- end
61
- package "authconfig"
62
- execute "LC_ALL=C /usr/sbin/authconfig --disablenis --disablecache --disablewinbind --disablewinbindauth --enablemkhomedir --disablekrb5 --enablesssd --enablesssdauth --enablelocauthorize --disableforcelegacy --disableldap --disableldapauth --updateall" do
63
- notifies :restart, "service[oddjobd]", :immediately
64
- notifies :reload, "service[sshd]", :delayed
65
- not_if "grep pam_sss.so /etc/pam.d/password-auth"
66
- end
67
- directory "/var/log/sssd" do
68
- mode 0750
69
- recursive true
70
- end
71
33
  service "sssd" do
72
34
  action :nothing
73
35
  notifies :restart, "service[sshd]", :immediately
74
36
  end
75
- template "/etc/sssd/sssd.conf" do
76
- source "sssd.conf.erb"
77
- mode 0600
78
- owner "root"
79
- group "root"
80
- notifies :restart, "service[sssd]", :immediately
81
- variables(
82
- :base_dn => $MU_CFG['ldap']['base_dn'],
83
- :user_ou => $MU_CFG['ldap']['user_ou'],
84
- :dcs => $MU_CFG['ldap']['dcs']
85
- )
86
- end
87
- service "sssd" do
88
- action [:enable, :start]
89
- notifies :restart, "service[sshd]", :immediately
37
+ if node['platform_family'] == 'amazon' && node['platform_version'].to_i == 2023
38
+ package "authselect"
39
+ execute "authselect select minimal --force" do
40
+ not_if "authselect current | grep '^Profile ID: minimal$'"
41
+ notifies :restart, "service[sshd]", :immediately
42
+ end
43
+ else
44
+ package "sssd-ldap"
45
+ package "authconfig"
46
+
47
+ package "nss-pam-ldapd" do
48
+ action :remove
49
+ end
50
+ package "pam_ldap" do
51
+ action :remove
52
+ end
53
+ package "dbus"
54
+ service "messagebus" do
55
+ action [:enable, :start]
56
+ end
57
+ package "nscd"
58
+ service "nscd" do
59
+ action [:disable, :stop]
60
+ end
61
+ package "oddjob-mkhomedir"
62
+ execute "restorecon -r /usr/sbin"
63
+ service "sshd" do
64
+ action :nothing
65
+ end
66
+
67
+ execute "LC_ALL=C /usr/sbin/authconfig --disablenis --disablecache --disablewinbind --disablewinbindauth --enablemkhomedir --disablekrb5 --enablesssd --enablesssdauth --enablelocauthorize --disableforcelegacy --disableldap --disableldapauth --updateall" do
68
+ notifies :restart, "service[oddjobd]", :immediately
69
+ notifies :reload, "service[sshd]", :delayed
70
+ not_if "grep pam_sss.so /etc/pam.d/password-auth"
71
+ end
72
+ # SELinux Policy for oddjobd and its interaction with syslogd
73
+ cookbook_file "syslogd_oddjobd.pp" do
74
+ path "#{Chef::Config[:file_cache_path]}/syslogd_oddjobd.pp"
75
+ end
76
+
77
+ execute "Add oddjobd and syslogd interaction to SELinux allow list" do
78
+ command "/usr/sbin/semodule -i syslogd_oddjobd.pp"
79
+ cwd Chef::Config[:file_cache_path]
80
+ not_if "/usr/sbin/semodule -l | grep syslogd_oddjobd"
81
+ notifies :restart, "service[oddjobd]", :delayed
82
+ end
83
+
84
+ service "oddjobd" do
85
+ start_command "sh -x /etc/init.d/oddjobd start" if %w{redhat centos}.include?(node['platform']) && node['platform_version'].to_i == 6 # seems to actually work
86
+ action [:enable, :start]
87
+ end
88
+
89
+ directory "/var/log/sssd" do
90
+ mode 0750
91
+ recursive true
92
+ end
93
+ service "sssd" do
94
+ action :nothing
95
+ notifies :restart, "service[sshd]", :immediately
96
+ end
97
+ template "/etc/sssd/sssd.conf" do
98
+ source "sssd.conf.erb"
99
+ mode 0600
100
+ owner "root"
101
+ group "root"
102
+ notifies :restart, "service[sssd]", :immediately
103
+ variables(
104
+ :base_dn => $MU_CFG['ldap']['base_dn'],
105
+ :user_ou => $MU_CFG['ldap']['user_ou'],
106
+ :dcs => $MU_CFG['ldap']['dcs']
107
+ )
108
+ end
109
+ service "sssd" do
110
+ action [:enable, :start]
111
+ notifies :restart, "service[sshd]", :immediately
112
+ end
90
113
  end
@@ -202,6 +202,10 @@ else
202
202
  not_if "ls -aZ /usr/lib64/nagios/plugins/check_nagios | grep 'object_r:nagios_'"
203
203
  end
204
204
  end
205
+ execute "chcon -t nagios_etc_t /etc/nagios/nrpe.d/check_disk.cfg" do
206
+ not_if "ls -aZ /etc/nagios/nrpe.d/check_disk.cfg | grep 'object_r:nagios_etc_t'"
207
+ only_if { File.exist?("/etc/nagios/nrpe.d/check_disk.cfg") }
208
+ end
205
209
 
206
210
  # execute "chgrp apache /var/log/nagios"
207
211
  ["/etc/nagios/conf.d/", "/etc/nagios/*.cfg", "/var/run/nagios.pid"].each { |dir|
@@ -211,7 +215,9 @@ else
211
215
  end
212
216
  }
213
217
 
214
- execute "/sbin/restorecon -R /var/log/nagios"
218
+ execute "/sbin/restorecon -R /var/log/nagios" do
219
+ only_if { ::Dir.exist?("/var/log/nagios") }
220
+ end
215
221
 
216
222
  # The Nagios cookbook currently screws up this setting, so work around it.
217
223
  execute "sed -i s/^interval_length=.*/interval_length=1/ || echo 'interval_length=1' >> /etc/nagios/nagios.cfg" do
@@ -1,28 +1,13 @@
1
- [General]
2
- FullMachineName= <%= @address %>
3
- SuiteSpotUserID= nobody
4
- SuiteSpotGroup= nobody
5
- AdminDomain= <%= @domain %>
6
- ServerRoot = /usr/lib64/dirsrv
7
- StrictHostCheck = false
8
- ConfigDirectoryAdminID= <%= @creds["cfg_directory_adm"]["user"] %>
9
- ConfigDirectoryAdminPwd= <%= @creds["cfg_directory_adm"]["pw"] %>
10
- ConfigDirectoryLdapURL= ldap://<%= @address %>:389/o=NetscapeRoot
11
-
12
- [admin]
13
- Port= 9830
14
- ServerIpAddress= 0.0.0.0
15
- ServerAdminID= <%= @creds["cfg_directory_adm"]["user"] %>
16
- ServerAdminPwd= <%= @creds["cfg_directory_adm"]["pw"] %>
1
+ [general]
2
+ full_machine_name = <%= @address %>
3
+ start = True
4
+ strict_host_checking = False
17
5
 
18
6
  [slapd]
19
- AddOrgEntries = Yes
20
- AddSampleEntries = No
21
- SlapdConfigForMC= Yes
22
- UseExistingMC= No
23
- ServerPort= 389
24
- ServerIdentifier= <%= @hostname.gsub(/[^a-z0-9#%:@_-]/i, "_") %>
25
- Suffix= <%= @domain_dn %>
26
- naming_value= <%= @domain %>
27
- RootDN= <%= @creds["root_dn_user"]["user"] %>
28
- RootDNPwd= <%= @creds["root_dn_user"]["pw"] %>
7
+ instance_name = <%= @hostname %>
8
+ root_password = <%= @creds["cfg_directory_adm"]["pw"] %>
9
+ secure_port = 636
10
+
11
+ [backend-userroot]
12
+ create_suffix_entry = True
13
+ suffix = dc="platform-mu"
@@ -1,34 +1,44 @@
1
1
  [domain/platform-mu]
2
- autofs_provider = ldap
2
+ enabled = true
3
3
  cache_credentials = False
4
4
  enumerate = True
5
- ldap_search_base = <%= @base_dn %>
6
- ldap_user_search_base = <%= @base_dn %>
7
- ldap_group_search_base = <%= @base_dn %>
5
+ access_provider = permit
6
+ <% if @base_dn %>
7
+ autofs_provider = ldap
8
8
  id_provider = ldap
9
9
  auth_provider = ldap
10
- access_provider = permit
11
10
  chpass_provider = ldap
12
11
  sudo_provider = ldap
12
+ ldap_search_base = <%= @base_dn %>
13
+ ldap_user_search_base = OU=Users,<%= @base_dn %>
14
+ ldap_group_search_base = OU=Groups,<%= @base_dn %>
15
+ ldap_schema = rfc2307
13
16
  ldap_uri = <%= @dcs.map { |dc| "ldaps://"+dc+"/" }.join(",") %>
14
17
  ldap_tls_reqcert = allow
15
18
  ldap_id_use_start_tls = True
16
- ldap_tls_cacertdir = /etc/openldap/cacerts
19
+ ldap_tls_cacertdir = /opt/mu/var/ssl/Mu_CA.pem
17
20
  ldap_user_object_class = inetorgperson
18
21
  ldap_user_uid_number = employeeNumber
19
22
  ldap_user_gid_number = departmentNumber
20
23
  ldap_group_objectclass = posixGroup
21
24
  ldap_group_member = memberUid
22
25
  ldap_group_gid_number = gidNumber
26
+ ldap_min_id = 10000
27
+ <% else %>
28
+ id_provider = files
29
+ proxy_lib_name = files
30
+ proxy_pam_target = sssd-shadowutils
31
+ <% end %>
23
32
 
24
33
  [sssd]
25
34
  services = nss, pam
26
35
  config_file_version = 2
27
36
  domains = platform-mu
37
+ domain_resolution_order = platform-mu,files
28
38
 
29
39
  [nss]
30
- nss_filter_groups = root
31
- nss_filter_users = root, apache, postfix, bin, daemon, sshd, ftp, clam, centos, mysql, clam, saslauth, dbus, nagios, rpc, nscd
40
+ filter_groups = root
41
+ filter_users = root, apache, postfix, bin, daemon, sshd, ftp, clam, centos, mysql, clam, saslauth, dbus, nagios, rpc, nscd
32
42
  override_homedir = /home/%u
33
43
  default_shell = /bin/bash
34
44
 
@@ -0,0 +1,33 @@
1
+ -----BEGIN CERTIFICATE-----
2
+ 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
33
+ -----END CERTIFICATE-----
@@ -27,5 +27,4 @@ depends "yum-epel", '~> 5.0.8'
27
27
  depends "mu-firewall"
28
28
  depends "mu-activedirectory"
29
29
  depends "chocolatey"
30
- depends "firewall"
31
30
  depends 'selinux', '~> 3.0.0'
@@ -19,7 +19,13 @@
19
19
  if !node['application_attributes']['skip_recipes'].include?('set_local_fw')
20
20
  master_ips = get_mu_master_ips
21
21
  case node['platform_family']
22
- when 'rhel'#, 'amazon'
22
+
23
+ when 'amazon'
24
+ if node['platform_version'].to_i == 2023
25
+ include_recipe 'mu-firewall'
26
+ end
27
+
28
+ when 'rhel'
23
29
  include_recipe 'mu-firewall'
24
30
 
25
31
  if elversion >= 7 and node['platform_family'] != "amazon" # Can use firewalld, but not if iptables is already rigged
@@ -165,4 +165,8 @@ UseDNS no
165
165
 
166
166
  # CAP Mod, restrict ciphers
167
167
  Ciphers aes128-ctr,aes192-ctr,aes256-ctr
168
- AllowUsers ec2-user root
168
+ <% if @allowgroups %>
169
+ AllowGroups <%= @allowgroups.join(" ") %>
170
+ <% else %>
171
+ AllowUsers ec2-user root
172
+ <% end %>