uk.ac.soton.itinnovation.grid.gridservit.wss4j.handler
Class SecurityContextInitHandler

java.lang.Object
  extended by org.apache.ws.security.handler.WSHandler
      extended by org.apache.ws.axis.security.handler.WSDoAllHandler
          extended by org.apache.ws.axis.security.WSDoAllReceiver
              extended by uk.ac.soton.itinnovation.grid.gridservit.wss4j.handler.SecurityContextInitHandler
All Implemented Interfaces:
Serializable, Handler

public class SecurityContextInitHandler
extends org.apache.ws.axis.security.WSDoAllReceiver

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.ws.axis.security.WSDoAllReceiver
log
 
Fields inherited from class org.apache.ws.axis.security.handler.WSDoAllHandler
makeLockable, name, options
 
Fields inherited from class org.apache.ws.security.handler.WSHandler
cryptos, DONE, secEngine
 
Constructor Summary
SecurityContextInitHandler()
           
 
Method Summary
protected  boolean checkReceiverResults(Vector wsResult, Vector actions)
          Ensure we have the right set of actions.
protected  boolean verifyTrust(X509Certificate cert, org.apache.ws.security.handler.RequestData reqData)
           
 
Methods inherited from class org.apache.ws.axis.security.WSDoAllReceiver
invoke
 
Methods inherited from class org.apache.ws.axis.security.handler.WSDoAllHandler
canHandleBlock, cleanup, generateWSDL, getDeploymentData, getName, getOption, getOptions, getPassword, getProperty, getUnderstoodHeaders, init, initHashtable, onFault, setName, setOption, setOptionDefault, setOptions, setOptionsLockable, setPassword, setProperty
 
Methods inherited from class org.apache.ws.security.handler.WSHandler
checkSignatureConfirmation, decodeCustomPasswordTypes, decodeDecryptionParameter, decodeEnableSignatureConfirmation, decodeEncryptionParameter, decodeMustUnderstand, decodeSignatureParameter, decodeSignatureParameter2, decodeTimestampPrecision, decodeTimestampStrict, decodeTimeToLive, decodeUTParameter, doReceiverAction, doSenderAction, getClassLoader, getPassword, getPasswordCB, getString, getStringOption, loadDecryptionCrypto, loadEncryptionCrypto, loadSignatureCrypto, verifyTimestamp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityContextInitHandler

public SecurityContextInitHandler()
Method Detail

verifyTrust

protected boolean verifyTrust(X509Certificate cert,
                              org.apache.ws.security.handler.RequestData reqData)
Overrides:
verifyTrust in class org.apache.ws.security.handler.WSHandler

checkReceiverResults

protected boolean checkReceiverResults(Vector wsResult,
                                       Vector actions)
Ensure we have the right set of actions. By default, WSS4J enforces the order of elements in the WS-Security header. However, the spec allows any ordering, so this causes us to reject perfectly valid messages. We override this method to ignore the ordering of timestamp elements to work with .NET.

See http://article.gmane.org/gmane.comp.apache.webservices.fx.devel/4044

Also, we ignore SAML results, because clients can choose to add an optional SAML token whenever they like. Note: we don't really care about this because PBAC will check that the user had the right credentials anyway.

Overrides:
checkReceiverResults in class org.apache.ws.security.handler.WSHandler


Copyright © 2001-2008 University of Southampton IT Innovation Centre. All Rights Reserved.