<div dir="ltr">Hey Jason,<br>                 Thanks for the info, I am still a big time newbie on understanding <span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">intermediary  SSL etc.</span><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px">If I am understanding correctly, On the pulp host I would have to create my own root ca with instructions like this: </span><font color="#000000" face="arial, sans-serif"><a href="https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/">https://jamielinux.com/articles/2013/08/act-as-your-own-certificate-authority/</a> </font></div><div><font color="#000000" face="arial, sans-serif">sign the Pulp Root CA with my internal MS root CA cert ? Or would I just concatenate both the MS Internal Root CA and the Pulp Linux root CA into a chain as you have specified above?</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">Sorry I am big time newbie at this, or would it be easier to just downgrade to a safer version of PULP?</font></div><div><font color="#000000" face="arial, sans-serif"><br></font></div><div><font color="#000000" face="arial, sans-serif">Thanks for your time.</font></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 29, 2014 at 12:04 AM, Ashby, Jason (IMS) <span dir="ltr"><<a href="mailto:AshbyJ@imsweb.com" target="_blank">AshbyJ@imsweb.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm all squared away now with my certs.  I CC'ed Gavin since he was having similar issues with a similar intermediary setup. Here are some notes that may help others, and one of them seems like a bug in verify_cert, or at least a bug with my setup.<br>
<br>
<br>
I had to create a chain cert for ssl_ca_certificate:<br>
<br>
# /etc/pulp/server.conf<br>
[security]<br>
cacert: /etc/pki/pulp_certs/pulpca.crt<br>
cakey: /etc/pki/pulp_certs/pulpca.key<br>
ssl_ca_certificate: /etc/pki/pulp_certs/pulpca_chain.crt<br>
<br>
The chain cert was created by concatenating my company's root CA and the intermediary CA (the pulp CA which was signed by the root CA):<br>
<br>
cat rootca.cer pulpca.crt > pulpca_chain.crt<br>
<br>
You can get your Microsoft-based root CA (rootca.cer above) from the certsrv application:<br>
<br>
- Download a CA certificate, certificate chain, or CRL<br>
- click link for "To trust certificates issued from this certification authority, install this CA certificate."<br>
<br>
<br>
Add your root and intermediary CA's to system CA bundle (copy ca-bundle.crt out to all consumers too):<br>
<br>
openssl x509 -in /etc/pki/pulp_certs/rootca.crt -text >> /etc/pki/tls/certs/ca-bundle.crt<br>
openssl x509 -in /etc/pki/pulp_certs/pulpca.crt -text >> /etc/pki/tls/certs/ca-bundle.crt<br>
<br>
<br>
In addition, I found that certificates could not be verified against the intermediary CA alone.  I had to make the following change to verify_cert in order to get M2Crypto to use the chain (specified in server.conf ssl_ca_certificate):<br>
<br>
<br>
# /usr/lib/python2.6/site-packages/pulp/server/managers/auth/cert/cert_generator.py<br>
    def verify_cert(self, cert_pem):<br>
        '''<br>
        Ensures the given certificate can be verified against the server's CA.<br>
<br>
        @param cert_pem: PEM encoded certificate to be verified<br>
        @type  cert_pem: string<br>
<br>
        @return: True if the certificate is successfully verified against the CA; False otherwise<br>
        @rtype:  boolean<br>
        '''<br>
<br>
        # M2Crypto doesn't support verifying a cert against a CA, so call out to openssl<br>
        # ca_cert = config.config.get('security', 'cacert')<br>
        # FIX - Use CA chain in order to support the use of an intermediary CA aka sub-CA<br>
        ca_cert = config.config.get('security', 'ssl_ca_certificate')<br>
<br>
        cmd = 'openssl verify -CAfile %s' % ca_cert<br>
        p = subprocess.Popen(cmd, shell=True, stdin=subprocess.PIPE,<br>
                         stdout=subprocess.PIPE, stderr=subprocess.PIPE)<br>
<br>
<br>
<br>
Hope that helps. I'll try to file a bug with more info later.  Right now I've got some catching up to do :).<br>
<br>
-----Original Message-----<br>
From: <a href="mailto:pulp-list-bounces@redhat.com">pulp-list-bounces@redhat.com</a> [mailto:<a href="mailto:pulp-list-bounces@redhat.com">pulp-list-bounces@redhat.com</a>] On Behalf Of Brian Bouterse<br>
Sent: Friday, October 24, 2014 3:22 PM<br>
To: Randy Barlow<br>
Cc: <a href="mailto:pulp-list@redhat.com">pulp-list@redhat.com</a><br>
Subject: Re: [Pulp-list] Qpid SSL on Pulp 2.4<br>
<br>
By using the pulp-qpid-ssl-cfg and using your own CA and key, it then used the CA to create a certificate for the broker and the client, and it also adds them to an NSS database.<br>
<br>
Interestingly, your server.conf doesn't specify the same CA you told pulp-qpid-ssl-cfg to use. I expected cacert to be /etc/pki/pulp_certs/pulpca.crt for both the [messaging] and [tasks] section. Any changes to that file requires a restart of all the services. What does that do?<br>
<br>
As another thing to try, could you try having the script generate its own CA and use the recommended settings it provides. You could give it a different root folder so you could have the certs side-by-side in the filesystem. This would let us troubleshoot from a known working state with SSL working just not with a cert you provide. Just a thought about how we can eliminate all other concerns besides a cert that you are providing.<br>
<br>
-Brian<br>
<br>
<br>
----- Original Message -----<br>
> From: "Randy Barlow" <<a href="mailto:rbarlow@redhat.com">rbarlow@redhat.com</a>><br>
> To: "Jeff Ortel" <<a href="mailto:jortel@redhat.com">jortel@redhat.com</a>>, <a href="mailto:pulp-list@redhat.com">pulp-list@redhat.com</a><br>
> Sent: Friday, October 24, 2014 2:55:00 PM<br>
> Subject: Re: [Pulp-list] Qpid SSL on Pulp 2.4<br>
><br>
> On 10/24/2014 02:40 PM, Ashby, Jason (IMS) wrote:<br>
> > Those certs are the ones generated by /usr/bin/pulp-qpid-ssl-cfg.  I<br>
> > accepted the defaults for that script, except for the CA cert and key<br>
> > which I supplied with:<br>
> ><br>
> > Please specify a CA.  Generated if not specified.<br>
> >   Enter a path: /etc/pki/pulp_certs/pulpca.crt<br>
> ><br>
> > Please specify the CA key<br>
> >   Enter a path: /etc/pki/pulp_certs/pulpca.key<br>
> ><br>
> > Does that answer your questions?<br>
><br>
> I'm not familiar with pulp-qpid-ssl-cfg myself. Jeff, do you know if<br>
> this is correct?<br>
><br>
><br>
> _______________________________________________<br>
> Pulp-list mailing list<br>
> <a href="mailto:Pulp-list@redhat.com">Pulp-list@redhat.com</a><br>
> <a href="https://www.redhat.com/mailman/listinfo/pulp-list" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a><br>
<br>
_______________________________________________<br>
Pulp-list mailing list<br>
<a href="mailto:Pulp-list@redhat.com">Pulp-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/pulp-list" target="_blank">https://www.redhat.com/mailman/listinfo/pulp-list</a><br>
<br>
________________________________<br>
<br>
Information in this e-mail may be confidential. It is intended only for the addressee(s) identified above. If you are not the addressee(s), or an employee or agent of the addressee(s), please note that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender of the error.<br>
</blockquote></div><br></div>