Bug 1129558
Summary: | Windows Server 2012 CA does not accept CSR generated by IdM External CA installation | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Martin Kosek <mkosek> |
Component: | ipa | Assignee: | Martin Kosek <mkosek> |
Status: | CLOSED ERRATA | QA Contact: | Namita Soman <nsoman> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | aakkiang, atolani, bharrington, cfu, dbible, dpal, edewata, jcholast, kburres, mharmsen, mkosek, nkinder, rcritten, spoore |
Target Milestone: | pre-dev-freeze | ||
Target Release: | 7.1 | ||
Hardware: | Unspecified | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | ipa-4.1.0-4.el7 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | 790924 | Environment: | |
Last Closed: | 2015-03-05 10:13:13 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | 790924, 1111320, 1151147 | ||
Bug Blocks: | 530474 |
Description
Martin Kosek
2014-08-13 07:57:19 UTC
This Bugzilla is to make sure that IdM is capable of easy enrolling as subCA to MS CA 2012 service. It depends on change in PKI to generate proper CSR. == Workaround == When testing a fix for Bug 1111320 I managed to enroll IPA as a subCA to Microsoft Windows Server 2012 CA. I just must not request the certificate via Web UI (by passing ipa.csr generated by --external-ca installation), but I had to request it via command line: certreq.exe -submit -attrib "CertificateTemplate:SubCA" ipa.csr mkad2012-ipa-ca With the patch for 1111320, the IPA installation succeed. See Bug 1111320, Comment 27 for details. I prepared a chapter on FreeIPA upstream wiki with the workaround mentioned in Comment 3 to spread the information further: http://www.freeipa.org/page/PKI#Blending_in_PKI_infrastructure Upstream ticket: https://fedorahosted.org/freeipa/ticket/4496 Upstream ticket: https://fedorahosted.org/freeipa/ticket/4489 *** Bug 1129561 has been marked as a duplicate of this bug. *** This should be done in the same release as our external CA chaining tool RFE tracked in Bug 886645. Usability fixes in upstream CA related installation options: master: https://fedorahosted.org/freeipa/changeset/60ecba77cd98f37be0d2c0f69efd307a687e59dc https://fedorahosted.org/freeipa/changeset/3aa0731fc660ea3d111a44926ab5dea71dc510e7 https://fedorahosted.org/freeipa/changeset/88083887c994ab505d6e07151e5dd26b56bb7732 https://fedorahosted.org/freeipa/changeset/3cde7e9cfd7908b24082e3e50cdd0955726223d0 https://fedorahosted.org/freeipa/changeset/83cbfa8eaee6b2b84eb9fe9e514a339780df81b5 ipa-4-1: https://fedorahosted.org/freeipa/changeset/b93bdb7b3ef0f9229b1bb2f5e4db1c4efc1616ea https://fedorahosted.org/freeipa/changeset/6136a3eb5d943792853359047770b0d85568d4fd https://fedorahosted.org/freeipa/changeset/a29ee452c4c1b776521869f87433605dc9dd8e77 https://fedorahosted.org/freeipa/changeset/01623f70d85065d48433d26e4d42c885a49989e8 https://fedorahosted.org/freeipa/changeset/0c4d7dabf3e3642451ecaac7837f08011ac772dd == WORKAROUND 2 == When quickly checking the Bug 1151147 that Jan filed, I found a workaround on AD site how to force AD to issue certificates with UTF-8 encoding of certificate commonName field. You would need to follow section "Enforce UTF8 encoding" http://support.microsoft.com/kb/888180 and type following commands (tested on my Windows Server 2012): certutil -setreg ca\forceteletex +0x20 net stop certsvc net start cersvc FreeIPA command line support is fixed upstream, we are just waiting what will be the next steps with Bug 1151147. master: * 4cdeacdedfe344e570da99548043a07a6fa24dbe Support MS CS as the external CA in ipa-server-install and ipa-ca-install ipa-4-1: * fdf46ac1c330e70893d6d13f1be24ee5063d27c6 Support MS CS as the external CA in ipa-server-install and ipa-ca-install To install FreeIPA with MS external CA, use command line switch --external-ca-type=ms-cs Bumping pki-ca Requires was delayed to upstream ticket https://fedorahosted.org/freeipa/ticket/4645 We should not stall this feature, there exists an workaround + PKI bug is filed and acknowledged. Require pki-core-10.1.2-4.el7 now that bug 1151147 was fixed. Verified. Version :: Results :: [root@vm1 mscs]# ipa-server-install --setup-dns --forwarder=192.168.122.1 -r EXAMPLE.TEST -a Secret123 -p Secret123 --external-ca -U The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will set up the IPA Server. This includes: * Configure a stand-alone CA (dogtag) for certificate management * Configure the Network Time Daemon (ntpd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure DNS (bind) Warning: skipping DNS resolution of host vm1.example.test The domain name has been determined based on the host name. Adding [192.168.122.201 vm1.example.test] to your /etc/hosts file Checking forwarders, please wait ... WARNING: DNS forwarder 192.168.122.1 does not return DNSSEC signatures in answers Please fix forwarder configuration to enable DNSSEC support. (For BIND 9 add directive "dnssec-enable yes;" to "options {}") WARNING: DNSSEC validation will be disabled Using reverse zone(s) 122.168.192.in-addr.arpa. The IPA Master Server will be configured with: Hostname: vm1.example.test IP address(es): 192.168.122.201 Domain name: example.test Realm name: EXAMPLE.TEST BIND DNS server will be configured to serve IPA domain with: Forwarders: 192.168.122.1 Reverse zone(s): 122.168.192.in-addr.arpa. Configuring NTP daemon (ntpd) [1/4]: stopping ntpd [2/4]: writing configuration [3/4]: configuring ntpd to start on boot [4/4]: starting ntpd Done configuring NTP daemon (ntpd). Configuring directory server (dirsrv): Estimated time 1 minute [1/38]: creating directory server user [2/38]: creating directory server instance [3/38]: adding default schema [4/38]: enabling memberof plugin [5/38]: enabling winsync plugin [6/38]: configuring replication version plugin [7/38]: enabling IPA enrollment plugin [8/38]: enabling ldapi [9/38]: configuring uniqueness plugin [10/38]: configuring uuid plugin [11/38]: configuring modrdn plugin [12/38]: configuring DNS plugin [13/38]: enabling entryUSN plugin [14/38]: configuring lockout plugin [15/38]: creating indices [16/38]: enabling referential integrity plugin [17/38]: configuring certmap.conf [18/38]: configure autobind for root [19/38]: configure new location for managed entries [20/38]: configure dirsrv ccache [21/38]: enable SASL mapping fallback [22/38]: restarting directory server [23/38]: adding default layout [24/38]: adding delegation layout [25/38]: creating container for managed entries [26/38]: configuring user private groups [27/38]: configuring netgroups from hostgroups [28/38]: creating default Sudo bind user [29/38]: creating default Auto Member layout [30/38]: adding range check plugin [31/38]: creating default HBAC rule allow_all [32/38]: initializing group membership [33/38]: adding master entry [34/38]: configuring Posix uid/gid generation [35/38]: adding replication acis [36/38]: enabling compatibility plugin [37/38]: tuning directory server [38/38]: configuring directory to start on boot Done configuring directory server (dirsrv). Configuring certificate server (pki-tomcatd): Estimated time 3 minutes 30 seconds [1/8]: creating certificate server user [2/8]: configuring certificate server instance The next step is to get /root/ipa.csr signed by your CA and re-run /usr/sbin/ipa-server-install as: /usr/sbin/ipa-server-install --external-cert-file=/path/to/signed_certificate --external-cert-file=/path/to/external_ca_certificate Here I copied ipa.csr to Windows Server 2012 ADCS server and signed it and copied signed cert and the AD CA cert chain back to complete the setup. It should be noted that I used the web enrollment interface for this. [root@vm1 ~]# ls adca_chain.p7b ca-agent.p12 certnew.cer ipa_qe_certs.py tw.py anaconda-ks.cfg cacert.p12 ipa.csr mscs [root@vm1 ~]# openssl pkcs7 -print_certs -in adca_chain.p7b -inform DER -out adca_chain.pem [root@vm1 ~]# ipa-server-install --setup-dns --forwarder=192.168.122.1 -r EXAMPLE.TEST -a Secret123 -p Secret123 -U --external-cert-file=/root/certnew.cer --external-cert-file=/root/adca_chain.pem The log file for this installation can be found in /var/log/ipaserver-install.log ============================================================================== This program will set up the IPA Server. This includes: * Configure a stand-alone CA (dogtag) for certificate management * Configure the Network Time Daemon (ntpd) * Create and configure an instance of Directory Server * Create and configure a Kerberos Key Distribution Center (KDC) * Configure Apache (httpd) * Configure DNS (bind) Warning: skipping DNS resolution of host vm1.example.test Checking forwarders, please wait ... WARNING: DNS forwarder 192.168.122.1 does not return DNSSEC signatures in answers Please fix forwarder configuration to enable DNSSEC support. (For BIND 9 add directive "dnssec-enable yes;" to "options {}") Using reverse zone(s) 122.168.192.in-addr.arpa. The IPA Master Server will be configured with: Hostname: vm1.example.test IP address(es): 192.168.122.201 Domain name: example.test Realm name: EXAMPLE.TEST BIND DNS server will be configured to serve IPA domain with: Forwarders: 192.168.122.1 Reverse zone(s): 122.168.192.in-addr.arpa. Configuring certificate server (pki-tomcatd): Estimated time 3 minutes 30 seconds [1/27]: creating certificate server user [2/27]: configuring certificate server instance [3/27]: stopping certificate server instance to update CS.cfg [4/27]: backing up CS.cfg [5/27]: disabling nonces [6/27]: set up CRL publishing [7/27]: enable PKIX certificate path discovery and validation [8/27]: starting certificate server instance [9/27]: creating RA agent certificate database [10/27]: importing CA chain to RA certificate database [11/27]: fixing RA database permissions [12/27]: setting up signing cert profile [13/27]: set certificate subject base [14/27]: enabling Subject Key Identifier [15/27]: enabling Subject Alternative Name [16/27]: enabling CRL and OCSP extensions for certificates [17/27]: setting audit signing renewal to 2 years [18/27]: configuring certificate server to start on boot [19/27]: restarting certificate server [20/27]: requesting RA certificate from CA [21/27]: issuing RA agent certificate [22/27]: adding RA agent as a trusted user [23/27]: configure certmonger for renewals [24/27]: configure certificate renewals [25/27]: configure RA certificate renewal [26/27]: configure Server-Cert certificate renewal [27/27]: Configure HTTP to proxy connections Done configuring certificate server (pki-tomcatd). Configuring directory server (dirsrv): Estimated time 10 seconds [1/3]: configuring ssl for ds instance [2/3]: restarting directory server [3/3]: adding CA certificate entry Done configuring directory server (dirsrv). Configuring Kerberos KDC (krb5kdc): Estimated time 30 seconds [1/10]: adding sasl mappings to the directory [2/10]: adding kerberos container to the directory [3/10]: configuring KDC [4/10]: initialize kerberos container [5/10]: adding default ACIs [6/10]: creating a keytab for the directory [7/10]: creating a keytab for the machine [8/10]: adding the password extension to the directory [9/10]: starting the KDC [10/10]: configuring KDC to start on boot Done configuring Kerberos KDC (krb5kdc). Configuring kadmin [1/2]: starting kadmin [2/2]: configuring kadmin to start on boot Done configuring kadmin. Configuring ipa_memcached [1/2]: starting ipa_memcached [2/2]: configuring ipa_memcached to start on boot Done configuring ipa_memcached. Configuring ipa-otpd [1/2]: starting ipa-otpd [2/2]: configuring ipa-otpd to start on boot Done configuring ipa-otpd. Configuring the web interface (httpd): Estimated time 1 minute [1/16]: setting mod_nss port to 443 [2/16]: setting mod_nss protocol list to TLSv1.0 - TLSv1.1 [3/16]: setting mod_nss password file [4/16]: enabling mod_nss renegotiate [5/16]: adding URL rewriting rules [6/16]: configuring httpd [7/16]: configure certmonger for renewals [8/16]: setting up ssl [9/16]: importing CA certificates from LDAP [10/16]: setting up browser autoconfig [11/16]: publish CA cert [12/16]: creating a keytab for httpd [13/16]: clean up any existing httpd ccache [14/16]: configuring SELinux for httpd [15/16]: restarting httpd [16/16]: configuring httpd to start on boot Done configuring the web interface (httpd). Applying LDAP updates Restarting Directory server to apply updates [1/2]: stopping directory server [2/2]: starting directory server Done. Restarting the directory server Restarting the KDC Restarting the certificate server Configuring DNS (named) [1/12]: generating rndc key file [2/12]: adding DNS container [3/12]: setting up our zone [4/12]: setting up reverse zone [5/12]: setting up our own record [6/12]: setting up records for other masters [7/12]: adding NS record to the zones [8/12]: setting up CA record [9/12]: setting up kerberos principal [10/12]: setting up named.conf [11/12]: configuring named to start on boot [12/12]: changing resolv.conf to point to ourselves Done configuring DNS (named). Restarting named Global DNS configuration in LDAP server is empty You can use 'dnsconfig-mod' command to set global DNS options that would override settings in local named.conf files Restarting the web server ============================================================================== Setup complete Next steps: 1. You must make sure these network ports are open: TCP Ports: * 80, 443: HTTP/HTTPS * 389, 636: LDAP/LDAPS * 88, 464: kerberos * 53: bind UDP Ports: * 88, 464: kerberos * 53: bind * 123: ntp 2. You can now obtain a kerberos ticket using the command: 'kinit admin' This ticket will allow you to use the IPA tools (e.g., ipa user-add) and the web user interface. Be sure to back up the CA certificate stored in /root/cacert.p12 This file is required to create replicas. The password for this file is the Directory Manager password 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://rhn.redhat.com/errata/RHSA-2015-0442.html |