Package org.apache.ws.security
Class WSSConfig
java.lang.Object
org.apache.ws.security.WSSConfig
WSSConfig Carries configuration data so the WSS4J spec compliance can be
modified in runtime. Configure an instance of this object only if you need
WSS4J to emulate certain industry clients or previous OASIS specifications
for WS-Security interoperability testing purposes. The default settings
follow the latest OASIS and changing anything might violate the OASIS specs.
WARNING: changing the default settings will break the compliance with
the latest specs. Do this only if you know what you are doing.
- Author:
- Rami Jaamour (rjaamour@parasoft.com), Werner Dittmann (werner@apache.org)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static WSSConfig
protected boolean
protected HashMap
protected boolean
Set the timestamp precision mode.protected boolean
If set to true then the timestamp handling will throw an expcetion if the timestamp contains an expires element and the semantics are expired.protected boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
addJceProvider
(String id, String className) Add a new JCE security provider to use for WSS4J.org.apache.ws.security.action.Action
getAction
(int action) Lookup actionstatic WSSConfig
returns a static WSConfig instance that is configured with the latest OASIS WS-Seurity settings.static WSSConfig
org.apache.ws.security.processor.Processor
getProcessor
(QName el) boolean
boolean
Checks if we need to use milliseconds in timestampsboolean
boolean
Checks if we are in WS-I Basic Security Profile compliance modevoid
setEnableSignatureConfirmation
(boolean enableSignatureConfirmation) void
setPrecisionInMilliSeconds
(boolean precisionInMilliSeconds) Set the precision in millisecondsvoid
setTimeStampStrict
(boolean timeStampStrict) void
setWsiBSPCompliant
(boolean wsiBSPCompliant) Set the WS-I Basic Security Profile compliance mode.
-
Field Details
-
defaultConfig
-
wsiBSPCompliant
protected boolean wsiBSPCompliant -
precisionInMilliSeconds
protected boolean precisionInMilliSecondsSet the timestamp precision mode. If set totrue
then use timestamps with milliseconds, otherwise omit the millisconds. As per XML Date/Time specification the default is to include the milliseconds. -
enableSignatureConfirmation
protected boolean enableSignatureConfirmation -
timeStampStrict
protected boolean timeStampStrictIf set to true then the timestamp handling will throw an expcetion if the timestamp contains an expires element and the semantics are expired. If set to false, not expetion will be thrown, even if the semantics are expired. -
jceProvider
-
-
Constructor Details
-
WSSConfig
protected WSSConfig()
-
-
Method Details
-
getNewInstance
- Returns:
- a new WSSConfig instance configured with the default values
(values identical to
getDefaultWSConfig()
)
-
getDefaultWSConfig
returns a static WSConfig instance that is configured with the latest OASIS WS-Seurity settings. -
isWsiBSPCompliant
public boolean isWsiBSPCompliant()Checks if we are in WS-I Basic Security Profile compliance mode- Returns:
- TODO
-
setWsiBSPCompliant
public void setWsiBSPCompliant(boolean wsiBSPCompliant) Set the WS-I Basic Security Profile compliance mode. The default is false (dues to .Net interop problems).- Parameters:
wsiBSPCompliant
-
-
isPrecisionInMilliSeconds
public boolean isPrecisionInMilliSeconds()Checks if we need to use milliseconds in timestamps- Returns:
- TODO
-
setPrecisionInMilliSeconds
public void setPrecisionInMilliSeconds(boolean precisionInMilliSeconds) Set the precision in milliseconds- Parameters:
precisionInMilliSeconds
- TODO
-
isEnableSignatureConfirmation
public boolean isEnableSignatureConfirmation()- Returns:
- Returns the enableSignatureConfirmation.
-
setEnableSignatureConfirmation
public void setEnableSignatureConfirmation(boolean enableSignatureConfirmation) - Parameters:
enableSignatureConfirmation
- The enableSignatureConfirmation to set.
-
isTimeStampStrict
public boolean isTimeStampStrict()- Returns:
- Returns if we shall throw an exception on expired request semantic
-
setTimeStampStrict
public void setTimeStampStrict(boolean timeStampStrict) - Parameters:
timeStampStrict
- If true throw an exception on expired request semantic
-
getAction
Lookup action- Parameters:
action
-- Returns:
- An action class to create a security token
- Throws:
WSSecurityException
-
getProcessor
- Throws:
WSSecurityException
-
addJceProvider
Add a new JCE security provider to use for WSS4J. If the provider is not already known the method loads a security provider class and adds the provider to the java security service.- Parameters:
id
- The id string of the providerclassName
- Name of the class the implements the provider. This class must be a subclass ofjava.security.Provider
- Returns:
- Returns
true
if the provider was successfully added,false
otherwise.
-