com.sun.identity.wss.security.handler
Class SOAPRequestHandler

java.lang.Object
  extended bycom.sun.identity.wss.security.handler.SOAPRequestHandler

public class SOAPRequestHandler
extends java.lang.Object

This class SOAPRequestHandler is to process and secure the in-bound or out-bound SOAPMessages of the web service clients and web service providers.

This class processes the SOAPMessages for the web services security according to the processing rules defined in OASIS web services security specification and as well as the Liberty Identity Web services security framework.


Constructor Summary
SOAPRequestHandler()
           
 
Method Summary
static MessageAuthenticator getAuthenticator()
          Returns the configured message authenticator.
 void init(java.util.Map config)
          Initializes the handler with the given configuration.
 javax.xml.soap.SOAPMessage secureRequest(javax.xml.soap.SOAPMessage soapMessage, javax.security.auth.Subject subject, java.util.Map sharedState)
          Secures the SOAPMessage request by adding necessary credential information.
 javax.xml.soap.SOAPMessage secureResponse(javax.xml.soap.SOAPMessage soapMessage, java.util.Map sharedState)
          Secures the SOAP Message response to the client.
 java.lang.Object validateRequest(javax.xml.soap.SOAPMessage soapRequest, javax.security.auth.Subject subject, java.util.Map sharedState, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Authenticates the SOAPMessage from a remote client.
 void validateResponse(javax.xml.soap.SOAPMessage soapMessage, java.util.Map sharedState)
          Validates the SOAP Response from the service provider.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SOAPRequestHandler

public SOAPRequestHandler()
Method Detail

init

public void init(java.util.Map config)
          throws com.sun.identity.wss.security.SecurityException
Initializes the handler with the given configuration.

Parameters:
config - the configuration map to initializate the provider.
Throws:
com.sun.identity.wss.security.SecurityException - if the initialization fails.

validateRequest

public java.lang.Object validateRequest(javax.xml.soap.SOAPMessage soapRequest,
                                        javax.security.auth.Subject subject,
                                        java.util.Map sharedState,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response)
                                 throws com.sun.identity.wss.security.SecurityException
Authenticates the SOAPMessage from a remote client.

Parameters:
soapRequest - SOAPMessage that needs to be validated.
subject - the subject that may be used by the callers to store Principals and credentials validated in the request.
sharedState - that may be used to store any shared state information between validateRequest and
request - the HttpServletRequest associated with this SOAP Message request.
response - the HttpServletResponse associated with this SOAP Message response.
Returns:
Object the authenticated token.
Throws:
com.sun.identity.wss.security.SecurityException - if any error occured during validation.

secureResponse

public javax.xml.soap.SOAPMessage secureResponse(javax.xml.soap.SOAPMessage soapMessage,
                                                 java.util.Map sharedState)
                                          throws com.sun.identity.wss.security.SecurityException
Secures the SOAP Message response to the client.

Parameters:
soapMessage - SOAP Message that needs to be secured.
sharedState - a map for the callers to store any state information between validateRequest and secureResponse.
Throws:
com.sun.identity.wss.security.SecurityException - if any error occurs during securing.

secureRequest

public javax.xml.soap.SOAPMessage secureRequest(javax.xml.soap.SOAPMessage soapMessage,
                                                javax.security.auth.Subject subject,
                                                java.util.Map sharedState)
                                         throws com.sun.identity.wss.security.SecurityException
Secures the SOAPMessage request by adding necessary credential information.

Parameters:
soapMessage - the SOAPMessage that needs to be secured.
subject - the Subject of the authenticating entity.
sharedState - Any shared state information that may be used between the secureRequest and validateResponse.
Throws:
com.sun.identity.wss.security.SecurityException - if any failure for securing the request.

validateResponse

public void validateResponse(javax.xml.soap.SOAPMessage soapMessage,
                             java.util.Map sharedState)
                      throws com.sun.identity.wss.security.SecurityException
Validates the SOAP Response from the service provider.

Parameters:
soapMessage - the SOAPMessage that needs to be validated.
sharedState - Any shared data that may be used between the secureRequest and validateResponse.
Throws:
com.sun.identity.wss.security.SecurityException - if any failure occured for validating the response.

getAuthenticator

public static MessageAuthenticator getAuthenticator()
                                             throws com.sun.identity.wss.security.SecurityException
Returns the configured message authenticator.

Throws:
com.sun.identity.wss.security.SecurityException


Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.