ibm-information-center/dist/eclipse/plugins/i5OS.ic.rzamy_5.4.0.1/50/webserv/wsseccfauthovr.htm

115 lines
8.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
<title>Web services authentication method overview</title>
</head>
<BODY>
<!-- Java sync-link -->
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
<h5><a name="wssecfauthovr"></a>Web services authentication method overview</h5>
<p>The Web Services Security implementation for WebSphere Application Server - Express supports the following authentication methods:</p>
<ul>
<li><p><strong>BasicAuth</strong>
<br>When WebSphere Application Server - Express is configured to use the BasicAuth authentication method, the sender attaches the LTPA token as a BinarySecurityToken from the current security context or from basic authentication data configuration in the binding file in the Simple Object Access Protocol (SOAP) message header. The Web services security message receiver authenticates the sender by validating the user name and password against the configured user registry.</p></li>
<li><p><strong>Identity assertion</strong>
<br>The identity assertion authentication method, different from other three authentication methods, establishes the security credential of the sender based on the trust relationship. You can use the identity assertion authentication method, for example, when an intermediary server must invoke a service from a downstream server on behalf of the client, but does not have the client authentication information. The intermediary server might establish a trust relationship with the downstream server
and then assert the client identity to the same downstream server.</p></li>
<li><p><strong>Digital signature</strong>
<br>With the digital signature authentication method, the sender attaches a BinarySecurityToken from a X509 certificate to the Web services security message header along with a digital signature of the message body, time stamp, security token, or any combination of the three. The receiver authenticates the sender by verifying the validity of the X.509 certificate and the digital signature using the public key from the verified certificate.</p></li>
<li><p><strong>Lightweight Third-Party Authentication (LTPA)</strong>
<br>With the LTPA method, the sender attaches the LTPA BinarySecurityToken it previously received in the SOAP message header. The receiver authenticates the sender by validating the LTPA token and the token expiration time.</p></li>
</ul>
<p>Web services security supports the following trust modes:</p>
<ul>
<li>BasicAuth</li>
<li>Digital signature</li>
<li>Presumed trust</li>
</ul>
<p>When you use the BasicAuth and Digital signature trust modes, the intermediary server passes its own authentication information to the down stream server for authentication. The Presumed trust mode establishes a trust relationship using some external mechanism.For example, the intermediary server may pass Simple Object Access Protocol (SOAP) messages through a secure socket layers (SSL) connection with the downstream server and transport layer client certificate authentication.</p>
<p>The Web services security implementation for WebSphere Application Server - Express validates the trust relationship by following this procedure:</p>
<ol>
<li>The downstream server first validates the authentication information of the intermediary server.</li>
<li>The downstream server verifies whether the authenticated intermediary server is authorized for identity assertion. For example, the intermediary server must be in the trust list for the downstream server.</li>
</ol>
<p>The client identity may be represented by a name string, a distinguished name (DN), or an X.509 certificate. The client identity is attached in the Web services security message in a UsernameToken with just a user name, DN, or in a BinarySecurityToken of a certificate.</p>
<p>The following table summarizes the type of security token that is required for each authentication method.</p>
<table border="1" cellpadding="3" cellspacing="0">
<tr>
<th>Authentication Method</th>
<th>Security Token</th>
</tr>
<tr valign="top">
<td>BasicAuth</td>
<td>BasicAuth requires &lt;wsse:UsernameToken&gt; with &lt;wsse:Username&gt; and &lt;wsse:Password&gt;.</td>
</tr>
<tr valign="top">
<td>Signature</td>
<td>Signature requires &lt;ds:Signature&gt; and &lt;wsse:BinarySecurityToken&gt;.</td>
</tr>
<tr valign="top">
<td>IDAssertion</td>
<td>IDAssertion requires &lt;wsse:UsernameToken&gt; with &lt;wsse:Username&gt; or &lt;wsse:BinarySecurityToken&gt; with a X.509 certificate for client identity depending on &lt;idType&gt;. Also, it requires the following other security tokens according to the &lt;trustMode&gt;:
<ul>
<li>If the &lt;trustMode&gt; is BasicAuth, IDAssertion requires &lt;wsse:UsernameToken&gt; with &lt;wsse:Username&gt; and &lt;wsse:Password&gt;.</li>
<li>If the &lt;trustMode&gt; is Signature, IDAssertion requires &lt;wsse:BinarySecurityToken&gt;.</li>
</ul></td>
</tr>
<tr valign="top">
<td>LTPA</td>
<td>LTPA requires &lt;wsse:BinarySecurityToken&gt; with an LTPA token.</td>
</tr>
</table>
<p>Multiple authentication methods can be supported by a Web service simultaneously. The receiver-side Web services deployment descriptor can specify all the authentication methods that are supported in the ibm-webservices-ext.xmi XML file. The receiver-side Web services, as shown in the following example, is configured to accept all the authentication methods described previously:</p>
<pre>&lt;loginConfig xmi:id=&quot;LoginConfig_1052760331326&quot;&gt;
&lt;authMethods xmi:id=&quot;AuthMethod_1052760331326&quot; text=&quot;BasicAuth&quot;/&gt;
&lt;authMethods xmi:id=&quot;AuthMethod_1052760331327&quot; text=&quot;IDAssertion&quot;/&gt;
&lt;authMethods xmi:id=&quot;AuthMethod_1052760331336&quot; text=&quot;Signature&quot;/&gt;
&lt;authMethods xmi:id=&quot;AuthMethod_1052760331337&quot; text=&quot;LTPA&quot;/&gt;
&lt;/loginConfig&gt;
&lt;idAssertion xmi:id=&quot;IDAssertion_1052760331336&quot; idType=&quot;Username&quot; trustMode=&quot;Signature&quot;/&gt;</pre>
<p>You can define only one authentication method in the sender-side Web services deployment descriptor. A Web service client can use any one of the authentication methods that are supported by the particular Web services application. The following example illustrates an identity assertion authentication method configuration in the Web service client deployment descriptor extension, ibm-webservicesclient-ext.xmi:</p>
<pre>&lt;loginConfig xmi:id=&quot;LoginConfig_1051555852697&quot;&gt;
&lt;authMethods xmi:id=&quot;AuthMethod_1051555852698&quot; text=&quot;IDAssertion&quot;/&gt;
&lt;/loginConfig&gt;
&lt;idAssertion xmi:id=&quot;IDAssertion_1051555852697&quot; idType=&quot;Username&quot; trustMode=&quot;Signature&quot;/&gt;</pre>
<p>As shown in the previous example, the client identity type is <tt>Username</tt> and the trust mode is digital signature (<tt>Signature</tt>).</p>
<p><strong>Figure 1: Security token generation and validation</strong></p>
<p><img src="rzamy520.gif" width="583" height="373" alt="Security token generation and validation"></p>
<p>The sender security handler invokes the handle() method of an implementation of the javax.security.auth.callback.CallbackHandler interface. The javax.security.auth.callback.CallbackHandler interface creates the security token and passes it back to the sender security handler. The sender security handler constructs the security token based on the authentication information in the callback array and inserts the security token into the Web services security message header.</p>
<p>The receiver security handler compares the token type in the message header with the expected token types configured in the deployment descriptor. If none of the expected token type are found in the Web services security header of the SOAP message, the request is rejected with an SOAP fault exception. Otherwise, the token type is used to map to a Java Authentication and Authorization Service (JAAS) login configuration for validating the token. If the authentication is successful, then a JAAS Subject is created and associated with the thread of execution. Otherwise, the request is rejected with an SOAP fault exception.</p>
</body>
</html>