Skip to content
This repository has been archived by the owner on Jul 9, 2020. It is now read-only.

Add FIPS support #560

Merged
merged 1 commit into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 4 additions & 0 deletions provisioning_templates/PXEGrub/kickstart_default_pxegrub.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ oses:
options.push('inst.stage2=' + @host.operatingsystem.medium_uri(@host).to_s)
end

if @host.operatingsystem.name != 'Fedora' && @host.operatingsystem.major.to_i >= 7 && host_param_true?('fips_enabled')
options.push('fips=1')
end

ksoptions = options.join(' ')
-%>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ oses:
options.push('inst.stage2=' + @host.operatingsystem.medium_uri(@host).to_s)
end

if @host.operatingsystem.name != 'Fedora' && @host.operatingsystem.major.to_i >= 7 && host_param_true?('fips_enabled')
options.push('fips=1')
end

# send PXELinux "IPAPPEND 2" option along
options.push("BOOTIF=01-$net_default_mac")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ oses:
options.push('inst.stage2=' + @host.operatingsystem.medium_uri(@host).to_s)
end

if @host.operatingsystem.name != 'Fedora' && @host.operatingsystem.major.to_i >= 7 && host_param_true?('fips_enabled')
options.push('fips=1')
end

ksoptions = options.join(' ')
timeout = host_param('loader_timeout').to_i * 10
timeout = 100 if timeout.nil? || timeout <= 0
Expand Down
8 changes: 7 additions & 1 deletion provisioning_templates/iPXE/kickstart_default_ipxe.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,13 @@ oses:

<% stage2 = host_param('kickstart_liveimg') ? 'inst.stage2=' + @host.operatingsystem.medium_uri(@host).to_s : '' %>

kernel <%= "#{@host.url_for_boot(:kernel)}" %> initrd=initrd.img ks=<%= foreman_url('provision')%> inst.stage2=<%= @host.operatingsystem.medium_uri(@host) %> <%= stage2 %> <%= static %> ksdevice=<%= @host.mac %> network kssendmac ks.sendmac inst.ks.sendmac ip=${netX/ip} netmask=${netX/netmask} gateway=${netX/gateway} dns=${dns}
<%- if @host.operatingsystem.name != 'Fedora' && @host.operatingsystem.major.to_i >= 7 && host_param_true?('fips_enabled') %>
<%- fips = 'fips=1' -%>
<%- else -%>
<%- fips = '' -%>
<%- end -%>

kernel <%= "#{@host.url_for_boot(:kernel)}" %> initrd=initrd.img ks=<%= foreman_url('provision')%> inst.stage2=<%= @host.operatingsystem.medium_uri(@host) %> <%= stage2 %> <%= static %> ksdevice=<%= @host.mac %> network kssendmac ks.sendmac inst.ks.sendmac ip=${netX/ip} netmask=${netX/netmask} gateway=${netX/gateway} dns=${dns} <%= fips %>
initrd <%= "#{@host.url_for_boot(:initrd)}" %>

boot
5 changes: 5 additions & 0 deletions provisioning_templates/provision/kickstart_default.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ This template accepts the following parameters:
- package_upgrade: boolean (default=true)
- disable-uek: boolean (default=false)
- use-ntp: boolean (default depends on OS release)
- fips_enabled: boolean (default=false)
%>
<%
rhel_compatible = @host.operatingsystem.family == 'Redhat' && @host.operatingsystem.name != 'Fedora'
Expand Down Expand Up @@ -152,6 +153,10 @@ wget
<% if os_major >= 6 -%>
redhat-lsb-core
<% end -%>
<% if host_param_true?('fips_enabled') -%>
<%= snippet 'fips_packages' %>
<% end -%>


<% if salt_enabled %>
salt-minion
Expand Down
8 changes: 8 additions & 0 deletions provisioning_templates/snippet/fips_packages.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<%#
kind: snippet
name: fips_packages
iNecas marked this conversation as resolved.
Show resolved Hide resolved
model: ProvisioningTemplate
snippet: true
%>
dracut-fips
-prelink
3 changes: 3 additions & 0 deletions provisioning_templates/snippet/puppet.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ vardir = <%= var_dir %>
logdir = <%= log_dir %>
rundir = <%= run_dir %>
ssldir = <%= ssl_dir %>
<% if host_param_true?('fips_enabled') -%>
digest_algorithm = sha256
<% end -%>

[agent]
pluginsync = true
Expand Down