diff --git a/.github/workflows/ipa-basic-test.yml b/.github/workflows/ipa-basic-test.yml index df314a73025..99da6fe306c 100644 --- a/.github/workflows/ipa-basic-test.yml +++ b/.github/workflows/ipa-basic-test.yml @@ -68,15 +68,15 @@ jobs: run: | docker exec ipa pki-server subsystem-find | tee output - # IPA server should have CA subsystem + # IPA server should have CA and ACME subsystems echo "ca" > expected + echo "acme" >> expected sed -n 's/^ *Subsystem ID: *\(.*\)$/\1/p' output > actual diff expected actual - docker exec ipa pki-server subsystem-show ca | tee output - - # CA subsystem should be enabled + # all subsystems should be enabled echo "True" > expected + echo "True" >> expected sed -n 's/^ *Enabled: *\(.*\)$/\1/p' output > actual diff expected actual @@ -248,16 +248,17 @@ jobs: run: | docker exec ipa pki-server subsystem-find | tee output - # IPA server should now have CA and KRA subsystems + # IPA server should now have CA, KRA, and ACME subsystems echo "ca" > expected echo "kra" >> expected + echo "acme" >> expected sed -n 's/^ *Subsystem ID: *\(.*\)$/\1/p' output > actual diff expected actual - docker exec ipa pki-server subsystem-show kra | tee output - - # KRA subsystem should be enabled + # all subsystems should be enabled echo "True" > expected + echo "True" >> expected + echo "True" >> expected sed -n 's/^ *Enabled: *\(.*\)$/\1/p' output > actual diff expected actual diff --git a/base/server/python/pki/server/subsystem.py b/base/server/python/pki/server/subsystem.py index 3deaff89695..bbb71f4fd29 100644 --- a/base/server/python/pki/server/subsystem.py +++ b/base/server/python/pki/server/subsystem.py @@ -351,22 +351,21 @@ def get_subsystem_index(self, subsystem_id): def find_system_certs(self): - cert_tags = self.config['%s.cert.list' % self.name].split(',') + cert_list = self.config.get('%s.cert.list' % self.name) + if not cert_list: + return [] - for cert_tag in cert_tags: + for cert_tag in cert_list.split(','): yield self.get_subsystem_cert(cert_tag) def get_cert_infos(self): - cert_tags = self.config['%s.cert.list' % self.name].split(',') + cert_list = self.config.get('%s.cert.list' % self.name) + if not cert_list: + return [] - certs = [] - - for cert_tag in cert_tags: - cert = self.get_cert_info(cert_tag) - certs.append(cert) - - return certs + for cert_tag in cert_list.split(','): + yield self.get_cert_info(cert_tag) def get_subsystem_cert(self, tag):