com.ibm.websphere.wssecurity.wssapi

Class WSSUtilFactory

  1. java.lang.Object
  2. extended bycom.ibm.websphere.wssecurity.wssapi.WSSUtilFactory

  1. public abstract class WSSUtilFactory
  2. extends java.lang.Object

This API is used for general Web Services Security utility methods for use in JAAS login modules


Constructor Summary

Constructor and Description
WSSUtilFactory()

Method Summary

Modifier and Type Method and Description
  1. abstract
  2. byte[]
decode(byte[] data)
Decode Base64 encoded data.
  1. abstract
  2. byte[]
decode(java.lang.String data)
Decode Base64 encoded data.
  1. abstract
  2. java.lang.String
encode(byte[] data)
Base64 encode data.
  1. abstract
  2. java.util.Map
getCallbackHandlerProperties(javax.security.auth.callback.CallbackHandler handler)
Get the property map from the callback handler.
  1. abstract
  2. java.util.Map
getCallbackHandlerProperties(java.util.Map wssContext)
Get the property map from the callback handler.
  1. abstract
  2. java.util.List
getConsumedTokens(java.util.Map WSSContext)
Gets the list of consumed tokens.
  1. abstract
  2. org.w3c.dom.Element
getDOMProcessingElement(java.util.Map wssContext)
Get the org.w3c.dom based SOAP processing element object.
  1. abstract
  2. java.util.Map
getHTTPRequestHeaders(javax.security.auth.callback.CallbackHandler handler)
Get the HTTP headers from an inbound SOAP request.
  1. abstract
  2. java.util.Map
getHTTPRequestHeaders(java.util.Map wssContext)
Get the HTTP headers from an inbound SOAP request.
  1. abstract
  2. java.util.Map
getHTTPRequestHeaders(org.apache.axis2.context.MessageContext msgContext)
Get the HTTP headers from an inbound SOAP request.
  1. static
  2. WSSUtilFactory
getInstance()
Retrieves an instance of the WSSUtilFactory.
  1. abstract
  2. java.security.KeyStore
getKeyStore(java.lang.String keyStoreRef)
Open a key store.
  1. abstract
  2. java.security.KeyStore
getKeyStore(java.lang.String storeType,java.lang.String storePath,char[] storePass)
Open a key store.
  1. abstract
  2. org.apache.axis2.context.MessageContext
getMessageContext(javax.security.auth.callback.CallbackHandler handler)
Get the MessageContext associated with the current request/response.
  1. abstract
  2. org.apache.axis2.context.MessageContext
getMessageContext(java.util.Map wssContext)
Get the MessageContext associated with the current request/response.
  1. abstract
  2. org.apache.axiom.om.OMElement
getProcessingElement(java.util.Map wssContext)
Get the AXIOM based SOAP processing element object.
  1. abstract
  2. com.ibm.wsspi.wssecurity.core.config.TokenConsumerConfig
getTokenConsumerConfig(java.util.Map WSSContext)
Gets the token consumer configuration object

This method retrieves the token consumer configuration object for the active token consumer.
  1. abstract
  2. com.ibm.wsspi.wssecurity.core.config.TokenGeneratorConfig
getTokenGeneratorConfig(java.util.Map WSSContext)
Gets the token generator configuration object

This method retrieves the token generator configuration object for the active token generator.
  1. abstract
  2. java.util.Map
getWSSContext(javax.security.auth.callback.CallbackHandler handler)
Get the web services security context map.
  1. abstract
  2. boolean
isServiceProvider()
Identifies if the current application is a web services provider

This method determines if the current application is a web services provider or a web services client.
  1. abstract
  2. void
setConsumedToken(java.util.Map WSSContext,java.util.List tokens)
Sets a list consumed tokens.
  1. abstract
  2. void
setConsumedToken(java.util.Map WSSContext,SecurityToken token)
Sets a consumed token.
  1. abstract
  2. void
setGeneratedToken(java.util.Map WSSContext,java.util.List tokens)
Sets a list of generated tokens.
  1. abstract
  2. void
