The WS-Security Wrapper is an adapter program that converts plain XML exchanges to and from SOAP with WS-Security. It's designed to be used by applications which need access to secure Web services but do not have full SOAP implementations available. The Wrapper serves as an intermediary for the application, adding SOAP and WS-Security to their input messages for submission to the service, then verifying the WS-Security on the response and sending the actual response message data back to the application. The Wrapper itself is written in Java, and has been tested on both 1.4.2 and 1.5 versions of the Java runtime on Windows, Linux, and Macintosh systems.

The Wrapper was implemented by Sosnoski Software Associates Ltd under contract from the SMS Project of the New Zealand Ministry of Education. The original use of the Wrapper was to support secure communications from Student Management Systems (some of which are based on older software platforms which do not provide WS-Security implementations) with Ministry services. The Ministry has supported the release of the Wrapper software as an open source project in order to both share the work that has been done and encourage the Wrapper's wider use and further enhancement.

Specific features

The current implementation is designed specifically for communications with Web services running on the Microsoft .Net platform version 1.1, with Web Services Extensions 2.0, using X.509 digital certificates for PKI signing and encryption. These choices are based on the platform and options currently in use by the Ministry for their Web services. This does mean that some of the implementation uses outdated techniques - in particular, the version of WS-Addressing used is different from the approved standard, since Microsoft used a presubmission version for WSE 3.0. Changing the Wrapper code to support different versions of the technologies should be easy, in the case of WS-Addressing just amounting to a change of the WS-Addressing namespace URI.

Messages inbound to the server are always signed with the Wrapper installation's private key and encrypted with the server's public certificate, and the Wrapper's public certificate is embedded within the message; messages outbound from the server are signed with the server's private key and encrypted with the Wrapper's public certificate. Both message directions also include WS-Security Timestamp components. These details are again specific to the requirements of the Ministry project, but the code should be easy to modify to support other requirements.

License and support

The code is provided under an MIT license:

Copyright (c) 2007, New Zealand Ministry of Education.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

 * Redistributions of source code must retain the above copyright notice, this
   list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright notice,
   this list of conditions and the following disclaimer in the documentation
   and/or other materials provided with the distribution.
 * Neither the name of WSWrapper nor the names of its contributors may be used
   to endorse or promote products derived from this software without specific
   prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Commercial support, including customization and packaging of the WS-Security Wrapper for easy installation, is available from Sosnoski Software Associates Ltd. Email the company if you'd like to discuss your needs.