Foren

NTLM Integration Issue with Liferay 6.2

suresh vadlamudi, geändert vor 10 Jahren.

NTLM Integration Issue with Liferay 6.2

Junior Member Beiträge: 33 Beitrittsdatum: 08.09.10 Neueste Beiträge
HI All ,

We are using Liferay 6.2. We have successfully integrated with Microsoft Active Directory.
As per our requirement we need to do the Windows authentication. So we followed the following steps.
1. We added the below entries in portal-ext.properties.
ntlm.auth.enabled=true
ntlm.auth.domain.controller=xxx
ntlm.auth.domain.controller.name=xxx
ntlm.auth.domain=xxx
ntlm.auth.negotiate.flags=0x600FFFFF
ntlm.auth.service.account=xxx
ntlm.auth.service.password=xxx
2. We modified the liferay-web.xml
<filter-mapping>
<filter-name>SSO Ntlm Post Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
3. We restarted the server.
After restarting the server, when we hit the url it not authenticating and its taking into sign in page again.
And we are getting the below exception in the console
ERROR [http-bio-8080-exec-13][NtlmFilter:83] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
.lang.StringIndexOutOfBoundsException: String index out of range: -1

Please help me in fixing this issue.Is this liferay Bug or problem with windows 8 environment ?

Thanks & Regards
Suresh.Vadlamudi
thumbnail
David H Nebinger, geändert vor 10 Jahren.

RE: NTLM Integration Issue with Liferay 6.2

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
how about providing the whole stack trace? Can't even tell what the call stack was when the OOB exception was thrown.
manni java, geändert vor 9 Jahren.

RE: NTLM Integration Issue with Liferay 6.2

New Member Beiträge: 9 Beitrittsdatum: 06.05.14 Neueste Beiträge
I am seeing the same issue in Liferay 6/2 GA2 release while configuring NTLM: Complete stacktrace looks as below
08:58:29,828 ERROR [NtlmFilter:83] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(Unknown Source)
at com.liferay.portal.security.ntlm.NtlmServiceAccount.setAccount(NtlmServiceAccount.java:50)
at com.liferay.portal.security.ntlm.NtlmServiceAccount.<init>(NtlmServiceAccount.java:26)
at com.liferay.portal.security.ntlm.NtlmManager.setConfiguration(NtlmManager.java:122)
at com.liferay.portal.security.ntlm.NtlmManager.<init>(NtlmManager.java:43)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter.getNtlmManager(NtlmFilter.java:128)
at com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter.processFilter(NtlmFilter.java:183)
at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:1852)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Wor

1. Below is how web.xml look like.
<filter>
<filter-name>SSO Ntlm Filter</filter-name>
<filter-class> com.liferay.portal.servlet.filters.sso.ntlm.Ntlm Filter </filter-class>
</filter>

<filter-mapping>
<filter-name>SSO Ntlm Filter</filter-name>
<url-pattern>/c/portal/login</url-pattern>
</filter-mapping>

2.Portal-ext.properties look as below:
ntlm.auth.enabled=true
ntlm.auth.domain.controller=ipaddressofmyldapserver
ntlm.auth.domain.controller.name=nameofmyladapserver
ntlm.auth.domain=mydomain
ntlm.auth.service.account=account
ntlm.auth.service.password=password
For some resaon its looking for "$" (dollar) sign in value of property "ntlm.auth.service.account" .Please help!Thanks.
thumbnail
David H Nebinger, geändert vor 9 Jahren.

RE: NTLM Integration Issue with Liferay 6.2

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
I believe if you check this wiki page, you can find out what the account is, what format it should have (including the $ and the @ signs), etc.
suresh vadlamudi, geändert vor 9 Jahren.

RE: NTLM Integration Issue with Liferay 6.2

Junior Member Beiträge: 33 Beitrittsdatum: 08.09.10 Neueste Beiträge
Hi David,

Here is the whole stack trace

09:49:03,924 INFO [stdout] (http--0.0.0.0-9090-1) 09:49:03,924 ERROR [http--0.0.0.0-9090-1][NtlmFilter:83] java.lang.StringIndexOutOfBoundsException: String index out of range: -1
09:49:03,925 INFO [stdout] (http--0.0.0.0-9090-1) java.lang.StringIndexOutOfBoundsException: String index out of range: -1
09:49:03,925 INFO [stdout] (http--0.0.0.0-9090-1) at java.lang.String.substring(String.java:1911)
09:49:03,925 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.security.ntlm.NtlmServiceAccount.setAccount(NtlmServiceAccount.java:49)
09:49:03,925 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.security.ntlm.NtlmServiceAccount.<init>(NtlmServiceAccount.java:26)
09:49:03,925 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.security.ntlm.NtlmManager.setConfiguration(NtlmManager.java:122)
09:49:03,926 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.security.ntlm.NtlmManager.<init>(NtlmManager.java:43)
09:49:03,926 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter.getNtlmManager(NtlmFilter.java:128)
09:49:03,926 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.servlet.filters.sso.ntlm.NtlmFilter.processFilter(NtlmFilter.java:183)
09:49:03,926 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
09:49:03,927 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
09:49:03,927 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
09:49:03,927 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:169)
09:49:03,927 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
09:49:03,928 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:59)
09:49:03,928 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
09:49:03,928 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
09:49:03,929 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
09:49:03,929 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
09:49:03,929 INFO [stdout] (http--0.0.0.0-9090-1) at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
09:49:03,929 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:204)
09:49:03,930 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:109)
09:49:03,930 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
09:49:03,931 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
09:49:03,931 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:165)
09:49:03,931 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
09:49:03,931 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:185)
09:49:03,932 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
09:49:03,932 INFO [stdout] (http--0.0.0.0-9090-1) at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:96)
09:49:03,933 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
09:49:03,933 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
09:49:03,933 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
09:49:03,933 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
09:49:03,934 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:397)
09:49:03,934 INFO [stdout] (http--0.0.0.0-9090-1) at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50)
09:49:03,934 INFO [stdout] (http--0.0.0.0-9090-1) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153)
09:49:03,934 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
09:49:03,935 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
09:49:03,935 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
09:49:03,935 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
09:49:03,935 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
09:49:03,936 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
09:49:03,936 INFO [stdout] (http--0.0.0.0-9090-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
09:49:03,936 INFO [stdout] (http--0.0.0.0-9090-1) at java.lang.Thread.run(Thread.java:745)