setGeneratedToken(java.util.Map WSSContext,SecurityToken token)
Sets a generated token.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WSSUtilFactory

  1. public WSSUtilFactory()

Method Detail

getInstance

  1. public static WSSUtilFactory getInstance( )
  2. throws WSSException
Retrieves an instance of the WSSUtilFactory.
Returns:
WSSUtilFactory object
Throws:
WSSException - if the illegal access occurs or if the WSSFactory instance is not generated.

encode

  1. public abstract java.lang.String encode( byte[] data)
Base64 encode data.
Parameters:
data - bytes to be encoded
Returns:
base64 representation of specified byte array.

decode

  1. public abstract byte[] decode(java.lang.String data)
Decode Base64 encoded data.
Parameters:
data - base64 encoded string
Returns:
decoded bytes

decode

  1. public abstract byte[] decode(byte[] data)
Decode Base64 encoded data.
Parameters:
data - base64 encoded bytes
Returns:
decoded bytes

getKeyStore

  1. public abstract java.security.KeyStore getKeyStore( java.lang.String keyStoreRef)
  2. throws WSSException
Open a key store.
Parameters:
keyStoreRef - centralized keystore representation
Returns:
KeyStore object for use with apis
Throws:

getKeyStore

  1. public abstract java.security.KeyStore getKeyStore( java.lang.String storeType,
  2. java.lang.String storePath,
  3. char[] storePass)
  4. throws WSSException
Open a key store.
Parameters:
storeType - key store type (type that Java security supports, ex jks, jceks, etc)
storePath - path to key store (fully-qualified path name, or URI representation)
storePass - key store password
Returns:
KeyStore object for use with apis
Throws:
WSSException - if the key store cannot be obtained

getHTTPRequestHeaders

  1. public abstract java.util.Map getHTTPRequestHeaders( org.apache.axis2.context.MessageContext msgContext)
Get the HTTP headers from an inbound SOAP request.

This api is intended to be used within a custom login module
Parameters:
msgContext - message context
Returns:
map of HTTP headers from the inbound request
Throws:
WSSException - if the key store cannot be obtained

getHTTPRequestHeaders

  1. public abstract java.util.Map getHTTPRequestHeaders( java.util.Map wssContext)
Get the HTTP headers from an inbound SOAP request.

This api is intended to be used within a custom login module
Parameters:
wssContext - web services security context
Returns:
map of HTTP headers from the inbound request

getHTTPRequestHeaders

  1. public abstract java.util.Map getHTTPRequestHeaders( javax.security.auth.callback.CallbackHandler handler)
  2. throws WSSException
Get the HTTP headers from an inbound SOAP request.

This api is intended to be used within a custom login module
Parameters:
handler - login module's callback handler
Returns:
map of HTTP headers from the inbound request
Throws:
WSSException - if the use of the handler fails

getWSSContext

  1. public abstract java.util.Map getWSSContext( javax.security.auth.callback.CallbackHandler handler)
  2. throws WSSException
Get the web services security context map.
Parameters:
handler - login module's callback handler
Returns:
web services security context map
Throws:
WSSException - if the use of the handler fails

getMessageContext

  1. public abstract org.apache.axis2.context.MessageContext getMessageContext( java.util.Map wssContext)
Get the MessageContext associated with the current request/response.
Parameters:
wssContext - web services security context map
Returns:
MessageContext associated with the current request/response

getMessageContext

  1. public abstract org.apache.axis2.context.MessageContext getMessageContext( javax.security.auth.callback.CallbackHandler handler)
  2. throws WSSException
Get the MessageContext associated with the current request/response.
Parameters:
handler - login module's callback handler
Returns:
MessageContext associated with the current request/response
Throws:
WSSException - if the use of the handler fails

getCallbackHandlerProperties

  1. public abstract java.util.Map getCallbackHandlerProperties( java.util.Map wssContext)
Get the property map from the callback handler.

This api can be used to get custom properties from the currently configured callback handler without having to know what the callback handler is
Parameters:
wssContext - web services security context map
Returns:
property map from the currently configured callback handler

