private Map<String, String> principalNames(Cluster cluster, Map<String, Map<String, String>> configuration,
                                             @Nullable KerberosDescriptor userDescriptor,
                                             @Nullable Map<String, DesiredConfig> desiredConfigs)
          throws AmbariException {

    Map<String, String> result = new HashMap<>();
    getKerberosDescriptor(cluster, false, userDescriptor, desiredConfigs).principals()
      .forEach((key, value) -> {
        result.put(key, variableReplacementHelper.replaceVariables(value, configuration));
      });
    return result;
  }
Find the {@link ServiceComponentHost}s for the cluster, filtering using the
supplied "should include" command (<code>shouldIncludeCommand</code>).
<p>
If <code>shouldIncludeCommand</code> is <code>null/code>, no filtering will be performed causing
all found {@link ServiceComponentHost}s to be returned.

@param cluster              the cluster
@param shouldIncludeCommand the filtering logic
@return a list of (filtered) {@link ServiceComponentHost}s
@throws AmbariException if an error occurs
ambari-server/src/main/java/org/apache/ambari/server/controller/KerberosHelperImpl.java