Question

I have two SharePoint applications in the same farm.

The 1st is using classic windows authentication with Ntlm provider.

The 2nd is using claims authentication, with only the Windows authentication provider (Ntlm too).

We are also building a java application (actually a liferay plugin, but that's out of scope). This application has to grab content from the SharePoint application.

This is working for the first application, but not for the second (the one with claims).

So my question is: when using Claims authentication, with Ntlm authentication provider, what are the prerequisites of any consuming application?

Was it helpful?

Solution

We finally found a solution, that consisted in changing the client library.

We especially use the component described here : Support for NTLMv2 with Apache HttpClient using JCIFS.

A sample code we used:

QueryServiceStub queryServiceStub = new QueryServiceStub("SHARE_POINT_ASMX_URL");
List authPrefs = new ArrayList(1);
authPrefs.add(AuthPolicy.NTLM);
AuthPolicy.registerAuthScheme(AuthPolicy.NTLM, JCIFS_NTLMScheme.class);
HttpTransportProperties.Authenticator auth = new HttpTransportProperties.Authenticator();
List<String> authScheme = new ArrayList<String>();
authScheme.add(HttpTransportProperties.Authenticator.NTLM);
auth.setUsername("USERNAME");
auth.setPassword("PASSWORD");
auth.setDomain("DOMAIN");
auth.setHost("SHAREPOINT_HOSTNAME");
auth.setAuthSchemes(authScheme);
queryServiceStub._getServiceClient().getOptions().setProperty(HTTPConstants.REUSE_HTTP_CLIENT, "true");
queryServiceStub._getServiceClient().getOptions().setProperty(HTTPConstants.AUTHENTICATE, auth);
List<Header> headers = new ArrayList<Header>();
Header header = new Header();
header.setName("X-FORMS_BASED_AUTH_ACCEPTED");
header.setValue("f");
headers.add(header);
queryServiceStub._getServiceClient().getOptions().setProperty(HTTPConstants.HTTP_HEADERS, headers);
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top