xwss
  1. xwss
  2. XWSS-17

XWSS 2.0 Decryption of Attachment Fails

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      Li, Summer wrote:

      >I'm using XWSS 2.0.

      I believe you have hit a bug. We will try to fix this soon. It will be very nice
      if you can give us a reproducible testcase...

      BTW where did you get the XWSS jars from ?. Did you download the latest ones
      from https://xwss.dev.java.net

      What is the JDK version that you are using ?. And finally where did you get all
      the other supporting jars such as SAAJ, JAXWS/JAXRPC etc.

      regards,
      kumar

      ----Original Message----

      From: K.Venugopal@Sun.COM K.Venugopal@Sun.COM

      Sent: Thursday, June 07, 2007 10:08 PM

      To: users@xwss.dev.java.net

      Subject: Re: decrypt attachment

      which version of xwss are you using

      venu

      Li, Summer wrote:

      >See the encrypted message carefully, and find that the CipherReference
      >
      >

      >URI=cid:ayloa, where in the attachment the cid is "payload". The cid
      >
      >is truncated. Is it a bug which causes the NullPointerException?
      >
      >
      >
      >If I missed something, could you help me to figure it out?
      >
      >
      >
      >Thank you,
      >
      >
      >
      >Summer Li
      >
      >
      >
      >
      >
      >

      ------------------------------------------------------------------------

      >From: Li, Summer
      >
      >Sent: Wednesday, June 06, 2007 6:46 PM
      >
      >To: 'users@xwss.dev.java.net'
      >
      >Subject: decrypt attachment
      >
      >
      >
      >I have a message with encrypted soap body and attachment. When I
      >
      >decrypt the attachment, a NullPointerException throws, see below.
      >
      >
      >
      >Jun 6, 2007 5:59:22 PM
      >
      >com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor
      >
      >

      processEncryptedKey

      >SEVERE: Error occurred while decrypting
      >
      >
      >
      >java.lang.NullPointerException
      >
      >
      >
      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.processEncryptedDa

      ta(DecryptionProcessor.java:453)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.decryptReferenceLi

      st(DecryptionProcessor.java:292)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.processEncryptedKe

      y(DecryptionProcessor.java:213)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.apachecrypto.DecryptionProcessor.decrypt(Decryption

      Processor.java:116)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.filter.EncryptionFilter.process(EncryptionFilter.ja

      va:210)

      >at
      >
      >

      com.sun.xml.wss.impl.HarnessUtil.processWSSPolicy(HarnessUtil.java:66)

      >at com.sun.xml.wss.impl.HarnessUtil.processDeep(HarnessUtil.java:218)
      >
      >
      >
      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.SecurityRecipient.processMessagePolicy(SecurityReci

      pient.java:785)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.SecurityRecipient.processMessagePolicy(SecurityReci

      pient.java:748)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.SecurityRecipient.validateMessage(SecurityRecipient

      .java:216)

      >at
      >
      >
      >
      >

      com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.verifyInboundMessage(XWSS

      Processor2_0Impl.java:113)

      >My Configuration file is
      >
      >
      >
      ><xwss:SecurityConfiguration dumpMessages="true"
      >
      >xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
      >
      >
      >
      ><!-- Encrypt soap body and the attachment-->
      >
      >
      >
      ><xwss:Encrypt>
      >
      >
      >
      ><xwss:X509Token certificateAlias='somecert'
      >
      >keyReferenceType='IssuerSerialNumber' valueType='#X509v3'/>
      >
      >
      >
      ><xwss:DataEncryptionMethod
      >
      >algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc"/>
      >
      >
      >
      ><xwss:Target type="xpath">//env:Body</xwss:Target>
      >
      >
      >
      ><xwss:Target type="uri">cid:*</xwss:Target>
      >
      >
      >
      ></xwss:Encrypt>
      >
      >
      >
      ><!-- Requirement for incoming message -->
      >
      >
      >
      ><!-- Require UserToken -->
      >
      >
      >
      ><xwss:RequireUsernameToken id="usertoken"
      >
      >passwordDigestRequired="true" nonceRequired="true"
      >
      >
      >
      >maxClockSkew="60" timestampFreshnessLimit="300" maxNonceAge="900"/>
      >
      >
      >
      ><!-Require to encrypt soap body and attachment(s)->
      >
      >
      >
      ><xwss:RequireEncryption/>
      >
      >
      >
      ><!-- Require to sign usertoken-->
      >
      >
      >
      ><xwss:RequireSignature>
      >
      >
      >
      ><xwss:SignatureTarget type="uri" value="usertoken"/>
      >
      >
      >
      ></xwss:RequireSignature>
      >
      >
      >
      ></xwss:SecurityConfiguration>
      >
      >
      >
      >If the message doesn't contain an encrypted attachment, then the
      >
      >message can be verified successfully. So is there something wrong with
      >
      >

      >the attachment part?
      >
      >
      >
      >I attached the secured incoming message.
      >
      >
      >
      >Appreciate any help!
      >
      >
      >
      >Summer Li

      1. plain_request.xml
        0.5 kB
        kumarjayanti
      2. wsi_client.xml
        1 kB
        kumarjayanti

        Activity

        Hide
        kumarjayanti added a comment -

        Created an attachment (id=10)
        config file

        Show
        kumarjayanti added a comment - Created an attachment (id=10) config file
        Hide
        kumarjayanti added a comment -

        marked as as91-na since it does not apply to WSIT

        Show
        kumarjayanti added a comment - marked as as91-na since it does not apply to WSIT
        Hide
        kumarjayanti added a comment -

        Created an attachment (id=11)
        request

        Show
        kumarjayanti added a comment - Created an attachment (id=11) request
        Hide
        shyam_rao added a comment -

        Reported config file was wrong. With the changed security config file, it worked
        for me.

        Show
        shyam_rao added a comment - Reported config file was wrong. With the changed security config file, it worked for me.
        Hide
        shyam_rao added a comment -

        I am able to reproduce the problem with provided test case by user. So,
        reopening the isssue

        Show
        shyam_rao added a comment - I am able to reproduce the problem with provided test case by user. So, reopening the isssue
        Hide
        shyam_rao added a comment -

        Fixed in XWSS20 & XWSS30( Trunk).

        Show
        shyam_rao added a comment - Fixed in XWSS20 & XWSS30( Trunk).

          People

          • Assignee:
            xwss-issues
            Reporter:
            kumarjayanti
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: