Tag: ntlm

从Java使用SharePoint Web服务时NTLM失败了吗?

我有一个Java客户端,它使用从JDK 6使用JAX-WS实现编写的SharePoint 2010标准Web服务(sitedata.asmx,permissions.asmx等)。 到目前为止,使用自定义Authenticator实现和Authenticator.setDefault(…)方法对NTLM进行Authenticator Authenticator.setDefault(…) 。 在仅具有一个SharePoint服务器的测试环境上运行时,它可以正常工作。 我可以使用WireShark查看所有NTLM协商。 但是,如果在具有多个服务器,硬件负载平衡和多个SharePoint备用访问映射的客户上运行,我会从Web服务调用中获取错误401未授权。 我没有机会使用WireShark来调试该环境。 我从Windows机器(在客户设置上)运行我的客户端,因此根据Java文档,它应该适用于NTLM。 此外,我使用SharePoint的默认URL来访问Web服务(而不是负载平衡的URL)。 运行客户端应用程序的计算机不是SharePoint服务器。 它具有配置了NTLM的Windows集成身份validation。 此外,由于SharePoint管理策略,我无法访问SharePoint管理中心或对配置(也不是IIS)进行任何更改。 我想问一下是否有人知道这个问题是什么? 希望如果有人知道如何解决它? 提前致谢。 编辑: 重要的是,在两种环境中都授予了相同的权限级别。

JCIFS NTLM库的替代品

有没有JCIFS NTLM库的替代品?

Web应用程序中的NTLM身份validation(java)

我在我的Web应用程序中使用以下filter来启用NTLM身份validation。 我得到了Windows浏览器身份validation提示。 它工作正常。 除了这个事实 – 我无法判断身份validation是成功还是失败! * 两种情况都没有错误。 *在每种情况下都会打印用户名(正确或其他),工作站等。 package com.test; import java.io.IOException; import java.io.PrintStream; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import jcifs.ntlmssp.Type3Message; import com.sun.xml.internal.ws.util.StringUtils; import sun.misc.BASE64Decoder; import sun.misc.BASE64Encoder; public class NTLMUserFilter implements Filter { private FilterConfig filterConfig = null; private String userDomain = null; […]

Spring 3和NTLM身份validation

我使用的是Spring 3 Web应用程序,因为Spring 3不支持NTLM身份validation,还有哪些其他替代方法可以与Spring安全性一起使用? 以便用户在登录Active Directory时对应用程序进行身份validation? Kerberos解决方案目前不是一个选项,NTLM是唯一的选择。 任何帮助都非常值得赞赏。 谢谢

Java 6 NTLM代理身份validation和HTTPS – 有没有人让它工作?

我有一个需要访问Web服务的Java应用程序(不是applet)。 已经使用JAX-WS生成了Web服务的代理,并且似乎工作正常。 在一种情况下,它需要通过Web代理服务器(实际上是Squid 3.0)进行通信,该服务器设置为需要NTLM身份validation。 在Sun的JRE 1.6.0_14上运行,一切都可以正常访问HTTP URL,而无需任何更改:内置的NTLM身份validation器启动,并且它都可以无效地运行。 但是,如果Web服务URL是HTTPS URL,则Web服务调用将在Sun的代码内部失败: com.sun.xml.internal.ws.client.ClientTransportException: HTTP transport error: java.lang.NullPointerException at com.sun.xml.internal.ws.transport.http.client.HttpClientTransport.getOutput(HttpClientTransport.java:121) at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.process(HttpTransportPipe.java:142) at com.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.processRequest(HttpTransportPipe.java:83) at com.sun.xml.internal.ws.transport.DeferredTransportPipe.processRequest(DeferredTransportPipe.java:105) at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Fiber.java:587) at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Fiber.java:546) at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Fiber.java:531) at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Fiber.java:428) at com.sun.xml.internal.ws.client.Stub.process(Stub.java:211) at com.sun.xml.internal.ws.client.sei.SEIStub.doProcess(SEIStub.java:124) at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:98) at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78) at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:107) … our web service call … Caused by: java.lang.NullPointerException at sun.net.www.protocol.http.NTLMAuthentication.setHeaders(NTLMAuthentication.java:175) at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:1487) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:164) […]

