Skip to content

Commit e8ed07b

Browse files
committed
Use bundle certificate for proxy_ca.pem
Signed-off-by: Eric D. Helms <[email protected]>
1 parent 340c8ee commit e8ed07b

File tree

5 files changed

+8
-20
lines changed

5 files changed

+8
-20
lines changed

manifests/ca.pp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,6 @@
7070
order => '02',
7171
}
7272
}
73-
74-
file { "${certs::ssl_build_dir}/KATELLO-TRUSTED-SSL-CERT":
75-
ensure => absent,
76-
}
7773
}
7874

7975
if $deploy {

manifests/foreman.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@
5656

5757
file { $ssl_ca_cert:
5858
ensure => file,
59-
source => $server_ca,
59+
source => $certs::ca::ca_bundle_path,
6060
owner => 'root',
6161
group => $group,
6262
mode => '0440',
63-
require => File[$server_ca],
63+
require => Concat[$certs::ca::ca_bundle_path],
6464
}
6565
}
6666
}

spec/acceptance/certs_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ class { 'certs':
159159

160160
describe ca_bundle('/root/ssl-build/ca-bundle.crt') do
161161
it { should exist }
162-
its(:size) { should equal 1 }
162+
its(:size) { should equal 2 }
163163
it { should have_cert('/root/ssl-build/katello-default-ca.crt') }
164164
it { should have_cert('/root/ssl-build/katello-server-ca.crt') }
165165
end

spec/acceptance/foreman_proxy_content_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
[
1010
'ssl-build/katello-default-ca.crt',
1111
'ssl-build/katello-server-ca.crt',
12+
'ssl-build/ca-bundle.crt',
1213
'ssl-build/foreman-proxy.example.com/foreman-proxy.example.com-apache.crt',
1314
'ssl-build/foreman-proxy.example.com/foreman-proxy.example.com-foreman-proxy-client.crt',
1415
'ssl-build/foreman-proxy.example.com/foreman-proxy.example.com-foreman-proxy.crt',

spec/acceptance/foreman_spec.rb

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,10 @@
5151
it { should be_grouped_into 'foreman' }
5252
end
5353

54-
describe x509_certificate('/etc/foreman/proxy_ca.pem') do
55-
it { should be_certificate }
56-
it { should be_valid }
57-
its(:issuer) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
58-
its(:subject) { should match_without_whitespace(/C = US, ST = North Carolina, L = Raleigh, O = Katello, OU = SomeOrgUnit, CN = #{fqdn}/) }
59-
its(:keylength) { should be >= 4096 }
60-
end
61-
62-
describe file('/etc/foreman/proxy_ca.pem') do
63-
it { should be_file }
64-
it { should be_mode 440 }
65-
it { should be_owned_by 'root' }
66-
it { should be_grouped_into 'foreman' }
54+
describe ca_bundle('/root/ssl-build/ca-bundle.crt') do
55+
it { should exist }
56+
its(:size) { should equal 1 }
57+
it { should have_cert('/root/ssl-build/katello-default-ca.crt') }
6758
end
6859

6960
describe x509_certificate("/root/ssl-build/#{fqdn}/#{fqdn}-foreman-client.crt") do

0 commit comments

Comments
 (0)