Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-83403

Unable to relogin after setting SAML IdP and SP

    Description

    Reproduced on

    • 7.0.x-private@bca6c32678f0f46c4194610b0f16858b270cbf77 , saml
    • Liferay Connector to SAML 2.0 4.0.0 for DXP 7.1 & master-private@f1bced209dacb1a3a5155f61988f50c33a212730

    Reproduction steps

    1. Set up the IdP on localhost:8080
    2. Set up the SP on localhost:9080
    3. Add the SP to the IdP
    4. Logout from both SP and IdP instance
    5. Log in to IdP instance

    Expected: login without error
    Actual: cannot login
    Got this error on the screen: Unable to process SAML request.

    Error log of the IdP instance:

    2018-07-12 08:30:23.974 ERROR [http-nio-8080-exec-4][BaseSamlStrutsAction:54] com.liferay.saml.runtime.SamlException: java.lang.NullPointerException
    com.liferay.saml.runtime.SamlException: java.lang.NullPointerException
            at com.liferay.saml.opensaml.integration.internal.profile.ExceptionHandlerUtil.handleException(ExceptionHandlerUtil.java:34)
            at com.liferay.saml.opensaml.integration.internal.profile.WebSsoProfileImpl.processAuthnRequest(WebSsoProfileImpl.java:159)
            at com.liferay.saml.web.internal.portlet.action.WebSsoAction.doExecute(WebSsoAction.java:59)
            at com.liferay.saml.web.internal.portlet.action.BaseSamlStrutsAction.execute(BaseSamlStrutsAction.java:51)
            at com.liferay.portal.kernel.struts.BaseStrutsAction.execute(BaseStrutsAction.java:39)
            at com.liferay.portal.struts.ActionAdapter.execute(ActionAdapter.java:50)
            at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:425)
            at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:228)
            at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:172)
            at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
            at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
            at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:605)
            at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:582)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:119)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
            at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:343)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
            at com.liferay.portal.servlet.filters.secure.BaseAuthFilter.processFilter(BaseAuthFilter.java:340)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
            at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:88)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
            at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:263)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:144)
            at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
            at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
            at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)
            at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:389)
            at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
            at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:49)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:207)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:112)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:168)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:188)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:96)
            at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:100)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
            at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:494)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92)
            at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:651)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
            at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)
            at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:407)
            at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
            at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:754)
            at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1376)
            at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
            at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
            at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.NullPointerException
            at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
            at com.liferay.saml.opensaml.integration.internal.provider.CachingChainingMetadataProvider.getEntityDescriptor(CachingChainingMetadataProvider.java:141)
            at org.opensaml.saml2.binding.decoding.BaseSAML2MessageDecoder.populateRelyingPartyMetadata(BaseSAML2MessageDecoder.java:218)
            at org.opensaml.saml2.binding.decoding.BaseSAML2MessageDecoder.populateMessageContext(BaseSAML2MessageDecoder.java:86)
            at org.opensaml.saml2.binding.decoding.HTTPPostDecoder.doDecode(HTTPPostDecoder.java:96)
            at org.opensaml.ws.message.decoder.BaseMessageDecoder.decode(BaseMessageDecoder.java:79)
            at org.opensaml.saml2.binding.decoding.BaseSAML2MessageDecoder.decode(BaseSAML2MessageDecoder.java:70)
            at com.liferay.saml.opensaml.integration.internal.profile.BaseProfile.decodeSamlMessage(BaseProfile.java:90)
            at com.liferay.saml.opensaml.integration.internal.profile.WebSsoProfileImpl.decodeAuthnRequest(WebSsoProfileImpl.java:394)
            at com.liferay.saml.opensaml.integration.internal.profile.WebSsoProfileImpl.doProcessAuthnRequest(WebSsoProfileImpl.java:433)
            at com.liferay.saml.opensaml.integration.internal.profile.WebSsoProfileImpl.processAuthnRequest(WebSsoProfileImpl.java:156)
            ... 82 more
    

    New approach to fix this issue (LPS-83403): an XSD.ID conform entityID can't be set on the UI. This LPS fixes the regression and it also fixes the original issue (LPS-79640).

      Attachments

        Issue Links

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                47 weeks, 6 days ago

                Packages

                Version Package
                7.0.X
                7.1.X
                Master