Java integrates AD domain user authentication with jcifs

Source: Internet
Author: User

Recently found ad this thing old fire, especially related to security this aspect, so the ad domain user authentication becomes now the network security aspect product essential! Here is a simple sharing, Java through the JCIFS integration of AD Domain users to achieve authentication, to achieve network security!

We use a demo to see JCIFS implementation Sso,sso English full name Single sign on, one-point login. SSO is a multi-application system in which users can access all trusted applications with only one login. It includes a mechanism that can map this major login to other apps for the same user's login. It is currently one of the most popular solutions for enterprise business integration.

The first step: put the Jcifs-1.3.15.jar into the Tomcat WebApp directory.

Step Two: Configure in Web. xml:

[HTML]View Plaincopy
  1. <filter>
  2. <filter-name>ntlmhttpfilter</filter-name>
  3. <filter-class>jcifs.http.ntlmhttpfilter</filter-class>
  4. <init-param>
  5. <param-name>jcifs.http.domaincontroller</param-name>
  6. <!--domain server IP --
  7. <param-value>10.10.2.153</param-value>
  8. </init-param>
  9. <init-param>
  10. <param-name>jcifs.util.loglevel</param-name>
  11. <!--log levels --
  12. <param-value>6</param-value>
  13. </init-param>
  14. <init-param>
  15. <param-name>jcifs.smb.lmcompatibility</param-name>
  16. <param-value>0</param-value>
  17. </init-param>
  18. <init-param>
  19. <param-name>jcifs.smb.client.useextendedsecurity</param-name>
  20. <param-value>false</param-value>
  21. </init-param>
  22. <init-param>
  23. <param-name>jcifs.smb.client.username</param-name>
  24. <!--account --
  25. <param-value>administrator</param-value>
  26. </init-param>
  27. <init-param>
  28. <param-name>jcifs.smb.client.password</param-name>
  29. <!--password --
  30. <param-value>admin</param-value>
  31. </init-param>
  32. </filter>
  33. <filter-mapping>
  34. <filter-name>ntlmhttpfilter</filter-name>
  35. <url-pattern>/*</url-pattern>
  36. </filter-mapping>

If you do not enter a domain user and password here and the domain user and password is incorrect, you will not be able to access other data!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.