An Introduction To Web Services Web Services Security
An Introduction To Web Services Web Services Security
Introduction........................................................................... 3
About this tutorial 3
Installing software 3
Review................................................................................... 8
In this tutorial we introduce and review security and Web services. We also
show how to set up access control on an existing Web service.
NOTE: If you haven't already downloaded the software used to create the
tutorial examples, then please refer to the installing software section
(below.) You will also need to download the tutorial sources. All Java
sources mentioned in the tutorial examples can be found in the src
subdirectory of the unpacked tutorial sources archive. They all reside in the
com.systinet.demos package.
Installing software
REQUIREMENTS: We assume that you have a Java 1.4 or later SDK and a
standard HTTP browser installed on your system and the JAVA_HOME
system variable points to the Java root directory.
If you want to follow along with the demo, you'll need to download WASP
Server for Java, 4.5
(http://www.systinet.com/products/wasp_jserve/overview ) from the
Systinet Web site. Unpack the downloaded package to a local disk and run
the install script from the bin subdirectory of the WASP Server installation.
You'll need to agree to the product license and then please answer with
default options to all installation questions (simply press Enter multiple
times).
Security in Action: Authentication and Authorization are the main elements of a security
Authentication and architecture. Let's go through a simple example that shows these concepts.
We'll add security to the stock quote Web service that we deployed in the
Authorization first article. The stock quote Web service contains the getAvailableStocks
and getQuote methods.
NOTE: If you haven't already downloaded the software used to create the
tutorial examples, then please refer to the installation instructions at the
beginning of this document. You'll also need to download the tutorial
sources. All Java sources mentioned in the tutorial examples can be found
in the src subdirectory of the unpacked tutorial sources archive. They all
reside in the com.systinet.demos.stock package.
The first thing that we need to do is to install WASP Server in secure mode.
To install the server:
4. Check the ‘with security support’ box beneath the server radio
button.
NOTE: When installing WASP in production mode, the password for the
admin user should be altered.
3. Select the Security tab and click the Add User button at the
bottom of the page.
7. Choose the Set ACL in the row with the asterisk, which
configures access control for all methods in the Web Service.
NOTE: The username, password, and security provider for the client
application are specified with the Java properties wasp.username,
wasp.password and wasp.securityMechanism with respective values
tutorial, changeit and HttpBasic.
Our last step is to undeploy the stock quote service using the run.bat
undeploy_stock script (you'll again need to specify the admin username
and changeit password).
NOTE: In the next tutorials we will not use security, so you'll need to set
WASP server to unsecure mode by running the install.bat script again. Stop
the WASP Server (using the serverstop.bat script located in the bin
subdirectory of the WASP Server installation) before running this script,
otherwise the changes made to the configuration files will be lost.
Microsoft, Windows and Windows NT and the Windows logo are trademarks
or registered trademarks of Microsoft Corporation in the United States and
other countries.
UNIX is a registered trademark of The Open Group in the United States and
other countries.
Systinet Corp.
Five Cambridge Center, 8th Floor
Cambridge, MA 02142
Phone: 1.617.868.2224
www.systinet.com