ipa-kra-install: exit if ca_host is overriden

ipa-kra-install should exit if ca_host line is present
in /etc/ipa/default.conf, as it may lead to a misconfigured
setup.

Fixes: https://pagure.io/freeipa/issue/8245
Signed-off-by: Antonio Torres <antorres@redhat.com>
Reviewed-By: François Cami <fcami@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
This commit is contained in:
Antonio Torres committed 2021-07-27 17:38:45 +02:00
1 parent 02447762a3
commit ab4720d9c2
1 file changed
+5
+5
View File
@@ -53,6 +53,11 @@ def install_check(api, replica_config, options):
"KRA is not installed on the master system. Please use "
"'ipa-kra-install' command to install the first instance.")
if api.env.ca_host is not None and api.env.ca_host != api.env.host:
raise RuntimeError(
"KRA can not be installed when 'ca_host' is overriden in "
"IPA configuration file.")
def install(api, replica_config, options, custodia):
if replica_config is None: