Bug 1793975

Summary: Passing IPA to undercloud.conf/certificate_generation_ca generates a certificate from the local CA
Product: Red Hat OpenStack Reporter: Andrea Veri <averi>
Component: openstack-tripleo-heat-templatesAssignee: Ade Lee <alee>
Status: CLOSED ERRATA QA Contact: Jeremy Agee <jagee>
Severity: high Docs Contact:
Priority: high    
Version: 16.0 (Train)CC: acanan, alee, jjoyce, jschluet, mburns, rmascena, slinaber, tvignaud
Target Milestone: z2Keywords: Triaged, ZStream
Target Release: 16.0 (Train on RHEL 8.1)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-0.20200318124138.30bfeec.el8ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-14 12:15:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrea Veri 2020-01-22 12:12:07 UTC
Description of problem:

Setting certificate_generation_ca to IPA doesn't help in any way to have a certificate generated by IDM instead of the default local CA. Seems the certmonger_ca hiera key gets never set when EnableInternalTLS is passed and set to true. In addition to that passing certmonger_ca manually via a customized hiera file doesn't fix the problem as the final certificate gets generated using the local CA even when showing the CA being IPA:

Request ID 'haproxy-external-cert':
	status: MONITORING
	stuck: no
	key pair storage: type=FILE,location='/etc/pki/tls/private/haproxy/overcloud-haproxy-external.key'
	certificate: type=FILE,location='/etc/pki/tls/certs/haproxy/overcloud-haproxy-external.crt'
	CA: IPA
	issuer: CN=84764f16-b90f49d7-8f398f6b-6b7801c5,CN=Local Signing Authority


Version-Release number of selected component (if applicable):


How reproducible:

Always reproducible

Steps to Reproduce:
1. Define certificate_generation_ca on undercloud.conf and set it to IPA
2. Run the undercloud deployment

Actual results:

The final certificate is generated using the local CA instead of IPA

Expected results:

The final certificate being generated by IDM instead of the local CA

Additional info:

There seems to be a new function for IPA certificates within puppet-certmonger (certmonger::request_ipa_cert) but seems i.e tripleo::certmonger::haproxy never using it and defaulting to Certmonger_certificate which no matter what CA you pass in it defaults to generating a certificate using the local self-signed CA.

Comment 4 Andrea Veri 2020-01-24 17:07:35 UTC
For now we landed a workaround (certmonger_ca: IPA on our custom hiera key value pairs), that helped fixing the director build out. In addition to that seems we had a wrong value on another key on undercloud.conf, that messed up certificate generation as templates were correctly referencing IPA as the CA to use when issue the public endpoint certificate but then the local CA was kickin in and generating the cert. Cleaning that value helped fixing that as well and we now have a working OSP 16 director. We're working on inspections right now and then on the overcloud templates. Thanks!

Comment 12 errata-xmlrpc 2020-05-14 12:15:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:2114