Thanks Hans.

Are you securing the messages both-way using x509 token?
I am struggling to come up with the policy which will just secure the
in-coming messages. Any help on this will be greatly appreciated.

Regards, Narayan

-----Original Message-----
From: Hans Guldager Knudsen [mailto:[EMAIL PROTECTED] 
Sent: 28 December 2007 09:41
To: rampart-dev@ws.apache.org
Subject: Re: Rampart and operation-level security configuration

Hi Narayan!

I have tried this using policy configuration of the service/operations 
(with Axis2/Rampart version 1.2).

The service definition looked something like this :

  <service name="Service">

    <operation name="Notification" 
mep="http://www.w3.org/2006/01/wsdl/in-out";>
      <messageReceiver class="NotificationReceiver" />
      <actionMapping>Request</actionMapping>
      <outputActionMapping>Response</outputActionMapping>

      <message label="In">
         <wsp:Policy wsu:Id="MessageLevel_In_Out_WSS_Policy"
            
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd"
            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; >

            <sp:SignedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
                <sp:Body/>
                <sp:Header 
Namespace="http://schemas.xmlsoap.org/ws/2005/02/rm"/>
                <sp:Header 
Namespace="http://www.w3.org/2005/08/addressing"/>
            </sp:SignedParts>

            <sp:EncryptedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
                <sp:Body/>
            </sp:EncryptedParts>
         </wsp:Policy>
      </message>

      <message label="Out">

... OUT Policy...

      </message>

    </operation>


:: common policy for all operations
  
    <wsp:Policy wsu:Id="CommonPolicyForService"
            
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd"
            xmlns:wsap="http://www.w3.org/2006/05/addressing/wsdl";
            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy"; >

    <wsp:ExactlyOne>
        <wsp:All>

            <sp:AsymmetricBinding 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
                <wsp:Policy>
                    <sp:InitiatorToken>
...

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

                <ramp:user>server</ramp:user>
                <ramp:encryptionUser>useReqSigCert</ramp:encryptionUser>

...
</service>


/hans




> Hi,
>
> In Rampart, could security be configured on operation level? 
> The idea is to have different assertions for different operations
inside
> a service.
>
> I had tried following in services.xml, which seems to ignore this
> configuration:-
>
> <operation name="initiatePayment"
> mep="http://www.w3.org/ns/wsdl/in-out";>
>       <actionMapping>\"\"</actionMapping>
> <outputActionMapping>urn:com.test.Response</outputActionMapping>
>       <parameter name="InflowSecurity">
>               <action>
>                       <items>Signature</items>        
>  
> <signaturePropFile>security.properties</signaturePropFile>
>                       <user>test</user>
> <passwordCallbackClass>PWCallback</passwordCallbackClass>
> <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
>               </action>
>       </parameter>
> </operation>
>
> Any help or pointers on this will be greatly appreciated.
>
> Thanks, Narayan
>
>
> *****************************************************
> This email is issued by a VocaLink group company. It is confidential
and intended for the exclusive use of the addressee only. You should not
disclose its contents to any other person. If you are not the addressee
(or responsible for delivery of the message to the addressee), please
notify the originator immediately by return message and destroy the
original message. The contents of this email will have no contractual
effect unless it is otherwise agreed between a specific VocaLink group
company and the recipient.
>  
> The VocaLink group companies include, among others: VocaLink Limited
(Company No 06119048, VAT No. 907 9619 87) which is registered in
England and Wales at registered office Drake House, Homestead Road,
Rickmansworth, WD3 1FX. United Kingdom, Voca Limited (Company no
1023742, VAT No. 907 9619 87) which is registered in England and Wales
at registered office Drake House, Three Rivers Court, Homestead Road,
Rickmansworth, Hertfordshire. WD3 1FX. United Kingdom, LINK Interchange
Network Limited (Company No 3565766, VAT No. 907 9619 87) which is
registered in England and Wales at registered office Arundel House, 1
Liverpool Gardens, Worthing, West Sussex, BN11 1SL and VocaLink Holdings
Limited (Company No 06119036, VAT No. 907 9619 87) which is registered
in England and Wales at registered office Drake House, Homestead Road,
Rickmansworth, WD3 1FX. United Kingdom.
>  
> The views and opinions expressed in this email may not reflect those
of any member of the VocaLink group. This message and any attachments
have been scanned for viruses prior to leaving the VocaLink group
network; however, VocaLink does not guarantee the security of this
message and will not be responsible for any damages arising as a result
of any virus being passed on or arising from any alteration of this
message by a third party. The VocaLink group may monitor emails sent to
and from the VocaLink group network.
>  
> This message has been checked for all email viruses by MessageLabs.
> *************************************************************


*****************************************************
This email is issued by a VocaLink group company. It is confidential and 
intended for the exclusive use of the addressee only. You should not disclose 
its contents to any other person. If you are not the addressee (or responsible 
for delivery of the message to the addressee), please notify the originator 
immediately by return message and destroy the original message. The contents of 
this email will have no contractual effect unless it is otherwise agreed 
between a specific VocaLink group company and the recipient.
 
The VocaLink group companies include, among others: VocaLink Limited (Company 
No 06119048, VAT No. 907 9619 87) which is registered in England and Wales at 
registered office Drake House, Homestead Road, Rickmansworth, WD3 1FX. United 
Kingdom, Voca Limited (Company no 1023742, VAT No. 907 9619 87) which is 
registered in England and Wales at registered office Drake House, Three Rivers 
Court, Homestead Road, Rickmansworth, Hertfordshire. WD3 1FX. United Kingdom, 
LINK Interchange Network Limited (Company No 3565766, VAT No. 907 9619 87) 
which is registered in England and Wales at registered office Arundel House, 1 
Liverpool Gardens, Worthing, West Sussex, BN11 1SL and VocaLink Holdings 
Limited (Company No 06119036, VAT No. 907 9619 87) which is registered in 
England and Wales at registered office Drake House, Homestead Road, 
Rickmansworth, WD3 1FX. United Kingdom.
 
The views and opinions expressed in this email may not reflect those of any 
member of the VocaLink group. This message and any attachments have been 
scanned for viruses prior to leaving the VocaLink group network; however, 
VocaLink does not guarantee the security of this message and will not be 
responsible for any damages arising as a result of any virus being passed on or 
arising from any alteration of this message by a third party. The VocaLink 
group may monitor emails sent to and from the VocaLink group network.
 
This message has been checked for all email viruses by MessageLabs.
*************************************************************

Reply via email to