This is possible by using the JCIFS module made available by the people of samba.
This has been tested with Ebase version 3.4
1. You can download the JCIFS module, which is actually a JAR-file, from: http://jcifs.samba.org/src/docs/ntlmhttpauth.html
Put the file JCIFS.jar in the following directory: ../UfsServer/tomcat/webapps/ufs/WEB-INF/lib
2. The next step is editing the file: ../UfsServer/tomcat/webapps/ufs/WEB-INF/web.xml
Place the following code after <display-name>UFSWebModule</display-name>
Code: Select all
<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-DOMAIN-CONTROLLER%</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.domain</param-name>
<param-value>%DOMAIN%</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.username</param-name>
<param-value>%USER%</param-value>
</init-param>
<init-param>
<param-name>jcifs.smb.client.password</param-name>
<param-value>%PASSWORD%</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>NtlmHttpFilter</filter-name>
<url-pattern>/ufsmain</url-pattern>
</filter-mapping>
- %IP-DOMAIN-CONTROLLER% -> The IP-adres of your domaincontroller
- %DOMAIN% -> Your domain
- %USER% -> Username of a valid domain user
- %PASSWORD% -> The password of the domain user
You have to supply a username and password because Ebase needs to pre-authenticate itselfs at the domaincontroller.
In the same file put the following code between <!-- and -->
Code: Select all
<error-page id="ErrorCodeErrorPage_2">
<error-code>401</error-code>
<location>/ufs_authentication_error_page.htm</location>
</error-page>
At the moment I do not know why but I did find out that it is a common problem and that the latest version of tomcat should not have this problem.
(see the JCIFS mailing list at http://jcifs.samba.org).
3. Edit the file: ../UfsServer/tomcat/conf/server.xml
Find: <!-- Define a non-SSL HTTP/1.1 Connector on port 3030 -->
Add tomcatAuthentication="false" to this connector.
Find: <!-- Define an AJP 1.3 Connector on port 8009 -->
Add tomcatAuthentication="false" to this connector.
4. The final step is editing the file: ../UfsServer/tomcat/conf/context.xml
Remove the <!-- and --> entry before and after <Manager pathname="" />
5. Restart Apache Tomcat.
If everything works fine the Ebase variable $USER should supply the NT-username.
You can do a lot more with JCIFS.
For more information please see http://jcifs.samba.org/src/docs/ntlmhttpauth.html