|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ws.security.WSSConfig
public class 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.
Field Summary | |
---|---|
protected boolean |
allowNamespaceQualifiedPasswordTypes
This variable controls whether (wsse) namespace qualified password types are accepted when processing UsernameTokens. |
static WsuIdAllocator |
DEFAULT_ID_ALLOCATOR
The default wsu:Id allocator is a simple "start at 1 and increment up" thing that is very fast. |
protected static WSSConfig |
defaultConfig
|
protected boolean |
enableSignatureConfirmation
|
protected boolean |
handleCustomPasswordTypes
This variable controls whether types other than PasswordDigest or PasswordText are allowed when processing UsernameTokens. |
protected WsuIdAllocator |
idAllocator
|
protected HashMap |
jceProvider
|
protected boolean |
passwordsAreEncoded
Whether the password should be treated as a binary value. |
protected boolean |
precisionInMilliSeconds
Set the timestamp precision mode. |
protected int |
secretKeyLength
The secret key length to be used for UT_SIGN. |
protected boolean |
timeStampStrict
If set to true then the timestamp handling will throw an exception if the timestamp contains an expires element and the semantics are expired. |
protected boolean |
wsiBSPCompliant
|
Constructor Summary | |
---|---|
protected |
WSSConfig()
|
Method Summary | |
---|---|
boolean |
addJceProvider(String id,
String className)
Add a new JCE security provider to use for WSS4J. |
Action |
getAction(int action)
Lookup action |
boolean |
getAllowNamespaceQualifiedPasswordTypes()
|
static WSSConfig |
getDefaultWSConfig()
returns a static WSConfig instance that is configured with the latest OASIS WS-Security settings. |
boolean |
getHandleCustomPasswordTypes()
|
WsuIdAllocator |
getIdAllocator()
|
static WSSConfig |
getNewInstance()
|
boolean |
getPasswordsAreEncoded()
|
Processor |
getProcessor(javax.xml.namespace.QName el)
|
int |
getSecretKeyLength()
Get the secret key length to be used for UT_SIGN. |
boolean |
isEnableSignatureConfirmation()
|
boolean |
isPrecisionInMilliSeconds()
Checks if we need to use milliseconds in timestamps |
boolean |
isTimeStampStrict()
|
boolean |
isWsiBSPCompliant()
Checks if we are in WS-I Basic Security Profile compliance mode |
String |
setAction(int code,
Action action)
Associate an action instance with a specific action code. |
String |
setAction(int code,
String action)
Associate an action name with a specific action code. |
static void |
setAddJceProviders(boolean value)
Set the value of the internal addJceProviders flag. |
void |
setAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedTypes)
|
void |
setEnableSignatureConfirmation(boolean enableSignatureConfirmation)
|
void |
setHandleCustomPasswordTypes(boolean handleCustomTypes)
|
void |
setIdAllocator(WsuIdAllocator idAllocator)
|
void |
setPasswordsAreEncoded(boolean passwordsAreEncoded)
|
void |
setPrecisionInMilliSeconds(boolean precisionInMilliSeconds)
Set the precision in milliseconds |
String |
setProcessor(javax.xml.namespace.QName el,
Processor processor)
Associate a SOAP processor instance with a specified SOAP Security header element QName. |
String |
setProcessor(javax.xml.namespace.QName el,
String name)
Associate a SOAP processor name with a specified SOAP Security header element QName. |
void |
setSecretKeyLength(int length)
Set the secret key length to be used for UT_SIGN. |
void |
setTimeStampStrict(boolean timeStampStrict)
|
void |
setWsiBSPCompliant(boolean wsiBSPCompliant)
Set the WS-I Basic Security Profile compliance mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static WSSConfig defaultConfig
protected boolean wsiBSPCompliant
protected boolean precisionInMilliSeconds
true
then use
timestamps with milliseconds, otherwise omit the milliseconds. As per XML
Date/Time specification the default is to include the milliseconds.
protected boolean enableSignatureConfirmation
protected boolean timeStampStrict
protected boolean handleCustomPasswordTypes
protected boolean allowNamespaceQualifiedPasswordTypes
protected int secretKeyLength
protected boolean passwordsAreEncoded
public static WsuIdAllocator DEFAULT_ID_ALLOCATOR
protected WsuIdAllocator idAllocator
protected HashMap jceProvider
Constructor Detail |
---|
protected WSSConfig()
Method Detail |
---|
public static void setAddJceProviders(boolean value)
public static WSSConfig getNewInstance()
getDefaultWSConfig()
)public static WSSConfig getDefaultWSConfig()
public boolean isWsiBSPCompliant()
public void setWsiBSPCompliant(boolean wsiBSPCompliant)
wsiBSPCompliant
- public boolean isPrecisionInMilliSeconds()
public void setPrecisionInMilliSeconds(boolean precisionInMilliSeconds)
precisionInMilliSeconds
- TODOpublic boolean isEnableSignatureConfirmation()
public void setEnableSignatureConfirmation(boolean enableSignatureConfirmation)
enableSignatureConfirmation
- The enableSignatureConfirmation to set.public void setHandleCustomPasswordTypes(boolean handleCustomTypes)
handleCustomTypes
- whether to handle custom UsernameToken password types or notpublic boolean getHandleCustomPasswordTypes()
public void setAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedTypes)
allowNamespaceQualifiedTypes
- whether (wsse) namespace qualified password types are accepted or notpublic boolean getAllowNamespaceQualifiedPasswordTypes()
public boolean isTimeStampStrict()
public void setTimeStampStrict(boolean timeStampStrict)
timeStampStrict
- If true throw an exception on expired request semanticpublic void setSecretKeyLength(int length)
public int getSecretKeyLength()
public void setPasswordsAreEncoded(boolean passwordsAreEncoded)
passwordsAreEncoded
- whether passwords are encodedpublic boolean getPasswordsAreEncoded()
public WsuIdAllocator getIdAllocator()
public void setIdAllocator(WsuIdAllocator idAllocator)
public String setAction(int code, String action)
public String setAction(int code, Action action)
public Action getAction(int action) throws WSSecurityException
action
-
WSSecurityException
public String setProcessor(javax.xml.namespace.QName el, String name)
public String setProcessor(javax.xml.namespace.QName el, Processor processor)
public Processor getProcessor(javax.xml.namespace.QName el) throws WSSecurityException
WSSecurityException
public boolean addJceProvider(String id, String className)
id
- The id string of the providerclassName
- Name of the class the implements the provider. This class must
be a subclass of java.security.Provider
true
if the provider was successfully
added, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |