Hi, This is some sample code used to enable UsernameToken authentication to a proxy service.
Following is the configuration. Specifically <enableSec /> and <policy /> given a with a policy file. See Step 3. Constructing the Security Policy in the http://wso2.org/library/3190 <header /> removes the security headers from the ongoing message so that they are not visible to external endpoints. In the policy file, we give the callback class which does the username, password authentication. See Step 2. Writing the Password Callback in the http://wso2.org/library/3190 <definitions xmlns="http://ws.apache.org/ns/synapse"> <localEntry key="server_policy" src="file:repository/conf/sample/resources/policy/server_policy.xml"/> <proxy name="StockQuoteProxy"> <target> <endpoint> <address uri="http://localhost:9000/soap/SimpleStockQuoteService"/> </endpoint> <inSequence> <header name="wsse:Security" action="remove" xmlns:wsse=" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/> <class name="any.sample.Mediator" /> </inSequence> <outSequence> <send/> </outSequence> </target> <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> <policy key="server_policy"/> <enableSec/> </proxy> </definitions> This is one way to secure services. Upul On Wed, Mar 26, 2008 at 6:54 AM, Garth Patil <[EMAIL PROTECTED]> wrote: > Hi, > I'm new to Synapse, and I'm looking for examples of using Synapse to > secure services with authentication and authorization. I looked > through the samples and mailing list archives and couldn't find > examples of those mediation types. Could anyone point me to some > samples? > Thank you! > Garth >
