Step by step and how to WS-Security supports and password–based authentication
1 Set up your environment.
If you have not already set up the environment required to run the examples in this book, please refer to chapter 2 to do so. ant deploy should install all the examples.
2 Customize your JAAS configuration file.
Go to the conf folder in the samples you downloaded previously when setting up the environment described in chapter 2. You will find two files: example3-passwd.txt and example3-jaas.conf. Open the latter and look for the following lines.
com.manning.samples.soasecimpl.jaas.
FileBasedAuthenticator
requisite
filePath="d:/work/eclipse/soas_code/conf/
example3-passwd.txt";
Change the filePath attribute in this entry to point the path to
example3-passwd.txt on your box.
3 Configure Tomcat’s JVM to pick up your JAAS configuration file.
To make the location of the conf file available to Tomcat JVM, set the JAVA_OPTS environment variable to -Djava.security.auth. login.config=path-to-example3-jaas.conf-file.
4 Restart Tomcat server.
Run shutdown and startup scripts (.bat files if you are using Windows and .sh files if you are on Linux/Solaris/OS X) found in the bin directory of Tomcat.
5 If it is not already running, start TCP monitor.
Run ant tcpmon so that you can observe the conversation. Check the “XML Format” check box to allow tcpmon to format shown requests and responses.
6 Run the example. Run ant demo –Dexample.id=3.
You should be able to view the request-response pairs going through the tcpmon console.
SOA Security Ramarao Kanneganti 2007