“匹配的通配符是严格的,但是没有找到元素’http’的声明”错误

我正在尝试配置NTLM身份validation,但收到错误: cvc-complex-type.2.4.c:匹配的通配符是strict,但是没有为元素’http’找到声明。 我读了很多类似错误的主题,但我找不到解决问题的方法。 我的导致错误的security.xml文件是: 0 false COMPANY somenycuser AReallyLoooongRandomPassword 因为版本3.X Spring Security不再包含NTLM扩展,我在http://aloiscochard.blogspot.com/2010/03/spring-security-ntlm-3.html文章中使用它。 请帮帮我。

Java / WebLogic应用程序中的集成Windows身份validation(NTLM)?

我们的团队构建了一个WebLogic Intranet站点。 用户当前必须键入其Active Directory登录名/密码才能访问该站点。 由于我们的大多数用户已经登录到域,因此我们希望使用集成Windows身份validation,以便用户无需重新键入其登录密码。 我已经使用Windows / IIS上托管的.NET应用程序完成了这项工作。 但是,此应用程序内置于WebLogic / Java中,并托管在RedHat Linux上。 是否有可用的分步指南或原型应用程序? (请假设我们在Internet Explorer浏览器上标准化了这个问题。)

在使用NTLM进行身份validation时,HttpClient 4.1.1返回401,浏览器工作正常

我正在尝试使用Apache / Jakarta HttpClient 4.1.1使用给定的凭据连接到任意网页。 为了测试这一点,我在运行的dev机器上安装了最少的IIS 7.5,其中一次只有一种身份validation模式处于活动状态。 基本身份validation工作正常,但每当我尝试登录时,Digest和NTLM都会返回401错误消息。这是我的代码: DefaultHttpClient httpclient = new DefaultHttpClient(); HttpContext localContext = new BasicHttpContext(); HttpGet httpget = new HttpGet(“http://localhost/”); CredentialsProvider credsProvider = new BasicCredentialsProvider(); credsProvider.setCredentials(AuthScope.ANY, new NTCredentials(“user”, “password”, “”, “localhost”)); if (!new File(System.getenv(“windir”) + “\\krb5.ini”).exists()) { List authtypes = new ArrayList(); authtypes.add(AuthPolicy.NTLM); authtypes.add(AuthPolicy.DIGEST); authtypes.add(AuthPolicy.BASIC); httpclient.getParams().setParameter(AuthPNames.PROXY_AUTH_PREF, authtypes); httpclient.getParams().setParameter(AuthPNames.TARGET_AUTH_PREF, authtypes); } localContext.setAttribute(ClientContext.CREDS_PROVIDER, credsProvider); […]

Javamail NTLM身份validation失败

尝试在JavaMail中使用NTLM连接到Exchange服务器。 我可以连接到SMTP,但不能连接到IMAP。 我还可以使用相同的主机/用户名/密码,帐户类型=“IMAP”,端口143,ssl = false,身份validation= NTLM,域名=“”通过OS X Mail.app应用程序进行身份validation。 连接代码: import javax.mail.Session; import javax.mail.Transport; import javax.mail.Store; import java.util.Properties; public class NTLMTest { public static void main(String[] args) throws Exception { final String host = “example.com”; final String user = “bob”; final String password = “password”; final Properties properties = new Properties(); Session session = Session.getDefaultInstance(properties); session.setDebug(true); […]

JAX-WS Sharepoint 401未经授权的NTLM

我尝试通过JAX-WS访问Sharepoint列表,如此处所述 但是,当运行下面的代码时,我得到: java.lang.Exception: Exception. See stacktrace.com.sun.xml.internal.ws.client.ClientTransportException: The server sent HTTP status code 401: Unauthorized Sharepoint需要NTLM身份validation。 可能是什么问题? 非常感谢! public static ListsSoap sharePointListsAuth(String userName, String password) throws Exception { ListsSoap port = null; if (userName != null && password != null) { try { Lists service = new Lists(); port = service.getListsSoap(); System.out.println(“Web Service Auth Username: ” […]