com.sun.xml.wss.XWSSecurityException: WSS1816: Error occurred while resolving KeyIdentifier


Solutions on the web

Solution icon of github
via GitHub by grubskim
, 8 months ago
WSS1816: Error occurred while resolving KeyIdentifier

Stack trace

com.sun.xml.wss.XWSSecurityException: WSS1816: Error occurred while resolving KeyIdentifier
	at com.sun.xml.ws.security.opt.impl.incoming.processor.SecurityTokenProcessor.processKeyIdentifier(SecurityTokenProcessor.java:446)
	at com.sun.xml.ws.security.opt.impl.incoming.processor.SecurityTokenProcessor.resolveReference(SecurityTokenProcessor.java:147)
	at com.sun.xml.ws.security.opt.impl.incoming.processor.KeyInfoProcessor.processKeyInfo(KeyInfoProcessor.java:152)
	at com.sun.xml.ws.security.opt.impl.incoming.processor.KeyInfoProcessor.getKey(KeyInfoProcessor.java:132)
	at com.sun.xml.ws.security.opt.impl.incoming.EncryptedKey.process(EncryptedKey.java:208)
	at com.sun.xml.ws.security.opt.impl.incoming.EncryptedKey.<init>(EncryptedKey.java:124)
	at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.handleSecurityHeader(SecurityRecipient.java:469)
	at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.cacheHeaders(SecurityRecipient.java:316)
	at com.sun.xml.ws.security.opt.impl.incoming.SecurityRecipient.validateMessage(SecurityRecipient.java:265)
	at com.sun.xml.wss.jaxws.impl.SecurityTubeBase.verifyInboundMessage(SecurityTubeBase.java:456)
	at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientResponsePacket(SecurityClientTube.java:436)
	at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processResponse(SecurityClientTube.java:364)
	at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1147)
	at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
	at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
	at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
	at com.sun.xml.ws.client.Stub.process(Stub.java:463)
	at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:265)
	at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:304)
	at com.sun.xml.ws.security.trust.impl.TrustPluginImpl.invokeRST(TrustPluginImpl.java:629)
	at com.sun.xml.ws.security.trust.impl.TrustPluginImpl.process(TrustPluginImpl.java:175)
	at com.sun.xml.ws.security.trust.impl.client.STSIssuedTokenProviderImpl.getIssuedTokenContext(STSIssuedTokenProviderImpl.java:144)
	at com.sun.xml.ws.security.trust.impl.client.STSIssuedTokenProviderImpl.issue(STSIssuedTokenProviderImpl.java:74)
	at com.sun.xml.ws.api.security.trust.client.IssuedTokenManager.getIssuedToken(IssuedTokenManager.java:83)
	at com.sun.xml.wss.jaxws.impl.SecurityClientTube.invokeTrustPlugin(SecurityClientTube.java:686)
	at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processClientRequestPacket(SecurityClientTube.java:283)
	at com.sun.xml.wss.jaxws.impl.SecurityClientTube.processRequest(SecurityClientTube.java:249)
	at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:1136)
	at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:1050)
	at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:1019)
	at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:877)
	at com.sun.xml.ws.client.Stub.process(Stub.java:463)
	at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:191)
	at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:108)
	at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:92)
	at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:161)
	at com.sun.proxy.$Proxy363.getSubscriptionKeysForSessionId(Unknown Source)
	at org.oscm.integrationhelper.BssClient.testWebServiceCall(BssClient.java:226)
	at org.apache.jsp.TestWebService_jsp._jspService(TestWebService_jsp.java:57)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.xml.crypto.KeySelectorException: com.sun.xml.wss.XWSSecurityException: No Matching private key for BWO4Yw1i11q7yKseS9+1qJmyTUM= thumb print identifier found
	at com.sun.xml.ws.security.opt.impl.incoming.KeySelectorImpl.resolveKeyIdentifier(KeySelectorImpl.java:906)
	at com.sun.xml.ws.security.opt.impl.incoming.processor.SecurityTokenProcessor.processKeyIdentifier(SecurityTokenProcessor.java:443)
	... 72 more
Caused by: com.sun.xml.wss.XWSSecurityException: No Matching private key for BWO4Yw1i11q7yKseS9+1qJmyTUM= thumb print identifier found
	at com.sun.xml.wss.impl.misc.DefaultSecurityEnvironmentImpl.getPrivateKey(DefaultSecurityEnvironmentImpl.java:560)
	at com.sun.xml.ws.security.opt.impl.incoming.KeySelectorImpl.resolveKeyIdentifier(KeySelectorImpl.java:785)
	... 73 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.