diff --git a/ipatests/test_integration/test_caless.py b/ipatests/test_integration/test_caless.py index a7b2cbbbc..1ea7d9896 100644 --- a/ipatests/test_integration/test_caless.py +++ b/ipatests/test_integration/test_caless.py @@ -1527,6 +1527,13 @@ class TestCertInstall(CALessBase): assert result.returncode == 0 +def verify_kdc_cert_perms(host): + """Verify that the KDC cert pem file has 0644 perms""" + cmd = host.run_command(['stat', '-c', + '"%a %G:%U"', paths.KDC_CERT]) + assert "644 root:root" in cmd.stdout_text + + class TestPKINIT(CALessBase): """Install master and replica with PKINIT""" num_replicas = 1 @@ -1540,6 +1547,7 @@ class TestPKINIT(CALessBase): result = cls.install_server(pkinit_pkcs12_exists=True, pkinit_pin=_DEFAULT) assert result.returncode == 0 + verify_kdc_cert_perms(cls.master) @replica_install_teardown def test_server_replica_install_pkinit(self): @@ -1549,6 +1557,7 @@ class TestPKINIT(CALessBase): pkinit_pin=_DEFAULT) assert result.returncode == 0 self.verify_installation() + verify_kdc_cert_perms(self.replicas[0]) class TestServerReplicaCALessToCAFull(CALessBase):