com.ibm.websphere.wssecurity.wssapi.verification

Interface WSSVerification


  1. public interface WSSVerification
This interface is responsible for the verifcation component. There are the values to set as default. Following is the sample code. The sample code of generating the callbackhandler is shown in the X509Token.
    WSSFactory factory = WSSFactory.getInstance();
    WSSConsumingContext concont = factory.newWSSConsumingContext();

    X509ConsumeCallbackHandler callbackhandler =  generateCallbackHandler(); 
                        // see X509ConsumeCallbackHandler
    WSSVerification ver = factory.newWSSVerification(X509Token.class, callbackhandler);

    concont.add(ver);

   
See Also:
WSSVerifyPart

Field Summary

Modifier and Type Field and Description
  1. static
  2. int
ADDRESSING_HEADERS
The keyword for the WS-Addressing headers.
  1. static
  2. int
BODY
The keyword for the SOAP message body.
  1. static
  2. java.lang.String
C14N
The URI for the inclusive canonicalization algorithm, C14n: http://www.w3.org/2001/10/xml-c14n#.
  1. static
  2. java.lang.String
EXC_C14N
The URI for the exclusive canonicalization algorithm, Exc-C14n: http://www.w3.org/2001/10/xml-exc-c14n#.
  1. static
  2. java.lang.String
HMAC_SHA1
The URI for the signature algorithm, HMAC_SHA1: http://www.w3.org/2000/09/xmldsig#hmac-sha1.
  1. static
  2. java.lang.String
RSA_SHA1
The URI for the signature algorithm, RSA_SHA1: http://www.w3.org/2000/09/xmldsig#rsa-sha1.
  1. static
  2. int
TIMESTAMP
The keyword for the creation and expiration time stamp information.

Method Summary

Modifier and Type Method and Description
  1. void
addAllowedCanonicalizationMethod(java.lang.String algorithm)
Adds the canonicalization method to allow for the signature verification.
  1. void
addAllowedSignatureMethod(java.lang.String algorithm)
Adds the signature method to allow for the signature verification.
  1. void
addRequiredVerifyHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a verification part.
  1. void
addRequiredVerifyPart(int keyword)
Adds the keyword of the verification part such as WSSVerification.BODY WSSVerification.ADDRESSING_HEADERS, or WSSVerification.TIMESTAMP.
  1. void
addRequiredVerifyPart(WSSVerifyPart header)
Adds the header in the SOAP Header, specified by QName, as a verification part.
  1. void
addRequiredVerifyPartByXPath(java.lang.String xpath)
Adds the XPath expression as a verification part.
  1. void
addToken(java.lang.Class tokenClass,javax.security.auth.callback.CallbackHandler callbackHandler)
Adds the information of the candidate security token that is used for the signature verification.
  1. void
addToken(java.lang.Class tokenClass,javax.security.auth.callback.CallbackHandler callbackHandler,java.lang.String loginConfigName)
Adds the information of the candidate security token that is used for the signature verification.
  1. void
requireSignatureConfirmation()
Requires the signature confirmation.

Field Detail

BODY

  1. static final int BODY
The keyword for the SOAP message body.
See Also:

ADDRESSING_HEADERS

  1. static final int ADDRESSING_HEADERS
The keyword for the WS-Addressing headers.
See Also:

TIMESTAMP

  1. static final int TIMESTAMP
The keyword for the creation and expiration time stamp information.
See Also:

RSA_SHA1

  1. static final java.lang.String RSA_SHA1
The URI for the signature algorithm, RSA_SHA1: http://www.w3.org/2000/09/xmldsig#rsa-sha1.
See Also:

HMAC_SHA1

  1. static final java.lang.String HMAC_SHA1
The URI for the signature algorithm, HMAC_SHA1: http://www.w3.org/2000/09/xmldsig#hmac-sha1.
See Also:

EXC_C14N

  1. static final java.lang.String EXC_C14N
The URI for the exclusive canonicalization algorithm, Exc-C14n: http://www.w3.org/2001/10/xml-exc-c14n#.
See Also:

C14N

  1. static final java.lang.String C14N
The URI for the inclusive canonicalization algorithm, C14n: http://www.w3.org/2001/10/xml-c14n#.
See Also:

Method Detail

addRequiredVerifyPart

  1. void addRequiredVerifyPart(int keyword)
  2. throws WSSException
Adds the keyword of the verification part such as WSSVerification.BODY WSSVerification.ADDRESSING_HEADERS, or WSSVerification.TIMESTAMP.
Parameters:
keyword - verification part
Throws:
WSSException - if the keyword is not valid.

addRequiredVerifyPart

  1. void addRequiredVerifyPart(WSSVerifyPart header)
Adds the header in the SOAP Header, specified by QName, as a verification part.
Parameters:
header - verification part

addRequiredVerifyPartByXPath

  1. void addRequiredVerifyPartByXPath( java.lang.String xpath)
Adds the XPath expression as a verification part.
Parameters:
xpath - verification part

addRequiredVerifyHeader

  1. void addRequiredVerifyHeader(javax.xml.namespace.QName header)
Adds the header in the SOAP Header, specified by QName, as a verification part.
Parameters:
header - verification part

addAllowedCanonicalizationMethod

  1. void addAllowedCanonicalizationMethod( java.lang.String algorithm)
  2. throws WSSException
Adds the canonicalization method to allow for the signature verification.
Parameters:
algorithm - canonicalization algorithm
Throws:
WSSException - the algorithm is not supported

addAllowedSignatureMethod

  1. void addAllowedSignatureMethod( java.lang.String algorithm)
  2. throws WSSException
Adds the signature method to allow for the signature verification.
Parameters:
algorithm -
Throws:
WSSException - the algorithm is not supported

addToken

  1. void addToken(java.lang.Class tokenClass,
  2. javax.security.auth.callback.CallbackHandler callbackHandler,
  3. java.lang.String loginConfigName)
  4. throws WSSException
Adds the information of the candidate security token that is used for the signature verification.
Parameters:
tokenClass - class of the security token
callbackHandler - callback handler
loginConfigName - name of the JAAS login configuration
Throws:
WSSException - if the arguments are not valid.

addToken

  1. void addToken(java.lang.Class tokenClass,
  2. javax.security.auth.callback.CallbackHandler callbackHandler)
  3. throws WSSException
Adds the information of the candidate security token that is used for the signature verification.
Parameters:
tokenClass - class of the security token
callbackHandler - callback handler
Throws:
WSSException - if the arguments are not valid.

requireSignatureConfirmation

  1. void requireSignatureConfirmation( )
Requires the signature confirmation. Caches the signature value in the request message for the purpose of attaching it to the response message as a signature confirmation. This method is for the response side. The signature confirmation is defined in the OASIS WS-Security Version 1.1 specification.