axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Salvador" <dsalva...@fcirce.es>
Subject Problem with Rampart dec/encryption
Date Thu, 28 Jan 2016 12:34:47 GMT
Good afternoon,

 

I'm trying to communicate my Android application with a server via SOAP
WebServices. On the server side I have implemented a Rampart module with the
corresponding security policy. First of all, I just want to send an
encrypted body, decrypt it on the server side and send the reply (also
encrypted), but I receive an error message and I don't know where exactly
the error comes from. I attach the SOAP message that I'm sending, the policy
and the Rampart configuration:

 

DEBUG] Enter process(MessageContext msgCtx)

[DEBUG] Loading Signature crypto

[DEBUG] loading class : web.service.servidor.SOAP.PWCBHandler

[DEBUG] Processing security header in normal path

[DEBUG] Loading encryption crypto

[DEBUG] Trying the signature crypto info

[DEBUG] Loading Signature crypto

[ERROR] Expected encrypted part missing

 

Rampart configuration:

 

<ramp:RampartConfig xmlns:ramp=" <http://ws.apache.org/rampart/policy>
http://ws.apache.org/rampart/policy">

<ramp:user>server</ramp:user>

<ramp:passwordCallbackClass>web.service.servidor.SOAP.PWCBHandler</ramp:pass
wordCallbackClass>

 

<ramp:decryptionCrypto>

    <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">

      <ramp:property

        name="org.apache.ws.security.crypto.merlin.keystore.type">

        JKS

      </ramp:property>

      <ramp:property

        name="org.apache.ws.security.crypto.merlin.file">

        server.jks

      </ramp:property>

      <ramp:property
name="org.apache.ws.security.crypto.merlin.keystore.password">

        *****

      </ramp:property>

    </ramp:crypto>

</ramp:decryptionCrypto>

 

<ramp:encryptionCypto>

    <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">

      <ramp:property

        name="org.apache.ws.security.crypto.merlin.keystore.type">

        JKS

      </ramp:property>

      <ramp:property

        name="org.apache.ws.security.crypto.merlin.file">

        server.jks

      </ramp:property>

      <ramp:property
name="org.apache.ws.security.crypto.merlin.keystore.password">

        *****

      </ramp:property>

    </ramp:crypto>

</ramp:encryptionCypto>

</ramp:RampartConfig>

 

Policy:

 

<sp:AsymmetricBinding

...

<\sp:AsymmetricBinding>

 

<sp:EncryptedParts
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">

<sp:Body/>

</sp:EncryptedParts>

 

SOAP message:

 

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
xmlns:xenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd">

<soap:Header>

<n0:Security soap:mustUnderstand="1"
xmlns:n0="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity
-secext-1.0.xsd">

<xenc:ReferenceList>

     <xenc:DataReference URI="#encBody" />

</xenc:ReferenceList>

<wsu:TimeStamp wsu:Id="T0">

    <wsu:Created>2016-01-27T11:44:58Z</wsu:Created>

</wsu:TimeStamp>

</n0:Security>

 

</soap:Header>

<soap:Body wsu:Id="body">

<xenc:EncryptedData Id="encBody">

     <xenc:CipherData n1:type="xenc:CipherData"
xmlns:n1="http://www.w3.org/2001/XMLSchema-instance">

          <xenc:CipherValue n1:type="n2:string"
xmlns:n2="http://www.w3.org/2001/XMLSchema">MxN9aEyWXBrKSnDxfI9V9G5Ltbn22Ess
KIUbQHm/Pe6h3+mN9POiZhBGFUtY

MjUxz+9hOd3ehNCEc9XI07yYiHpH1uQ8t7pTcVjmHvTyYxNyr6v99unwrW+7

fnA2991kWf79q97VySlj8oigFxMFJ4+0gXl5/xbYpLNPtvwDLzA=

          </xenc:CipherValue>

    </xenc:CipherData>

</xenc:EncryptedData>

</soap:Body>

</soap:Envelope>

 

Thank you very much.

 

Best regards,                                                               

 

Daniel

 


Mime
View raw message