I’ve seen this twice now so I’m documenting the fix so I don’t have to go hunting again.
Basically it starts as a typical “oh crap my certs expired” question on #freeipa or freeipa-users. Sadly the usual things don’t seem to help (go back in time).
The last time this happened there was the added twist that the renewal master was gone so we had to first reconfigure a replica to do the renewal (you do have more than one CA right? RIGHT?)
Anyway, he would persistently get the Peer certificate cannot be authenticated message. We tried:
- Confirming that ipaCert was the correct value in the IPA RA entry in LDAP
- The CA is up and running:
curl --cacert /etc/ipa/ca.crt -v https://`hostname`:8443/ca/ee/ca/getCertChain
- Ensuring that
certutil -L -d /etc/pki/pki-tomcat/alias-n 'caSigningCert cert-pki-ca' -a and cat /etc/ipa/ca.crt are the same cert
Then I remembered a fellow Red Hatter had reported a similar issue and discovered that the fix was to reset the NSS trust flags in the Apache NSS database (which certmonger uses).
# SSL_DIR=/etc/httpd/alias/ curl -v -o /dev/null --cacert /etc/ipa/ca.crt https://`hostname`:8443/ca/agent/ca/profileReview
You should get client certificate not found. If you don’t then try this:
# certutil -M -d /etc/httpd/alias -n 'EXAMPLE.COM IPA CA' -t ,,
# certutil -M -d /etc/httpd/alias -n 'EXAMPLE.COM IPA CA' -t CT,C,C
It had literally been years since I had to setup an AD test environment to do basic winsync testing. I found some scraggly notes and decided to transcribe them here for posterity. They were written for AD 2003 and things for 2008 are a bit different but I still found it fairly easy to figure out (in 2008 there is less need to go to the Start menu).
I don’t in fact remember what a lot of these notes do so don’t kill the messenger.
Start with an AD 2008 instance by following http://www.freeipa.org/page/Setting_up_Active_Directory_domain_for_testing_purposes
Once that is booted:
- Change the hostname
- My Computer -> right click -> Properties -> Computer Name -> Change = win2003
- Manage your Server
- Add or remove a role -> Next [Preliminary Steps]
- Custom -> Domain Controller
- Domain controller for a new domain
- Domain in a new forest
- Fill DNS name for new domain: example.com
- If conflict select Install and Configure DNS on this server
- Start -> Control Panel -> Add or Remove Programs
- Add/Remove Windows Components
- Certificate Services, yes to the question
- Enterprise root CA
- AD CA for the common name
- Accept other defaults
- Ok about IIS
- REBOOT (or wait a little while for certs to issue)
- Start -> Admin Tools -> Certificate Authority
- Certificate Authority -> AD CA -> Issued Certificates
- Select the cert, double click
- Certificate Path
- Select AD CA, view certificate
- Copy to file
- Base 64-encoded x509 (.cer)
- Install WinSCP
- Copy cert to IPA
Now on the IPA master the agreement can be created:
# ipa-replica-manage connect win2003.example.com –winsync –cacert=/home/rcrit/adca.cer -v –no-lookup –binddn ‘cn=administrator,cn=users,dc=example,dc=com’ –bindpw <AD pw> –passsync <something>
As I recall I tended to put the AD hostname into /etc/hosts (hence the –no-lookup).