freeipa / freeipa-healthcheck

Check the health of a freeIPA installation
GNU General Public License v3.0
50 stars 28 forks source link

Don't depend on IPA status when suppressing pki checks #250

Closed rcritten closed 2 years ago

rcritten commented 2 years ago

The pki healthchecks are noisy if a CA is not configured. We want to suppresse these in IPA so don't make the checks visible if a CA is not configured.

So this means we need to be able to run in these conditions:

  1. IPA is configured with a CA: the pki checks are run
  2. IPA is configured without a CA: the pki checks are not run
  3. IPA is not configured: the pki checks are run

Which basically equates to three states: True, False, None

This was done originally with the ca_configured variable set to None. Using some inside knowledge the registries are loaded which will set ca_configured to True or False in the IPA registry. Using that we can determine if the pki checks should be available. Unfortunately I changed the initialization to False so it always assumes that IPA is installed. ca_configured will be False for the case of IPA not installed instead of None so we can't handle that last state.

So initialize ca_configured to False so we can satisfy all three states.

https://github.com/freeipa/freeipa-healthcheck/issues/201

Signed-off-by: Rob Crittenden rcritten@redhat.com

rcritten commented 2 years ago

Merging as a one-liner.