public void validatePassword(String password) {
    if (StringUtils.isEmpty(password)) {
      throw new IllegalArgumentException("The password does not meet the password policy requirements");
    }
    String regexp = configuration.getPasswordPolicyRegexp();
    if (!StringUtils.isEmpty(regexp) && (!Pattern.matches(regexp,password))) {
      final String msg = "The password does not meet the Ambari user password policy : " + configuration.getPasswordPolicyDescription();
      throw new IllegalArgumentException(msg);
    }
  }
Validates the password meets configured requirements according ambari.properties.

<p>

@param password the password
@throws IllegalArgumentException if password does not meet the password policy requirements
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java