我有一个在 Windows 上运行的 Java 应用程序,需要使用 Kerberos/SPNEGO 对 Web 应用程序进行身份验证。我知道如何配置 JAAS 来实现此目的,但我发现 Java(JDK6 和 JDK7beta)Kerberos 实现缺少一些我需要的重要功能。例如,支持引用或使用 DNS 来确定主机的领域(我有一个多领域环境)。
是否有第三方模块可以使用Windows本机Waffle 及其 WindowsLoginModule,但它似乎没有执行 SSO,因为它要求用户将他们的凭据重新输入到应用程序中。
I have a Java application running on Windows that needs to authenticate to a webapp using Kerberos/SPNEGO. I'm aware of how to configure JAAS to achieve this, but I find the Java (JDK6 and JDK7beta) Kerberos implementation to be lacking a couple important features I need. For example, support for referrals or using the DNS to figure out the realm of a host (I have a multi-realm environment).
Is there a third-party module that can implement authentication using the Windows native SSPI? We've already gone through the trouble of configuring our Windows clients to work within our environment, it'd be nice to not have to do it again for Java. I'm aware of Waffle and its WindowsLoginModule, but it doesn't seem to do SSO as it requires users to re-enter their credentials into the application.
发布评论
评论(1)
我们也遇到过类似的问题。我们面临的主要问题是使用 Windows UAC 时 GSS-API 实现失败,我们使用 Waffle 解决了这个问题。
Waffle 基本上是 JNA 对 SSPI 调用的包装器。我们通过覆盖类
sun.net.www.protocol.http.NegotiatorImpl
成功地使用 Waffle 实现了 SSO:然后您可以创建一个仅包含此类的 JAR,并将其与 Waffle 一起复制& JNA JAR 到 JVM 的 ./jre/lib/endorsed。使用 JVM 的 Java 认可的标准覆盖机制,这替换 JVM 的默认
Negotiator
实现。We've had a similar issue. The main problem for us was that the GSS-API implementation fails when using Windows UAC and we solved it using Waffle.
Waffle is basically a wrapper for the JNA calls to SSPI. We've managed to implement SSO using Waffle by overriding the class
sun.net.www.protocol.http.NegotiatorImpl
:Then you can create a JAR with holding only this class and copy it along with the Waffle & JNA JARs to ./jre/lib/endorsed of your JVM. Using the Java Endorsed Standards Override Mechanism of the JVM, this replaces the default
Negotiator
implementation of the JVM.