[jcifs] NtlmHttpFilter issues.

BASHEER, SHIBU shibu.basheer at emera.com
Wed Mar 22 20:38:32 GMT 2006


Hello,  
 
I am trying to authenticate my j2ee application using NtlmHttpFilter
using instructions from
http://jcifs.samba.org/src/docs/ntlmhttpauth.html
 
My config:
Tomcat 5.5.9
java 1.5.0_06
jcifs-1.2.7.jar
 
I find that the authentication only works intermittently.  After tomcat
server is restarted, the browser automatically authenticates into the
application as the way it should work, however, after a while if another
user tries to start a session, he is challenged with a password dialog.
It will works for the same user after a server reboot.  Sometimes it may
allows one or two users to log in before it starts challenging for
password for new sessions.  There are no errors reported in the logs,
and I do not know why the problem is intermittent.  I have included my
settings in web.xml
 
<filter>
<filter-name>NtlmHttpFilter</filter-name>
<filter-class>jcifs.http.NtlmHttpFilter</filter-class>
<init-param>
	<param-name>jcifs.http.domainController</param-name>
	<param-value>ip.address</param-value>
</init-param>
</filter>

<filter-mapping>
    <filter-name>NtlmHttpFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

Also, another maybe unrelated issue is that jcifs.smb.client.domain
requires the value to be less than 15 characters.  Our domain is 15
characters long, so the NtlmHttpFilter seems to trim the last character
resulting in an UnknownHostException.  For this reason, I am using
jcifs.http.NtlmHttpFilter which seems to work at least after a fresh
server startup.

Any pointers will be much appreciated.

Thanks,
SB


More information about the jcifs mailing list