org.apache.ws.sandbox.security.conversation
Class ConversationManager

java.lang.Object
  extended byorg.apache.ws.sandbox.security.conversation.ConversationManager

public class ConversationManager
extends java.lang.Object

This class helps handlers to carry on conversation.

It performes functionalities 1) Adding derived Keys 2) Signing using derived keys 3) Encrypting using derive keys

Actually the class is the collection of methods that are useful for carrying out conversation.

Author:
Dimuthu Leelarathne. (muthulee@yahoo.com)

Field Summary
protected  java.lang.String canonAlgo
           
 
Constructor Summary
ConversationManager()
           
 
Method Summary
 void addDkToken(org.w3c.dom.Document doc, DerivedKeyInfo info)
           
 org.w3c.dom.Document build(org.w3c.dom.Document doc, Reference ref, byte[] sk, java.util.Vector parts)
          The method is coded such that it can be plugged into WSSignEnvelope.
 DerivedKeyInfo createDerivedKeyToken(org.w3c.dom.Document doc, java.lang.String uuid, DerivedKeyCallbackHandler dkcbHandler, SecurityTokenReference stRef2Base, int keyLen)
          Adds Derived key tokens to the header of the SOAP message, given the following parameters.
 void performDK_ENCR(java.lang.String encUser, java.lang.String actor, boolean mu, org.w3c.dom.Document doc, SecurityTokenReference secRef, DerivedKeyCallbackHandler dkcbHandler, java.util.Vector parts, java.lang.String symAlgo)
          Manages derived key encryption.
 void performDK_Sign(org.w3c.dom.Document doc, DerivedKeyCallbackHandler dkcbHandler, java.lang.String uuid, DerivedKeyInfo dkSigInfo, java.util.Vector parts)
          Manages derived key signature.
 void setGenerationInfo(int i)
           
protected  java.lang.String setWsuId(org.w3c.dom.Element bodyElement)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

canonAlgo

protected java.lang.String canonAlgo
Constructor Detail

ConversationManager

public ConversationManager()
Method Detail

createDerivedKeyToken

public DerivedKeyInfo createDerivedKeyToken(org.w3c.dom.Document doc,
                                            java.lang.String uuid,
                                            DerivedKeyCallbackHandler dkcbHandler,
                                            SecurityTokenReference stRef2Base,
                                            int keyLen)
                                     throws ConversationException
Adds Derived key tokens to the header of the SOAP message, given the following parameters.

Parameters:
doc -
uuid -
dkcbHandler -
stRef2Base - -SecurityTOkenReference to the token, from which the derived key is derived from
Returns:
Throws:
ConversationException

addDkToken

public void addDkToken(org.w3c.dom.Document doc,
                       DerivedKeyInfo info)

performDK_ENCR

public void performDK_ENCR(java.lang.String encUser,
                           java.lang.String actor,
                           boolean mu,
                           org.w3c.dom.Document doc,
                           SecurityTokenReference secRef,
                           DerivedKeyCallbackHandler dkcbHandler,
                           java.util.Vector parts,
                           java.lang.String symAlgo)
                    throws ConversationException
Manages derived key encryption.

Parameters:
encUser -
actor -
mu -
doc -
secRef - - SecurityTokenReference pointing to the derived Key
dkcbHandler -
Throws:
ConversationException

performDK_Sign

public void performDK_Sign(org.w3c.dom.Document doc,
                           DerivedKeyCallbackHandler dkcbHandler,
                           java.lang.String uuid,
                           DerivedKeyInfo dkSigInfo,
                           java.util.Vector parts)
                    throws ConversationException
Manages derived key signature.

Parameters:
doc -
dkcbHandler -
uuid -
dkSigInfo -
Throws:
ConversationException

build

public org.w3c.dom.Document build(org.w3c.dom.Document doc,
                                  Reference ref,
                                  byte[] sk,
                                  java.util.Vector parts)
                           throws WSSecurityException
The method is coded such that it can be plugged into WSSignEnvelope. Performs HMAC_SHA1 signature. needed.

Parameters:
doc -
ref -
sk -
parts -
Returns:
Throws:
WSSecurityException

setWsuId

protected java.lang.String setWsuId(org.w3c.dom.Element bodyElement)

setGenerationInfo

public void setGenerationInfo(int i)
Parameters:
i -


Copyright © 2004-2008 Apache Web Services. All Rights Reserved.