Java SSO with Wildfly 8, Java 1.8.0_45 and Active Directory

I searched a lot for this topic but cannot find a solution.

Summary of requirements:

  • SSO on WebApp under Wildfly 8.2
  • Windows User Authentication in Active Directory
  • Return to login form when SSO is down
  • Work in the Wildfly domain configuration

Environment:

  • Microsoft AD Windows Server 2012 R2 (1. Machine)
  • Microsoft Server 2012 R2 with Wildfly 8.2 (2. Machine)
  • 2.Machine yas joined the domain

What I have tried so far is related to AD and the Wildfly server via ktpass, kinit, ... it works!

  • Tried the following: It github.com/dstraub/spnego-wildfly does NOT actually work that there is no return (based on the form) and there is a problem with the Java version 1.8.0_45 sourceforge.net/p/spnego/discussion/1003769/thread/700b6941/#cb84.

  • : github.com/kwart/spnego-demo , , Wildfly 8.2 .

  • WAFFLE: Wildfly, Tomcat, .

- , ?

+4
2

:

  • webapp :

    • -18.0.jar
    • -4.1.0.jar
    • - 4.1.0.jar
    • SLF4J--1.7.12.jar
    • -1.7.4.jar
  • Webfilter web.xml:

<filter>
    <filter-name>SecurityFilter</filter-name>
    <filter-class>waffle.servlet.NegotiateSecurityFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>SecurityFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>
  1. HttpServletRequest
public String getUserName() {
    Enumeration<String> headerNames = servletRequest.getHeaderNames();
    while (headerNames.hasMoreElements()) {
        String headerName = headerNames.nextElement();
        String headerValue = servletRequest.getHeader(headerName);
        System.out.println("Header Name:" + headerName + " " + headerValue);
    }       
    return servletRequest.getUserPrincipal().getName();
}
  1. Single-SignOn:

https://github.com/dblock/waffle/blob/master/Docs/ConfiguringBrowsers.md

+3

, NTLM..., SPNEGO dstraub SPNEGO , , , NTLM

JSF PhaseListener, , , AS JBOSS jbossweb... wildfly

web.xml 2 auth-form, SPNEGO, , (, ), , NTLM

- , wildfly, , web- - , , 9, , 8 , FORM, BASIC, EXTERNAL CERT-DIGEST , 10 Kerberos

NTLM 2 , ( )...

0

Source: https://habr.com/ru/post/1610407/


All Articles