0 Replies Latest reply: Dec 12, 2010 8:45 AM by 823199 RSS

    WS-Security

    823199
      hi
      i developed a dummy web service deployed in web logic 11g
      i sent the following soap message

      <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
           <S:Header>
                <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" S:mustUnderstand="1">
                     <wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" wsu:Id="XWSSGID-12921619580511994111539">MIIBKDCB0wIEMTIzMzANBgkqhkiG9w0BAQQFADAeMRwwGgYDVQQDExNUZXN0IENBIENlcnRpZmlj
      YXRlMB4XDTEwMTIxMjEzNTIzOFoXDTEwMTIxMjEzNTIzOFowHjEcMBoGA1UEAxMTVGVzdCBDQSBD
      ZXJ0aWZpY2F0ZTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCLsFIHbAhLKGXWRO80usZrFsdfjxl/
      IR0PJsMWQ57VfQrKcxz6v+V1ykTyatHIpBlkvWbXbPwgz1B+Zsigbp/xAgMBAAEwDQYJKoZIhvcN
      AQEEBQADQQBe/1eIYQLZQo+xDRe7KBiK6SmxGCEZAF8aj+5B2iwKdx4IDdNFaa+gJXfrphDo4rBH
      Ch/2Y9PzQNOnhmz+SVYS</wsse:BinarySecurityToken>
                     <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                          <ds:SignedInfo>
                               <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                    <InclusiveNamespaces xmlns="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="wsse S"/>
                               </ds:CanonicalizationMethod>
                               <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
                               <ds:Reference URI="#XWSSGID-12921619585881613433171">
                                    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                                    <ds:DigestValue>Y0VONV+KfWbC2Sb+GmGCpuUZny4=</ds:DigestValue>
                               </ds:Reference>
                               <ds:Reference URI="#XWSSGID-1292161958712-1387110020">
                                    <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                                    <ds:DigestValue>3wr5Qp+BMCUX1GWXh0tjFAMvCdk=</ds:DigestValue>
                               </ds:Reference>
                          </ds:SignedInfo>
                          <ds:SignatureValue>BC4V7G1l+jUZbrKROYW5XjZlSvmtB3TUgD2QNHdfBZXFMbMxHpfgkH5lquQAJdI7VZC3krVA4K5I
      HaetGno+KQ==</ds:SignatureValue>
                          <ds:KeyInfo>
                               <wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1292161958575385136850">
                                    <wsse:Reference URI="#XWSSGID-12921619580511994111539" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
                               </wsse:SecurityTokenReference>
                          </ds:KeyInfo>
                     </ds:Signature>
                     <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1292161958712-1387110020">
                          <wsu:Created>2010-12-12T13:52:38Z</wsu:Created>
                          <wsu:Expires>2010-12-12T13:52:43Z</wsu:Expires>
                     </wsu:Timestamp>
                     <wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-1292161958046-974943969">
                          <wsse:Username>Ron</wsse:Username>
                          <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">noR</wsse:Password>
                     </wsse:UsernameToken>
                </wsse:Security>
           </S:Header>
           <S:Body xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="XWSSGID-12921619585881613433171">
                <ns2:sayHi xmlns:ns2="http://wssecpoc/"/>
           </S:Body>
      </S:Envelope>

      then weblogic send fault

      <S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
           <S:Header/>
           <S:Body>
                <SOAP-ENV:Fault xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
                     <faultcode>SOAP-ENV:MustUnderstand</faultcode>
                     <faultstring>MustUnderstand headers:[{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security] are not understood</faultstring>
                </SOAP-ENV:Fault>
           </S:Body>
      </S:Envelope>

      I want to know two things:
      1- How to by pass the Security header in weblogic
      2- if i want to implement WS-Security using signature and UsernameToken in weblogic to accept the below soap message


      thx