From 49b36583a50e7f542e0667f3e2432ab1aa63924e Mon Sep 17 00:00:00 2001 From: Rob Crittenden Date: Thu, 10 Sep 2009 16:15:14 -0400 Subject: Add external CA signing and abstract out the RA backend External CA signing is a 2-step process. You first have to run the IPA installer which will generate a CSR. You pass this CSR to your external CA and get back a cert. You then pass this cert and the CA cert and re-run the installer. The CSR is always written to /root/ipa.csr. A run would look like: # ipa-server-install --ca --external-ca -p password -a password -r EXAMPLE.COM -u dirsrv -n example.com --hostname=ipa.example.com -U [ sign cert request ] # ipa-server-install --ca --external-ca -p password -a password --external_cert_file=/tmp/rob.crt --external_ca_file=/tmp/cacert.crt -U -p password -a password -r EXAMPLE.COM -u dirsrv -n example.com --hostname=ipa.example.com This also abstracts out the RA backend plugin so the self-signed CA we create can be used in a running server. This means that the cert plugin can request certs (and nothing else). This should let us do online replica creation. To handle the self-signed CA the simple ca_serialno file now contains additional data so we don't have overlapping serial numbers in replicas. This isn't used yet. Currently the cert plugin will not work on self-signed replicas. One very important change for self-signed CAs is that the CA is no longer held in the DS database. It is now in the Apache database. Lots of general fixes were also made in ipaserver.install.certs including: - better handling when multiple CA certificates are in a single file - A temporary directory for request certs is not always created when the class is instantiated (you have to call setup_cert_request()) --- selinux/ipa_httpd/ipa_httpd.te | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'selinux') diff --git a/selinux/ipa_httpd/ipa_httpd.te b/selinux/ipa_httpd/ipa_httpd.te index 84b39e332..29112ba2f 100644 --- a/selinux/ipa_httpd/ipa_httpd.te +++ b/selinux/ipa_httpd/ipa_httpd.te @@ -5,8 +5,10 @@ require { type initrc_t; type var_run_t; type krb5kdc_t; + type cert_t; class sock_file write; class unix_stream_socket connectto; + class file write; } # Let Apache and the KDC talk to DS over ldapi @@ -14,3 +16,7 @@ allow httpd_t var_run_t:sock_file write; allow httpd_t initrc_t:unix_stream_socket connectto; allow krb5kdc_t var_run_t:sock_file write; allow krb5kdc_t initrc_t:unix_stream_socket connectto; + +# Let Apache access the NSS certificate database so it can issue certs +# See ipa_httpd.fe for the list of files that are granted write access +allow httpd_t cert_t:file write; -- cgit