[jcifs] NTLM authentication performance

Eric eglass1 at attbi.com
Sat May 17 20:42:18 EST 2003


Attached is a simple web app which uses the JSP stuff.  You will have to 
edit the jcifs.http.domainController init-param to point to an SMB box; 
also, make sure the jCIFS jar is available (this was tested under 0.7.6, 
but should work at least a few revisions back).

You should then be able to go to http://somebox/test/index.jsp, and 
click around.  index.jsp itself doesn't use the class, but the target of 
the POST (test.jsp) does.

Note that use of the extends attribute for JSP pages is generally 
considered poor practice; many servlet containers make assumptions about 
the page implementation which don't hold when you provide a different 
implementation.  This could be the issue you're seeing, although without 
access to a WebSphere container I couldn't tell for sure.  The 
<jsp:forward> might also be causing flukes (I haven't tested that).

As I'm looking at this more closely, I think I see the issue -- there is 
a bug in NtlmServlet.  You're using jcifs.http.domainController = 
"ngsmobile"; is that a domain?  The reason I'm asking is that I just 
noticed NtlmServlet does

UniAddress.getByName(value);

instead of

UniAddress.getByName(value, true);

The difference is that the second will allow for the possibility that 
"value" is a domain/workgroup (rather than a hostname).  This needs to 
be fixed; in the meantime, see if it works by changing the 
jcifs.http.domainController to an IP address.

Eric



Mark Orciuch wrote:
> Hi Eric,
> 
> I appreciate your response. I tried what you're suggesting but the end
> result seems to be the same: my posts quit working (posting results in the
> same page being redisplayed, no error). I'm attaching my web.xml. Also,
> here's the content of my index.jsp:
> 
> <%@ page extends="jcifs.http.NtlmJspBase" %>
> 
> <jsp:forward page="portal/"/>
> 
> I also get DC not available error if I use my production domain controller.
> It works with local domain controller. But that is probably minor compared
> to the other problem I'm facing. I'm starting to think that this is a
> Turbine quirk because I noticed that there's some redirection going during
> my posts.
> 
> BTW: I noticed in your example
> (http://jcifs.samba.org/src/docs/ntlmhttpauth.html) that domain controller
> is specified using "jcifs.http.domainController" property for testing but
> for production it's "jcifs.smb.client.domain" and "jcifs.netbios.wins". What
> is the significance of the wins property? Could this be impacting my
> performance?
> 
> Best regards,
> 
> Mark Orciuch - morciuch at apache.org
> Jakarta Jetspeed - Enterprise Portal in Java
> http://jakarta.apache.org/jetspeed/
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.war
Type: application/octet-stream
Size: 2745 bytes
Desc: not available
Url : http://lists.samba.org/archive/jcifs/attachments/20030517/3751ddd2/test.obj


More information about the jcifs mailing list