Archive for May, 2004

NTLM HTTP Authentication

These days I really feel bad. But I know I must still work and live in the Earth.
Today somebody asked how to take NTLM HTTP Authentication in Java. I do not know either. Then Ali told me that NetBIOS can help me. Thanks a lot to him.
I really do not know Common Internet File System (CIFS), which is the de-facto standard file sharing protocol on the Microsoft Windows platform, before. You can find more by these urls.
[pdf]Common Internet File System (CIFS) Technical Reference
CIFS: A Common Internet File System
Then I find a project named jCIFS which implements the CIFS using Java.
Useful urls:
http://jcifs.samba.org/
jCIFS NTLM HTTP Authentication and the Network Explorer Servlet
NTLM Authentication Scheme for HTTP

And you can read RFC1000 and RFC1001 to learn more about NetBIOS.

如果仅仅是需要进行NT域帐号的验证 (不仅仅是读取), 是非常方便的。只要为Application配置过滤器(filter)就可以了。便可为你的Web应用添加NT域帐号的http验证。

过滤器配置如下:


NtlmHttpFilter
NtlmHttpFilter
jcifs.http.NtlmHttpFilter

jcifs.smb.client.domain

BQC

jcifs.netbios.wins

10.89.48.13

NtlmHttpFilter
/*

可以写个servlet测试一下,有如下截图:

1. 客户端已登陆到域中,并且使用IE
2. 客户端已登陆到域中,使用非IE

则会弹出登陆对话框

几个注意点:

1. 即客户端只能使用IE,才能进行自动验证,否则会弹出登陆框
2. 只能在局域网内,废话~ 但验证的话就无所谓了