getCallbackHandlerProperties

  1. public abstract java.util.Map getCallbackHandlerProperties( javax.security.auth.callback.CallbackHandler handler)
  2. throws WSSException
Get the property map from the callback handler.

This api can be used to get custom properties from the currently configured callback handler without having to know what the callback handler is.
Parameters:
handler - login module's callback handler
Returns:
property map from the currently configured callback handler
Throws:
WSSException - if the use of the handler fails

getProcessingElement

  1. public abstract org.apache.axiom.om.OMElement getProcessingElement( java.util.Map wssContext)
Get the AXIOM based SOAP processing element object.

This is the target token object for consumers and the parent for generators.
Parameters:
wssContext - web services security context map
Returns:
AXIOM SOAP processing element

getDOMProcessingElement

  1. public abstract org.w3c.dom.Element getDOMProcessingElement( java.util.Map wssContext)
Get the org.w3c.dom based SOAP processing element object.

This is the target token object for consumers and the parent for generators. This method will only return an non-null object if com.ibm.wsspi.wssecurity.domElementEnabled=true is set in the token consumer/generator custom properties (NOT callback handler)
Parameters:
wssContext - web services security context map
Returns:
org.w3c.dom.Element processing element

setConsumedToken

  1. public abstract void setConsumedToken( java.util.Map WSSContext,
  2. SecurityToken token)
Sets a consumed token.

The token is put in the web services security context map and added to the SecurityTokenManager. This method is intended for use by a standalone token consumer login modules and not a login module that is stacked under a built-in token consumer. In the stacked scenario, the built-in consumer will do this work.
token - token that was consumed

setConsumedToken

  1. public abstract void setConsumedToken( java.util.Map WSSContext,
  2. java.util.List tokens)
Sets a list consumed tokens.

The tokens are put in the web services security context map and are added to the SecurityTokenManager. This method is intended for use by a standalone token consumer login modules and not a login module that is stacked under a built-in token consumer. In the stacked scenario, the built-in consumer will do this work.
tokens - list of tokens that were consumed

setGeneratedToken

  1. public abstract void setGeneratedToken( java.util.Map WSSContext,
  2. SecurityToken token)
Sets a generated token.

The token is put in the web services security context map and added to the SecurityTokenManager. This method is intended for use by a standalone token generator login modules and not a login module that is stacked over a built-in token generator. In the stacked scenario, the built-in generator will do this work.
token - token that is to be generated

setGeneratedToken

  1. public abstract void setGeneratedToken( java.util.Map WSSContext,
  2. java.util.List tokens)
Sets a list of generated tokens.

The tokens are put in the web services security context map and are added to the SecurityTokenManager. This method is intended for use by a standalone token generator login modules and not a login module that is stacked over a built-in token generator. In the stacked scenario, the built-in generator will do this work.
tokens - list of tokens that are to be

getConsumedTokens

  1. public abstract java.util.List getConsumedTokens( java.util.Map WSSContext)
Gets the list of consumed tokens.

This method retrieves the list of tokens that have been consumed so far in current JAAS config stack.
Returns:
List of SecurityToken

getTokenConsumerConfig

  1. public abstract com.ibm.wsspi.wssecurity.core.config.TokenConsumerConfig getTokenConsumerConfig( java.util.Map WSSContext)
Gets the token consumer configuration object

This method retrieves the token consumer configuration object for the active token consumer.
Returns:
token consumer configuration

getTokenGeneratorConfig

  1. public abstract com.ibm.wsspi.wssecurity.core.config.TokenGeneratorConfig getTokenGeneratorConfig( java.util.Map WSSContext)
Gets the token generator configuration object

This method retrieves the token generator configuration object for the active token generator.
Returns:
token generator configuration

isServiceProvider

  1. public abstract boolean isServiceProvider( )
  2. throws com.ibm.wsspi.wssecurity.core.SoapSecurityException
Identifies if the current application is a web services provider

This method determines if the current application is a web services provider or a web services client.
Returns:
true if a service provider, false if a client
Throws:
com.ibm.wsspi.wssecurity.core.SoapSecurityException