@Override
  public void validate(ClusterTopology topology) throws InvalidTopologyException {

    defaultPassword = topology.getDefaultPassword();
    Map<String, Map<String, Collection<String>>> missingPasswords = validateRequiredPasswords(topology);

    if (! missingPasswords.isEmpty()) {
      throw new InvalidTopologyException("Missing required password properties.  Specify a value for these " +
          "properties in the cluster or host group configurations or include 'default_password' field in request. " +
          missingPasswords);
    }
  }
Validate that all required password properties have been set or that 'default_password' is specified.

@throws InvalidTopologyException if required password properties are missing and no
                                 default is specified via 'default_password'
ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredPasswordValidator.java