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

NPE when signing in with SAML using default SAML Configuration

    Details

    • Fix Priority:
      4

      Description

      Steps to reproduce:

      1. Configure IdP and SP
      2. Assert that SSO happens without warnings or errors
      3. Go to System Settings in SP
      4. Save default SAML Configuration (or deploy config file with default configuration)
      5. Attempt SSO

      Result: Warnings when saving default SAML Configuration.

      21:31:23,752 WARN  [liferay/scheduler_engine-1][QuartzSchedulerEngine:804] Scheduler job com.liferay.saml.runtime.internal.messaging.SamlSpMessageMessageListener.com.liferay.saml.runtime.internal.messaging.SamlSpMessageMessageListener already exists
      21:31:23,763 WARN  [liferay/scheduler_engine-1][QuartzSchedulerEngine:804] Scheduler job com.liferay.saml.runtime.internal.messaging.SamlIdpSsoSessionMessageListener.com.liferay.saml.runtime.internal.messaging.SamlIdpSsoSessionMessageListener already exists
      21:31:23,777 WARN  [liferay/scheduler_engine-1][QuartzSchedulerEngine:804] Scheduler job com.liferay.saml.runtime.internal.messaging.SamlMetadataMessageListener.com.liferay.saml.runtime.internal.messaging.SamlMetadataMessageListener already exists
      21:31:23,812 WARN  [liferay/scheduler_engine-1][QuartzSchedulerEngine:804] Scheduler job com.liferay.saml.runtime.internal.messaging.SamlSpAuthRequestMessageListener.com.liferay.saml.runtime.internal.messaging.SamlSpAuthRequestMessageListener already exists

      NPE when signing in.

      21:42:51,044 ERROR [http-nio-9080-exec-10][SamlSpSsoFilter:61] com.liferay.saml.runtime.SamlException: java.lang.NullPointerException
      com.liferay.saml.runtime.SamlException: java.lang.NullPointerException
      	at com.liferay.saml.opensaml.integration.internal.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:185)
      	at com.liferay.saml.opensaml.integration.internal.profile.BaseProfile.getSamlMessageContext(BaseProfile.java:168)
      	at com.liferay.saml.opensaml.integration.internal.profile.BaseProfile.getSamlMessageContext(BaseProfile.java:223)
      	at com.liferay.saml.opensaml.integration.internal.profile.WebSsoProfileImpl.doSendAuthnRequest(WebSsoProfileImpl.java:632)
      	at com.liferay.saml.opensaml.integration.internal.profile.WebSsoProfileImpl.sendAuthnRequest(WebSsoProfileImpl.java:178)
      	at com.liferay.saml.runtime.internal.servlet.filter.SamlSpSsoFilter.login(SamlSpSsoFilter.java:144)
      	at com.liferay.saml.runtime.internal.servlet.filter.SamlSpSsoFilter.processFilter(SamlSpSsoFilter.java:166)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	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:142)
      	at com.liferay.portal.monitoring.internal.servlet.filter.MonitoringFilter.processFilter(MonitoringFilter.java:181)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	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:394)
      	at com.liferay.portal.servlet.filters.urlrewrite.UrlRewriteFilter.processFilter(UrlRewriteFilter.java:65)
      	at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:48)
      	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:99)
      	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
      	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
      	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
      	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
      	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
      	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
      	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:745)
      Caused by: java.lang.NullPointerException
      	at org.opensaml.xml.security.keyinfo.KeyInfoGeneratorManager.getFactory(KeyInfoGeneratorManager.java:77)
      	at com.liferay.saml.opensaml.integration.internal.util.OpenSamlUtil.buildKeyInfo(OpenSamlUtil.java:589)
      	at com.liferay.saml.opensaml.integration.internal.metadata.MetadataGeneratorUtil.buildSpSsoDescriptor(MetadataGeneratorUtil.java:197)
      	at com.liferay.saml.opensaml.integration.internal.metadata.MetadataGeneratorUtil.buildSpEntityDescriptor(MetadataGeneratorUtil.java:153)
      	at com.liferay.saml.opensaml.integration.internal.metadata.MetadataManagerImpl.getEntityDescriptor(MetadataManagerImpl.java:176)
      	... 51 more

      Reproduced on:
      Tomcat 8.0.32 + MySQL 5.7.19
      Portal 7.0.x-private Git SHA: 2af86042ff58b17659991a3b13b97a2e741f7e94

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              brian.lee Brian Lee
              Reporter:
              brian.lee Brian Lee
              Participants of an Issue:
              Recent user:
              Brian Lee
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                4 years, 1 week, 5 days ago

                  Packages

                  Version Package
                  7.0.X
                  Master