boolean validateUser(AmbariTProxyConfiguration tProxyConfiguration, String proxyUserName, String proxiedUserName) {
    String allowedUsers = tProxyConfiguration.getAllowedUsers(proxyUserName);

    if (StringUtils.isNotEmpty(allowedUsers)) {
      String[] userSpecs = allowedUsers.split("\\s*,\\s*");
      for (String userSpec : userSpecs) {
        if ("*".equals(userSpec) || (userSpec.equalsIgnoreCase(proxiedUserName))) {
          return true;
        }
      }
    }

    return false;
  }
Constructor.
<p>
Given the Ambari {@link Configuration}, initializes the {@link KerberosName} class using
the <code>auth-to-local</code> rules from {@link AmbariKerberosAuthenticationProperties#getAuthToLocalRules()}.

@param configuration the Ambari configuration data
@param users         the Ambari users access object
ambari-server/src/main/java/org/apache/ambari/server/security/authentication/kerberos/AmbariProxiedUserDetailsService.java