Petals-BC-SOAP 5.0.0+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (12)

View Page History
The Service Unit has to contain the following elements, packaged in an archive:
* The META-INF/jbi.xml descriptor file as described above,
* the WS-Policy file descrivbed as above,
* and the pcwbhandler.jar containing org.ow2.petals.test.PWCBHandler (quoted in the WS-Policy file - necessary to check the user and the password of the token)

<soap:enable-http-transport>true</soap:enable-http-transport>
<soap:modules>rampart</soap:modules>
<soap:service-parameters> <soap:wss-policy>wss-policy.xml</soap:wss-policy>
<![CDATA[
<parameter name="InflowSecurity">
<action>
<items>Timestamp Encrypt Signature</items>
<passwordCallbackClass>org.ow2.petals.test.PWCBHandler</passwordCallbackClass>
<signaturePropFile>service.properties</signaturePropFile>
</action>
</parameter>
<parameter name="OutflowSecurity">
<action>
<items>Timestamp Encrypt Signature</items>
<user>servercert</user>
<passwordCallbackClass>org.ow2.petals.test.PWCBHandler</passwordCallbackClass>
<signaturePropFile>service.properties</signaturePropFile>
<signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
<encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
<encryptionUser>servercert</encryptionUser>
</action>
</parameter>
]]>
</soap:service-parameters>
</jbi:consumes>
</jbi:services>
The Service Unit has to contain the following elements, packaged in an archive:
* The META-INF/jbi.xml descriptor file as described above
* the WS-Policy file described as above,
* the serverKeystore.jks keystore file (quoted in the WS-Policy) containing keys for encryption and signature
* a JAR file containing org.ow2.petals.test.PWCBHandler (quoted in the WS-Policy - necessary to get the private key pair from the keystore to encrypt/decrypt the incoming and outgoing messages and to get the public/private key pair to sign the messages)

h1. Provide a Web Service access in the ESB with WS-Security (Timestamp, Signature and Encryption) (UsernameToken)

h2. Configuration
{code:lang=xml}
<?xml version="1.0" encoding="UTF-8"?>
<!--
JBI descriptor for the Petals' "petals-bc-soap" component (SOAP).
Originally created for the version 4.1 of the component.
-->
<jbi:jbi version="1.0"
xmlns:generatedNs="http://petals.ow2.org/test/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<!-- Import a Service into Petals or Expose a Petals Service => use a BC. -->
<jbi:services binding-component="true">

<!-- Import a Service into Petals => provides a Service. -->
<jbi:provides
interface-name="generatedNs:TestServiceAxisWSS"
<soap:mode>SOAP</soap:mode>
<soap:modules>rampart</soap:modules>
<soap:service-parameters> <soap:wss-policy>wss-policy.xml</soap:wss-policy>
<![CDATA[
<parameter name="InflowSecurity">
<action>
<items>Timestamp Encrypt Signature</items>
<passwordCallbackClass>org.ow2.petals.test.PWCBHandler</passwordCallbackClass>
<signaturePropFile>service.properties</signaturePropFile>
</action>
</parameter>
<parameter name="OutflowSecurity">
<action>
<items>Timestamp Encrypt Signature</items>
<user>servercert</user>
<passwordCallbackClass>org.ow2.petals.test.PWCBHandler</passwordCallbackClass>
<signaturePropFile>service.properties</signaturePropFile>
<signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
<encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
<encryptionUser>servercert</encryptionUser>
</action>
</parameter>
]]>
</soap:service-parameters>

</jbi:provides>
</jbi:services>
{code}

with the WS-Policy defined as following into the file {{wss-policy.xml}}, completed with the Rampart configuration:
{code:lang=xml}
<wsp:Policy wsu:Id="UTOverTransport"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:SignedSupportingTokens
xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
<wsp:Policy>
<sp:UsernameToken
sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:HashPassword />
</wsp:Policy>
</sp:UsernameToken>
</wsp:Policy>
</sp:SignedSupportingTokens>

<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
<ramp:user>user</ramp:user>
<ramp:passwordCallbackClass>org.ow2.petals.binding.soap.test.UTConsumeCBHandler</ramp:passwordCallbackClass>
</ramp:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
{code}

h3. Service Unit content

The Service Unit has to contain the following elements, packaged in an archive:
* The META-INF/jbi.xml descriptor file as described above
* the WS-Policy file described as above,
* a JAR file containing org.ow2.petals.binding.soap.test.UTConsumeCBHandler (quoted in the WS-Policy - necessary to get the password associated to the user 'user' quoted in the WS-Policy as a Rampart comnfiguration parameter '{{ramp:user}}')



The Service Unit has to contain the following elements, packaged in an archive:
* The META-INF/jbi.xml descriptor file as described above
* the service.properties properties file (quoted in the jbi.xml)
{code}