Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to authenticate against AD using the component with tomcat.

I've created my SPN's "setspn.exe -A HTTP/servername SVCTomcat" & "setspn.exe -A HTTP/ SVCTomcat"

I've created my krb5.conf & login.conf file and setup the filter in the web.xml ie.


Note i've stripped extraneous tags from this, so it's not the actual XML.

When i go to a page protected by this filter i get this in the catalina logfile. 25-Mar-2010 12:41:26 org.apache.catalina.startup.Catalina start INFO: Server startup in 4615 ms 25-Mar-2010 12:41:47 net.sourceforge.spnego.SpnegoHttpFilter doFilter FINE: principal=SYSTEM@TESTDOMAIN

And in the hello_spnego.jsp example on the website it just reports the name of the user tomcat is running as (SYSTEM), not the user i'm connecting with.

It seems the author stopped halfway through his debugging page, so i've no areas to look in other than to triple check my config.

Any ideas?

share|improve this question
up vote 0 down vote accepted

Assuming you are using a web browser running on the same machine as Tomcat to hit the hello_spnego.jsp page, here is what I imagine is going on:

  1. You aren't setting the SpnegoHttpFilter configuration parameter "spnego.allow.localhost".

  2. While the reference guide for the filter ( states that this setting defaults to false, a perusal through the source code ( line 80) indicates this parameter defaults to true.

  3. When this parameter is set to true the SpnegoHttpFilter will bypass authentication and instead just set the authenticated principal to the user account Tomcat is running under. This is why you are getting the “SYSTEM@TESTDOMAIN” result.

If my initial assumption is correct, try hitting the hello_spnego.jsp page from a remote machine and it should perform the actual authentication. (You may need to enable Kerberos authentication for your browser.)

Note that the filter author is active on answering questions via the SourceForge project forums at

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.