Try out anonymous PKINIT after it is configured

After PKINIT certificate is requested and everything is set up, we
should attempt to perform anonymous PKINIT and fail hard if it does not
work for some reason.

https://pagure.io/freeipa/issue/6739

Reviewed-By: Martin Basti <mbasti@redhat.com>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Martin Babinsky
2017-03-15 16:39:39 +01:00
committed by Martin Basti
parent b45629fc48
commit a1686a90c0
+6
View File
@@ -410,6 +410,12 @@ class KrbInstance(service.Service):
root_logger.critical("krb5kdc service failed to restart")
raise
with ipautil.private_ccache() as anon_ccache:
try:
ipautil.run([paths.KINIT, '-n', '-c', anon_ccache])
except ipautil.CalledProcessError as e:
raise RuntimeError("Failed to configure anonymous PKINIT")
def enable_ssl(self):
if self.config_pkinit:
self.steps = []