Credential based access control (authentication) is the most common security requirement encountered during the deployment of a services based infrastructure. Features inherent in the SecureSpan SOA Gateway make it an ideal location for deploying a common service for authentication that can be leveraged by other applications that require authentication services. In this tutorial we will create a SOAP based authentication service on the Gateway.
The simplest form of an authentication service requires the username and password to be embedded in the body of the request message and will return a true or false response message. We will define these requirements using the Create WSDL wizard in the SecureSpan Manager to generate the WSDL.





By default the newly created service will be disabled and listening at the /ssg/soap path. These need to be modified through the Service Properties interface.


The policy for the authentication service will enforce basic security requirements to ensure that only allowed users are securely submitting the credentials for authentication, validate the credentials against a preconfigured LDAP Identity Provider then return a template response for success or failure.

When defining the policy:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns1:AuthenticationResponse xmlns:ns1="http://www.layer7tech.com/Tutorials/AuthenticationService">
<result>OK</result>
</ns1:AuthenticationResponse>
</soapenv:Body>
</soapenv:Envelope>
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header/>
<soapenv:Body>
<ns1:AuthenticationResponse xmlns:ns1="http://www.layer7tech.com/Tutorials/AuthenticationService">
<result>FAIL</result>
</ns1:AuthenticationResponse>
</soapenv:Body>
</soapenv:Envelope>
The simplest way to test the Authentication Service is to send a unit test from a tool like soapUI.


In this tutorial we demonstrated how an authentication service can be easily and rapidly deployed at the SecureSpan Gateway. The techniques used in this demonstration can be extended to create many end point type services (E.g. Schema validation service, XML transformation service, Auditing service, etc) using the SecureSpan Gateway.