title: WSO2 APIM with WSO2 IS - SSO configuration not working
body: <p>Hello I am trying to configure WSO2 Identity Server 5.7.0 as SSO Identity Provider in WSO2 API M 2.6.0. I have followed the steps mentioned in <a href="https://docs.wso2.com/display/AM260/Configuring+Identity+Server+as+IDP+for+SSO" rel="nofollow noreferrer">https://docs.wso2.com/display/AM260/Configuring+Identity+Server+as+IDP+for+SSO</a>.</p>
  
  <p>But getting the below error in API M log when trying to access publisher.</p>
  
  <p>TID: [-1234] [] [2019-11-07 16:25:03,983] ERROR {org.wso2.carbon.hostobjects.sso.internal.util.Util} -  Error when getting key store of tenant carbon.super {org.wso2.carbon.hostobjects.sso.internal.util.Util}
  java.lang.NullPointerException
          at org.wso2.carbon.hostobjects.sso.internal.util.X509CredentialImpl.(X509CredentialImpl.java:66)
          at org.wso2.carbon.hostobjects.sso.internal.util.Util.validateSignature(Util.java:312)
          at org.wso2.carbon.hostobjects.sso.SAMLSSORelyingPartyObject.jsFunction_validateSignature(SAMLSSORelyingPartyObject.java:155)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
          at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
          at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
          at org.jaggeryjs.rhino.publisher.jagg.c1._c_anonymous_1(/publisher/jagg/jaggery_acs.jag:135)
          at org.jaggeryjs.rhino.publisher.jagg.c1.call(/publisher/jagg/jaggery_acs.jag)
          at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
          at org.jaggeryjs.rhino.publisher.jagg.c1._c_script_0(/publisher/jagg/jaggery_acs.jag:5)
          at org.jaggeryjs.rhino.publisher.jagg.c1.call(/publisher/jagg/jaggery_acs.jag)
          at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
          at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
          at org.jaggeryjs.rhino.publisher.jagg.c1.call(/publisher/jagg/jaggery_acs.jag)
          at org.jaggeryjs.rhino.publisher.jagg.c1.exec(/publisher/jagg/jaggery_acs.jag)
          at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
          at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
          at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
          at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
          at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
          at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:124)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
          at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:80)
          at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:91)
          at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:65)
          at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
          at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
          at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
          at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
          at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
          at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
          at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
          at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:748)
  TID: [-1234] [] [2019-11-07 16:25:03,986] ERROR {org.jaggeryjs.jaggery.core.manager.WebAppManager} -  org.mozilla.javascript.WrappedException: Wrapped org.wso2.carbon.hostobjects.sso.SignatureVerificationException (/publisher/jagg/jaggery_acs.jag#135) {org.jaggeryjs.jaggery.core.manager.WebAppManager}
  org.jaggeryjs.scriptengine.exceptions.ScriptException: org.mozilla.javascript.WrappedException: Wrapped org.wso2.carbon.hostobjects.sso.SignatureVerificationException (/publisher/jagg/jaggery_acs.jag#135)
          at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:571)
          at org.jaggeryjs.scriptengine.engine.RhinoEngine.exec(RhinoEngine.java:273)
          at org.jaggeryjs.jaggery.core.manager.WebAppManager.exec(WebAppManager.java:588)
          at org.jaggeryjs.jaggery.core.manager.WebAppManager.execute(WebAppManager.java:508)
          at org.jaggeryjs.jaggery.core.JaggeryServlet.doPost(JaggeryServlet.java:29)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
          at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:743)
          at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:485)
          at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:377)
          at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:337)
          at org.jaggeryjs.jaggery.core.JaggeryFilter.doFilter(JaggeryFilter.java:21)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.wso2.carbon.ui.filters.cache.ContentTypeBasedCachePreventionFilter.doFilter(ContentTypeBasedCachePreventionFilter.java:53)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.filters.HttpHeaderSecurityFilter.doFilter(HttpHeaderSecurityFilter.java:124)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
          at org.wso2.carbon.identity.context.rewrite.valve.TenantContextRewriteValve.invoke(TenantContextRewriteValve.java:80)
          at org.wso2.carbon.identity.authz.valve.AuthorizationValve.invoke(AuthorizationValve.java:91)
          at org.wso2.carbon.identity.auth.valve.AuthenticationValve.invoke(AuthenticationValve.java:65)
          at org.wso2.carbon.tomcat.ext.valves.CompositeValve.continueInvocation(CompositeValve.java:99)
          at org.wso2.carbon.tomcat.ext.valves.CarbonTomcatValve$1.invoke(CarbonTomcatValve.java:47)
          at org.wso2.carbon.webapp.mgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:57)
          at org.wso2.carbon.event.receiver.core.internal.tenantmgt.TenantLazyLoaderValve.invoke(TenantLazyLoaderValve.java:48)
          at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(TomcatValveContainer.java:47)
          at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValve.java:62)
          at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.invoke(CarbonStuckThreadDetectionValve.java:159)
          at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
          at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(CarbonContextCreatorValve.java:57)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1115)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1775)
          at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1734)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
          at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
          at java.lang.Thread.run(Thread.java:748)
  Caused by: org.mozilla.javascript.WrappedException: Wrapped org.wso2.carbon.hostobjects.sso.SignatureVerificationException (/publisher/jagg/jaggery_acs.jag#135)
          at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1754)
          at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
          at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
          at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
          at org.jaggeryjs.rhino.publisher.jagg.c1._c_anonymous_1(/publisher/jagg/jaggery_acs.jag:135)
          at org.jaggeryjs.rhino.publisher.jagg.c1.call(/publisher/jagg/jaggery_acs.jag)
          at org.mozilla.javascript.optimizer.OptRuntime.call0(OptRuntime.java:23)
          at org.jaggeryjs.rhino.publisher.jagg.c1._c_script_0(/publisher/jagg/jaggery_acs.jag:5)
          at org.jaggeryjs.rhino.publisher.jagg.c1.call(/publisher/jagg/jaggery_acs.jag)
          at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:394)
          at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3091)
          at org.jaggeryjs.rhino.publisher.jagg.c1.call(/publisher/jagg/jaggery_acs.jag)
          at org.jaggeryjs.rhino.publisher.jagg.c1.exec(/publisher/jagg/jaggery_acs.jag)
          at org.jaggeryjs.scriptengine.engine.RhinoEngine.execScript(RhinoEngine.java:567)
          ... 48 more
  Caused by: org.wso2.carbon.hostobjects.sso.SignatureVerificationException
          at org.wso2.carbon.hostobjects.sso.internal.util.Util.validateSignature(Util.java:345)
          at org.wso2.carbon.hostobjects.sso.SAMLSSORelyingPartyObject.jsFunction_validateSignature(SAMLSSORelyingPartyObject.java:155)
          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.lang.reflect.Method.invoke(Method.java:498)
          at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
          ... 60 more
  Caused by: java.lang.NullPointerException
          at org.wso2.carbon.hostobjects.sso.internal.util.X509CredentialImpl.(X509CredentialImpl.java:66)
          at org.wso2.carbon.hostobjects.sso.internal.util.Util.validateSignature(Util.java:312)
          ... 66 more</p>
  
  <p>I have imported the public certificate of Identity Server in API M key store.</p>
  
  <p>Not getting what to change.
  Please help.</p>