Bug 1136542 - RHEL7 Puppetmaster unable to sign certificates for RHEL5 clients
Summary: RHEL7 Puppetmaster unable to sign certificates for RHEL5 clients
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Configuration Management
Version: 6.0.4
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: Unspecified
Assignee: Stephen Benjamin
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker
TreeView+ depends on / blocked
 
Reported: 2014-09-02 20:00 UTC by Mike McCune
Modified: 2019-09-26 13:50 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-22 15:22:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1187793 0 None None None Never
Red Hat Product Errata RHBA-2014:1280 0 normal SHIPPED_LIVE Red Hat Satellite 6 puppet bug fix update 2014-09-22 19:22:09 UTC

Description Mike McCune 2014-09-02 20:00:58 UTC
During %post in the provisioning of a RHEL5 based system the puppet agent will fail to start and register correctly, you are left with:

# /usr/bin/puppet agent -v --config /etc/puppet/puppet.conf -o --tags no_such_tag --server qeblade35.rhq.lab.eng.bos.redhat.com --no-daemonize
Exiting; no certificate found and waitforcert is disabled

On the Puppetmaster if you try and sign it manually you get:


# puppet cert sign --digest SHA1 qe-rhel-5-x64-capsule-02.idmqe.lab.eng.bos.redhat.com
Error: unknown message digest algorithm

This appears to be a result of the rhel5 puppet agent using an incompatible digest when signing the request.

Comment 1 RHEL Program Management 2014-09-02 20:02:57 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Stephen Benjamin 2014-09-02 20:11:44 UTC
Puppet 2.7 signs certificates requests using MD5:
  https://github.com/puppetlabs/puppet/blob/2.7.26/lib/puppet/ssl/certificate_request.rb#L71

This is hard coded, and there doesn't seem to be any way to change this on the client (although puppet agent --digest option would lead you to believe otherwise).

Puppetmaster on at least el7 won't sign MD5 signed CSR's.  We probably need to test el6.


We could patch the el5sat to use SHA256 which actually works just fine:
Line 71:    csr.sign(key, OpenSSL::Digest::SHA256.new)


[root@qeblade35 requests]# puppet cert --list
  "qe-rhel-5-x64-capsule-02.idmqe.lab.eng.bos.redhat.com" (SHA256) 40:48:17:37:9C:16:E1:0B:24:4C:BF:01:3B:40:5D:CD:01:7C:4A:24:83:86:9B:C5:4C:3D:AA:9B:20:06:86:44

[root@qeblade35 requests]# puppet cert --sign qe-rhel-5-x64-capsule-02.idmqe.lab.eng.bos.redhat.com
Notice: Signed certificate request for qe-rhel-5-x64-capsule-02.idmqe.lab.eng.bos.redhat.com
Notice: Removing file Puppet::SSL::CertificateRequest qe-rhel-5-x64-capsule-02.idmqe.lab.eng.bos.redhat.com at '/var/lib/puppet/ssl/ca/requests/qe-rhel-5-x64-capsule-02.idmqe.lab.eng.bos.redhat.com.pem'

Comment 4 Stephen Benjamin 2014-09-02 20:19:54 UTC
(Or just upgrade to Puppet 3.6 on RHEL 5, like we have on RHEL 6 & 7)

Comment 7 Mike McCune 2014-09-02 21:19:17 UTC
This doesn't occur if the Capsule(Puppetmaster) is running on RHEL6

Comment 9 Jason Montleon 2014-09-02 21:36:31 UTC
My understanding is puppet > 2.7 requires ruby 1.8.7 or better. As RHEL 5 ships with 1.8.5 puppet provides a RHEL 5 ruby 1.8.7 build for newer versions of their client to run, but I don't think we can or should do this as part of Satellite.

See http://yum.puppetlabs.com/el/5Server/dependencies/x86_64/

Comment 11 Stephen Benjamin 2014-09-03 10:28:27 UTC
I don't know if PL will take it, but I submitted an PR upstream:
  https://github.com/puppetlabs/puppet/pull/3046

Would prefer not to change the system ruby, I think we all agree on that?

Fixing 2.7 is probably our best bet. Talked to Dominic today and he said it was also probably OK to change.

Comment 18 Bryan Kearney 2014-09-17 12:32:49 UTC
moving to MODIFIED to put into the errata.

Comment 22 Og Maciel 2014-09-19 22:04:35 UTC
VERIFIED

Comment 24 errata-xmlrpc 2014-09-22 15:22:12 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.

http://rhn.redhat.com/errata/RHBA-2014-1280.html


Note You need to log in before you can comment on or make changes to this bug.