@Override
  public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
    /* *****************************************************************************************
     * If Kerberos authentication is enabled (authentication.kerberos.enabled = true), respond such
     * that the client is challenged to Negotiate and reissue the request with a Kerberos token.
     * This response is an HTTP 401 status with the "WWW-Authenticate: Negotiate" header.
     *
     * If Kerberos authentication is not enabled, return an HTTP 403 status.
     * ****************************************************************************************** */
    if (kerberosAuthenticationEnabled) {
      response.setHeader("WWW-Authenticate", "Negotiate");
      response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Authentication requested");
    } else {
      response.sendError(HttpServletResponse.SC_FORBIDDEN, authException.getMessage());
    }
  }
A Boolean value declaring whether Kerberos authentication has been enabled (<code>true</code>)
or not (<code>false</code>).
<p>
This value determines the behavior this entry point when authentication fails.
ambari-server/src/main/java/org/apache/ambari/server/security/AmbariEntryPoint.java