summaryrefslogtreecommitdiffstats
path: root/install/restart_scripts
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2014-03-18 11:23:30 -0400
committerPetr Viktorin <pviktori@redhat.com>2014-08-22 09:59:31 +0200
commita25fe00c62117cb11a1e75fbcc4960a0cfa72aab (patch)
treee68182a6cd474c034fc14d83c3a9a4ce840b35c6 /install/restart_scripts
parent981b399c4e6938b4ab096dee9411cb025e221703 (diff)
downloadfreeipa-a25fe00c62117cb11a1e75fbcc4960a0cfa72aab.tar.gz
freeipa-a25fe00c62117cb11a1e75fbcc4960a0cfa72aab.tar.xz
freeipa-a25fe00c62117cb11a1e75fbcc4960a0cfa72aab.zip
Add a KRA to IPA
This patch adds the capability of installing a Dogtag KRA to an IPA instance. With this patch, a KRA is NOT configured by default when ipa-server-install is run. Rather, the command ipa-kra-install must be executed on an instance on which a Dogtag CA has already been configured. The KRA shares the same tomcat instance and DS instance as the Dogtag CA. Moreover, the same admin user/agent (and agent cert) can be used for both subsystems. Certmonger is also confgured to monitor the new subsystem certificates. To create a clone KRA, simply execute ipa-kra-install <replica_file> on a replica on which a Dogtag CA has already been replicated. ipa-kra-install will use the security domain to detect whether the system being installed is a replica, and will error out if a needed replica file is not provided. The install scripts have been refactored somewhat to minimize duplication of code. A new base class dogtagintance.py has been introduced containing code that is common to KRA and CA installs. This will become very useful when we add more PKI subsystems. The KRA will install its database as a subtree of o=ipaca, specifically o=ipakra,o=ipaca. This means that replication agreements created to replicate CA data will also replicate KRA data. No new replication agreements are required. Added dogtag plugin for KRA. This is an initial commit providing the basic vault functionality needed for vault. This plugin will likely be modified as we create the code to call some of these functions. Part of the work for: https://fedorahosted.org/freeipa/ticket/3872 The uninstallation option in ipa-kra-install is temporarily disabled. Reviewed-By: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Petr Viktorin <pviktori@redhat.com>
Diffstat (limited to 'install/restart_scripts')
-rw-r--r--install/restart_scripts/renew_ca_cert11
1 files changed, 6 insertions, 5 deletions
diff --git a/install/restart_scripts/renew_ca_cert b/install/restart_scripts/renew_ca_cert
index 2ad203870..a205b0e36 100644
--- a/install/restart_scripts/renew_ca_cert
+++ b/install/restart_scripts/renew_ca_cert
@@ -21,13 +21,12 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import sys
-import os
import syslog
import tempfile
import shutil
import traceback
-from ipapython import dogtag, certmonger, ipautil
+from ipapython import dogtag, ipautil
from ipapython.dn import DN
from ipalib import api, errors, x509, certstore
from ipaserver.install import certs, cainstance, installutils
@@ -35,6 +34,7 @@ from ipaserver.plugins.ldap2 import ldap2
from ipaplatform import services
from ipaplatform.paths import paths
+
def main():
nickname = sys.argv[1]
@@ -70,8 +70,6 @@ def main():
syslog.syslog(syslog.LOG_ERR, 'No certificate %s found.' % nickname)
sys.exit(1)
- cainstance.update_cert_config(nickname, cert, configured_constants)
-
tmpdir = tempfile.mkdtemp(prefix="tmp-")
try:
principal = str('host/%s@%s' % (api.env.host, api.env.realm))
@@ -79,6 +77,7 @@ def main():
principal)
ca = cainstance.CAInstance(host_name=api.env.host, ldapi=False)
+ ca.update_cert_config(nickname, cert, configured_constants)
if ca.is_renewal_master():
cainstance.update_people_entry(cert)
@@ -198,7 +197,9 @@ def main():
# off the servlet to verify that the CA is actually up and responding so
# when this returns it should be good-to-go. The CA was stopped in the
# pre-save state.
- syslog.syslog(syslog.LOG_NOTICE, 'Starting %s' % dogtag_service.service_name)
+ syslog.syslog(
+ syslog.LOG_NOTICE,
+ 'Starting %s' % dogtag_service.service_name)
try:
dogtag_service.start(dogtag_instance)
except Exception, e: