private Map<String, Map<String, Collection<String>>> validateRequiredPasswords(ClusterTopology topology) {

    Map<String, Map<String, Collection<String>>> missingProperties =
      new HashMap<>();

    for (Map.Entry<String, HostGroupInfo> groupEntry: topology.getHostGroupInfo().entrySet()) {
      String hostGroupName = groupEntry.getKey();
      Map<String, Map<String, String>> groupProperties =
          groupEntry.getValue().getConfiguration().getFullProperties(3);

      Collection<String> processedServices = new HashSet<>();
      Blueprint blueprint = topology.getBlueprint();
      Stack stack = blueprint.getStack();

      HostGroup hostGroup = blueprint.getHostGroup(hostGroupName);
      for (String component : hostGroup.getComponentNames()) {
        //for now, AMBARI is not recognized as a service in Stacks
        if (component.equals(RootComponent.AMBARI_SERVER.name())) {
          continue;
        }

        String serviceName = stack.getServiceForComponent(component);
        if (processedServices.add(serviceName)) {
          //todo: do I need to subtract excluded configs?
          Collection<Stack.ConfigProperty> requiredProperties =
              stack.getRequiredConfigurationProperties(serviceName, PropertyInfo.PropertyType.PASSWORD);

          for (Stack.ConfigProperty property : requiredProperties) {
            String category = property.getType();
            String name = property.getName();
            if (! propertyExists(topology, groupProperties, category, name)) {
              Map<String, Collection<String>> missingHostGroupPropsMap = missingProperties.get(hostGroupName);
              if (missingHostGroupPropsMap == null) {
                missingHostGroupPropsMap = new HashMap<>();
                missingProperties.put(hostGroupName, missingHostGroupPropsMap);
              }
              Collection<String> missingHostGroupTypeProps = missingHostGroupPropsMap.get(category);
              if (missingHostGroupTypeProps == null) {
                missingHostGroupTypeProps = new HashSet<>();
                missingHostGroupPropsMap.put(category, missingHostGroupTypeProps);
              }
              missingHostGroupTypeProps.add(name);
            }
          }
        }
      }
    }
    return missingProperties;
  }
Validate all configurations.  Validation is done on the operational configuration of each
host group.  An operational configuration is achieved by overlaying host group configuration
on top of cluster configuration which overlays the default stack configurations.

@return map of required properties which are missing.  Empty map if none are missing.

@throws IllegalArgumentException if blueprint contains invalid information
ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredPasswordValidator.java