Return-Path: X-Original-To: apmail-ws-dev-archive@www.apache.org Delivered-To: apmail-ws-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0D86D18489 for ; Tue, 28 Apr 2015 09:30:11 +0000 (UTC) Received: (qmail 23659 invoked by uid 500); 28 Apr 2015 09:30:08 -0000 Delivered-To: apmail-ws-dev-archive@ws.apache.org Received: (qmail 22571 invoked by uid 500); 28 Apr 2015 09:30:08 -0000 Mailing-List: contact dev-help@ws.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ws.apache.org Delivered-To: mailing list dev@ws.apache.org Received: (qmail 20872 invoked by uid 99); 28 Apr 2015 09:30:07 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Apr 2015 09:30:07 +0000 Date: Tue, 28 Apr 2015 09:30:07 +0000 (UTC) From: "Colm O hEigeartaigh (JIRA)" To: dev@ws.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Closed] (WSS-527) When using WSS4JStaxInInterceptor giving NullPointer Exception in X509IssuerSerialTokenImpl.java:60 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WSS-527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Colm O hEigeartaigh closed WSS-527. ----------------------------------- > When using WSS4JStaxInInterceptor giving NullPointer Exception in X509IssuerSerialTokenImpl.java:60 > --------------------------------------------------------------------------------------------------- > > Key: WSS-527 > URL: https://issues.apache.org/jira/browse/WSS-527 > Project: WSS4J > Issue Type: Bug > Components: WSS4J Core > Affects Versions: 2.0.0, 2.0.3 > Environment: Windows 7 > Reporter: Sudarshan Menon > Assignee: Colm O hEigeartaigh > Fix For: 2.0.4 > > > I Upgraded WSS4J 1.6.1 to WSS4J 2.0.0. The main motive was to encrypt passwords in crypto properties file. > Let me paste the configuration. It is as below. > > > > > key="#{T(org.apache.wss4j.dom.handler.WSHandlerConstants).ACTION}" > value="SAMLTokenSigned" /> > > > > > > > > > > > > > > > > > > Let me put the Soap Header request.It is as below > > > > > > > > > Some Issuer > Some Serial Number > > > > > > UtcgDv+Fbo3lPnuuHMYl7jD90WOdMcfnIEAic3BnVJM/dhqbmt/LsNoS3dRMQPJZwoseuXXPX/vJgPK+oMDhDGKjPXAynwU9XFoYWAVPeHj0rq5x9zwDd3rrmm4E4cD12AIeXTg/42J6HDx+NhCtSYcDeUUJqscb0EQDJXoZ99P3uo7UhTUyIFgiy6wYyBVtmfmXPIYjxqOg+cSEN1erVFiPlSl6uZlw7ZQOuXj38QVWGJIYKjWDOsN5zIU3qXFxaQUgViTmxOoIMjLp1HQAP9Ttcl0WTIjdbomM9dNvuPNNa/9Y/44sbEqGzwYy0XrmbCMgWBtia0mgJzxU4Lfj7A== > > > > > > > Some User Name > > > > > > > > > o3h3NrJHxVVMl6qNjZ4thRaaNMkXMmSkfgXidp9lgkQO62EsmTEuve6J1jYGCWsRGwC9ro7YTP9Ms21veox8JD9yeDQJjQIHeatDVb9NKp1AKZZDn5Kt3KAfEZfwp1EScJaTh3KrpD/AihBj8IYPyvCtRViuAsWGxbj9aSxTsW+ht35rlSK0fU0P7gRg17IsoeURhbafNOouX18wOzyZruizo55GUYvXBWmqqa5/5k2oV8elaqQRnhSz2EkQ7D5dmGUOGEG1OoMbfbZADha3mbRYTnDzP3cKf4sn4Fvx2JF+OEXhp3ZbUfqXtx2WWxlAreguqmVu04wMlQhYkUTKSJ3qRG7LMhlHHQTM8VhLHRafmKua8WALbCJfjG5mcXNF28HA6eeNJjWlA2wsozmFLS3yncEX7fKDeURHX5eHjL8yE+QtmMvH32EbN7nwsIvVz1qCvm1jsuqo81crpxOAm2N4uDGldJCjH7POaMQG90jK1y8f1LFyH+SPh6zwcQhDbZ2LP8Pt6/UGiiikm1Uiq5ZDwfChUz9+ULd2iwbNo/7jHWNhEllhF2n1McTDNPrHl7UTIQBSubY/F2qjjk3Vww== > > > > > 2013-10-30T09:32:24.283Z > 2015-12-30T09:37:24.283Z > > > > So the issue is the same Header works like charm when I use WSS4JInInterceptor. But when i try to use WSS4JStaxInInterceptor. I get NullPointer Exception. The exception occurs during the org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor phase. The exception occurs at the below line of > if (xmlReader.getEventType() == XMLStreamConstants.START_ELEMENT > || xmlReader.nextTag() == XMLStreamConstants.START_ELEMENT) > StackTrace as below. > java.lang.NullPointerException > at org.apache.wss4j.stax.impl.securityToken.X509IssuerSerialTokenImpl.getAlias(X509IssuerSerialTokenImpl.java:60) > at org.apache.wss4j.stax.impl.securityToken.X509SecurityTokenImpl.getKey(X509SecurityTokenImpl.java:80) > at org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken.getSecretKey(AbstractInboundSecurityToken.java:125) > at org.apache.xml.security.stax.impl.processor.input.XMLEncryptedKeyInputHandler$1$1.getSecret(XMLEncryptedKeyInputHandler.java:216) > at org.apache.xml.security.stax.impl.processor.input.XMLEncryptedKeyInputHandler$1$1.getKey(XMLEncryptedKeyInputHandler.java:116) > at org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken.getSecretKey(AbstractInboundSecurityToken.java:125) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at org.apache.wss4j.stax.impl.securityToken.SecurityTokenFactoryImpl$1.invoke(SecurityTokenFactoryImpl.java:436) > at $Proxy235.getSecretKey(Unknown Source) > at org.apache.xml.security.stax.impl.processor.input.AbstractDecryptInputProcessor.processEvent(AbstractDecryptInputProcessor.java:221) > at org.apache.xml.security.stax.impl.processor.input.AbstractDecryptInputProcessor.processNextHeaderEvent(AbstractDecryptInputProcessor.java:138) > at org.apache.xml.security.stax.impl.InputProcessorChainImpl.processHeaderEvent(InputProcessorChainImpl.java:188) > at org.apache.wss4j.stax.impl.processor.input.OperationInputProcessor.processNextHeaderEvent(OperationInputProcessor.java:51) > at org.apache.xml.security.stax.impl.InputProcessorChainImpl.processHeaderEvent(InputProcessorChainImpl.java:188) > at org.apache.wss4j.stax.impl.processor.input.SecurityHeaderInputProcessor$InternalSecurityHeaderBufferProcessor.processNextHeaderEvent(SecurityHeaderInputProcessor.java:244) > at org.apache.xml.security.stax.impl.InputProcessorChainImpl.processHeaderEvent(InputProcessorChainImpl.java:188) > at org.apache.wss4j.stax.impl.processor.input.SecurityHeaderInputProcessor.processNextEvent(SecurityHeaderInputProcessor.java:86) > at org.apache.xml.security.stax.impl.InputProcessorChainImpl.processEvent(InputProcessorChainImpl.java:193) > at org.apache.xml.security.stax.impl.XMLSecurityStreamReader.next(XMLSecurityStreamReader.java:78) > at org.apache.wss4j.stax.impl.WSSecurityStreamReader.next(WSSecurityStreamReader.java:45) > at org.apache.xml.security.stax.impl.XMLSecurityStreamReader.getEventType(XMLSecurityStreamReader.java:395) > at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:138) > at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:60) > at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org For additional commands, e-mail: dev-help@ws.apache.org