It is similar but what it´s wrong with the implementation in my previous
message??

I see that the soap message with security header arrive to the AS but with a
leak of information. 

This is my scenario:
1. The backend in AS need to be secure with secureconversation.
2. The proxy service in ESB need to expose the WSDL with
SecConSgnEncrUsername policy referenced in the binding part.
3. The proxy service in ESB  just forward the soap message to the backend
service in AS, doesn't process it.

For the second requirement I put security in the proxy service, and use
preserveProcessedHeaders = true. Since useOriginalwsdl don´t work.
This is the only way I find to expose the binding with <wsp:PolicyReference
URI="#SecConSgnEncrUsername"/>

In this case the message was forwarded to the AS with error:
org.apache.axis2.AxisFault: An error was discovered processing the
<wsse:Security> header (WSSecurityEngine: DataReference - referenced data
not found)

What it´s wrong in this configuration?

Saludos,
Ing. Jorge Infante Osorio.
J´Dpto Soluciones SOA.
CDAE.
Fac. 5.
UCI.

De: carbon-dev-boun...@wso2.org [mailto:carbon-dev-boun...@wso2.org] En
nombre de Hiranya Jayathilaka
Enviado el: sábado, 16 de julio de 2011 2:27
Para: carbon-dev@wso2.org
Asunto: Re: [Carbon-dev] Issue with useOriginalwsdl in ESB 4.0

I think your scenario is similar to the one described at [1].

Thanks,
Hiranya

[1]
- http://wso2.org/project/esb/java/4.0.0/docs/samples/proxy_samples.html#Sam
ple153
On Sat, Jul 16, 2011 at 2:56 AM, Jorge Infante Osorio <jorg...@uci.cu>
wrote:
To try this property I put secureconversation level security  to the proxy
service and them I include in the inSecuence this property.
This is the error in AS 4.1.0 now:

org.apache.axis2.AxisFault: An error was discovered processing the
<wsse:Security> header (WSSecurityEngine: DataReference - referenced data
not found)
       at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:446
)
       at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
isOperation.java:371)
       at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
n.java:417)
       at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
peration.java:229)
       at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
       at
org.wso2.www.types.ProxyHelloService15Stub.greet(ProxyHelloService15Stub.jav
a:192)
       at org.wso2.www.types.Cliente.Operaciones(Cliente.java:67)
       at org.wso2.www.types.Cliente.main(Cliente.java:43)
Exception in thread "main" java.lang.NullPointerException
       at org.wso2.www.types.Cliente.Operaciones(Cliente.java:74)
       at org.wso2.www.types.Cliente.main(Cliente.java:43)

The message that came from ESB:

  <soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope";>
     <soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing";>
        <wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd" soapenv:mustUnderstand="true">
           <wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="Timestamp-31056514">
              <wsu:Created>2011-07-15T20:52:22.257Z</wsu:Created>
              <wsu:Expires>2011-07-15T20:57:22.257Z</wsu:Expires>
           </wsu:Timestamp>
           <wsc:SecurityContextToken
xmlns:wsc="http://schemas.xmlsoap.org/ws/2005/02/sc";
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="sctId-419C6D634A689F2AF213107631452262">

<wsc:Identifier>419C6D634A689F2AF213107631452261</wsc:Identifier>
           </wsc:SecurityContextToken>
           <xenc:ReferenceList
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>
              <xenc:DataReference URI="#EncDataId-30964613" />
              <xenc:DataReference URI="#EncDataId-22791880" />
           </xenc:ReferenceList>
           <wsse:UsernameToken
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="UsernameToken-26577913">
              <wsse:Username>jorgeio</wsse:Username>
              <wsse:Password
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token
-profile-1.0#PasswordText">####</wsse:Password>
           </wsse:UsernameToken>
           <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#";
Id="Signature-14898956">
              <ds:SignedInfo>
                 <ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
                 <ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"; />
                 <ds:Reference URI="#Id-30964613">
                    <ds:Transforms>
                       <ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
                    </ds:Transforms>
                    <ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />

<ds:DigestValue>H7kagAFVWS6crqSQmgRSWxosi+g=</ds:DigestValue>
                 </ds:Reference>
                 <ds:Reference URI="#Timestamp-31056514">
                    <ds:Transforms>
                       <ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
                    </ds:Transforms>
                    <ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />

<ds:DigestValue>Xi7vKZYVS0VZ7f5X12KbgW7AHfA=</ds:DigestValue>
                 </ds:Reference>
                 <ds:Reference URI="#UsernameToken-26577913">
                    <ds:Transforms>
                       <ds:Transform
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
                    </ds:Transforms>
                    <ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />

<ds:DigestValue>kbh+CSrww7/wlRAT+fd7tmVp5sU=</ds:DigestValue>
                 </ds:Reference>
              </ds:SignedInfo>

<ds:SignatureValue>lTisJR+Vvega55eSw0bacHywB2o=</ds:SignatureValue>
              <ds:KeyInfo Id="KeyId-23585701">
                 <wsse:SecurityTokenReference
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="STRId-26373776">
                    <wsse:Reference
URI="#sctId-419C6D634A689F2AF213107631452262"
ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#S
AMLAssertionID" />
                 </wsse:SecurityTokenReference>
              </ds:KeyInfo>
           </ds:Signature>
        </wsse:Security>
     </soapenv:Header>
     <soapenv:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="Id-30964613">
        <ns1:greet xmlns:ns1="http://www.wso2.org/types";>
           <name>jorge</name>
        </ns1:greet>
     </soapenv:Body>
  </soapenv:Envelope>

As I see the problem is in this lines:
           <xenc:ReferenceList
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>
              <xenc:DataReference URI="#EncDataId-30964613" />
              <xenc:DataReference URI="#EncDataId-22791880" />
           </xenc:ReferenceList>

This encryption data appear in the ESB message but not in this message.


Saludos,
Ing. Jorge Infante Osorio.
J´Dpto Soluciones SOA.
CDAE.
Fac. 5.
UCI.


_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to