public class WSSConfig extends Object
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowNamespaceQualifiedPasswordTypes
This variable controls whether (wsse) namespace qualified password types are
accepted when processing UsernameTokens.
|
protected boolean |
allowUsernameTokenNoPassword
This variable controls whether a UsernameToken with no password element is allowed.
|
static WsuIdAllocator |
DEFAULT_ID_ALLOCATOR |
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 boolean |
passwordsAreEncoded
Whether the password should be treated as a binary value.
|
protected boolean |
precisionInMilliSeconds
Set the timestamp precision mode.
|
protected String |
requiredPasswordType
If this value is not null, then username token handling will throw an
exception if the password type of the Username Token does not match this value
|
protected int |
secretKeyLength
The secret key length to be used for UT_SIGN.
|
protected int |
timeStampFutureTTL
The time in seconds in the future within which the Created time of an incoming
Timestamp is valid.
|
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 int |
timeStampTTL
The time in seconds between creation and expiry for a Timestamp.
|
protected int |
utFutureTTL
The time in seconds in the future within which the Created time of an incoming
UsernameToken is valid.
|
protected int |
utTTL
The time in seconds between creation and expiry for a UsernameToken Created
element.
|
protected boolean |
wsiBSPCompliant |
Constructor and Description |
---|
WSSConfig() |
Modifier and Type | Method and Description |
---|---|
static String |
addJceProvider(String name,
Provider provider)
Add a new JCE security provider to use for WSS4J, of the specified name and class.
|
static String |
addJceProvider(String name,
String className)
Add a new JCE security provider to use for WSS4J, of the specified name and class.
|
static void |
addXMLDSigRIInternal() |
static String |
appendJceProvider(String name,
Provider provider)
Add a new JCE security provider to use for WSS4J, of the specified name and class.
|
static String |
appendJceProvider(String name,
String className)
Add a new JCE security provider to use for WSS4J, of the specified name and class.
|
Action |
getAction(int action)
Lookup action
|
boolean |
getAllowNamespaceQualifiedPasswordTypes() |
WSTimeSource |
getCurrentTime() |
boolean |
getHandleCustomPasswordTypes() |
WsuIdAllocator |
getIdAllocator() |
static WSSConfig |
getNewInstance() |
boolean |
getPasswordsAreEncoded() |
Processor |
getProcessor(QName el) |
String |
getRequiredPasswordType() |
int |
getSecretKeyLength()
Get the secret key length to be used for UT_SIGN.
|
int |
getTimeStampFutureTTL() |
int |
getTimeStampTTL() |
int |
getUtFutureTTL() |
int |
getUtTTL() |
Validator |
getValidator(QName el) |
static void |
init() |
boolean |
isAllowUsernameTokenNoPassword() |
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
|
Class<?> |
setAction(int code,
Action action)
Associate an action instance with a specific action code.
|
Class<?> |
setAction(int code,
Class<?> clazz)
Associate an action instance with a specific action code.
|
static void |
setAddJceProviders(boolean value)
Set the value of the internal addJceProviders flag.
|
void |
setAllowNamespaceQualifiedPasswordTypes(boolean allowNamespaceQualifiedTypes) |
void |
setAllowUsernameTokenNoPassword(boolean allowUsernameTokenNoPassword) |
void |
setCurrentTime(WSTimeSource currentTime) |
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 for timestamps
|
Class<?> |
setProcessor(QName el,
Class<?> clazz)
Associate a SOAP processor name with a specified SOAP Security header
element QName.
|
Class<?> |
setProcessor(QName el,
Processor processor)
Associate a SOAP processor name with a specified SOAP Security header
element QName.
|
void |
setRequiredPasswordType(String requiredPasswordType) |
void |
setSecretKeyLength(int length)
Set the secret key length to be used for UT_SIGN.
|
void |
setTimeStampFutureTTL(int timeStampFutureTTL) |
void |
setTimeStampStrict(boolean timeStampStrict) |
void |
setTimeStampTTL(int timeStampTTL) |
void |
setUtFutureTTL(int utFutureTTL) |
void |
setUtTTL(int utTTL) |
Class<?> |
setValidator(QName el,
Class<?> clazz)
Associate a SOAP validator name with a specified SOAP Security header
element QName.
|
Class<?> |
setValidator(QName el,
Validator validator)
Associate a SOAP validator name with a specified SOAP Security header
element QName.
|
void |
setWsiBSPCompliant(boolean wsiBSPCompliant)
Set the WS-I Basic Security Profile compliance mode.
|
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 String requiredPasswordType
protected boolean allowUsernameTokenNoPassword
protected int timeStampTTL
protected int timeStampFutureTTL
protected int utTTL
protected int utFutureTTL
protected boolean handleCustomPasswordTypes
protected boolean allowNamespaceQualifiedPasswordTypes
protected int secretKeyLength
protected boolean passwordsAreEncoded
public static final WsuIdAllocator DEFAULT_ID_ALLOCATOR
protected WsuIdAllocator idAllocator
public static void setAddJceProviders(boolean value)
public static void init()
public static void addXMLDSigRIInternal()
public static WSSConfig getNewInstance()
public boolean isWsiBSPCompliant()
public void setWsiBSPCompliant(boolean wsiBSPCompliant)
wsiBSPCompliant
- public boolean isPrecisionInMilliSeconds()
public void setPrecisionInMilliSeconds(boolean precisionInMilliSeconds)
precisionInMilliSeconds
- whether to use precision in milliseconds for timestampspublic 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 String getRequiredPasswordType()
public void setRequiredPasswordType(String requiredPasswordType)
requiredPasswordType
- The required password type when processing
a Username Token.public int getTimeStampTTL()
public void setTimeStampTTL(int timeStampTTL)
timeStampTTL
- The new value for timeStampTTLpublic int getTimeStampFutureTTL()
public void setTimeStampFutureTTL(int timeStampFutureTTL)
timeStampFutureTTL
- the new value for timeStampFutureTTLpublic 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 Class<?> setAction(int code, Action action)
public Class<?> setAction(int code, Class<?> clazz)
public Action getAction(int action) throws WSSecurityException
action
- WSSecurityException
public Class<?> setProcessor(QName el, Processor processor)
public Class<?> setProcessor(QName el, Class<?> clazz)
public Class<?> setValidator(QName el, Validator validator)
public Class<?> setValidator(QName el, Class<?> clazz)
public Validator getValidator(QName el) throws WSSecurityException
WSSecurityException
public Processor getProcessor(QName el) throws WSSecurityException
WSSecurityException
public static String addJceProvider(String name, String className)
name
- The name string of the provider (this may not be the real name of the provider)className
- Name of the class the implements the provider. This class must
be a subclass of java.security.Provider
public static String addJceProvider(String name, Provider provider)
name
- The name string of the provider (this may not be the real name of the provider)provider
- A subclass of java.security.Provider
public static String appendJceProvider(String name, String className)
name
- The name string of the provider (this may not be the real name of the provider)className
- Name of the class the implements the provider. This class must
be a subclass of java.security.Provider
public static String appendJceProvider(String name, Provider provider)
name
- The name string of the provider (this may not be the real name of the provider)provider
- A subclass of java.security.Provider
public boolean isAllowUsernameTokenNoPassword()
public void setAllowUsernameTokenNoPassword(boolean allowUsernameTokenNoPassword)
public int getUtTTL()
public void setUtTTL(int utTTL)
public int getUtFutureTTL()
public void setUtFutureTTL(int utFutureTTL)
public WSTimeSource getCurrentTime()
public void setCurrentTime(WSTimeSource currentTime)
Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.