|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.owasp.esapi.SecurityConfiguration
The SecurityConfiguration manages all the settings used by the ESAPI in a single place. Initializing the Configuration is critically important to getting the ESAPI working properly. You must set a system property before invoking any part of the ESAPI. Here is how to do it:
java -Dorg.owasp.esapi.resources="C:\temp\resources"You may have to add this to the batch script that starts your web server. For example, in the "catalina" script that starts Tomcat, you can set the JAVA_OPTS variable to the -D string above. Once the Configuration is initialized with a resource directory, you can edit it to set things like master keys and passwords, logging locations, error thresholds, and allowed file extensions.
| Field Summary | |
static java.lang.String |
RESOURCE_DIRECTORY
|
| Constructor Summary | |
SecurityConfiguration()
Instantiates a new configuration. |
|
| Method Summary | |
java.util.List |
getAllowedFileExtensions()
Gets the allowed file extensions. |
int |
getAllowedFileUploadSize()
Gets the allowed file upload size. |
int |
getAllowedLoginAttempts()
Gets the allowed login attempts. |
java.lang.String |
getApplicationName()
Gets the application name, used for logging |
java.lang.String |
getCharacterEncoding()
Gets the character encoding. |
java.lang.String |
getDigitalSignatureAlgorithm()
Gets the digital signature algorithm. |
java.lang.String |
getEncryptionAlgorithm()
Gets the encryption algorithm. |
java.lang.String |
getHashAlgorithm()
Gets the hasing algorithm. |
java.io.File |
getKeystore()
Gets the keystore. |
boolean |
getLogEncodingRequired()
|
java.util.logging.Level |
getLogLevel()
|
char[] |
getMasterPassword()
Gets the master password. |
byte[] |
getMasterSalt()
Gets the master salt. |
int |
getMaxOldPasswordHashes()
Gets the max old password hashes. |
java.lang.String |
getPasswordParameterName()
Gets the password parameter name. |
Threshold |
getQuota(java.lang.String eventName)
Gets an intrusion detection Quota. |
java.lang.String |
getRandomAlgorithm()
Gets the random number generation algorithm. |
long |
getRememberTokenDuration()
|
java.lang.String |
getResourceDirectory()
Gets the resource directory. |
java.lang.String |
getResponseContentType()
|
java.lang.String |
getUsernameParameterName()
Gets the username parameter name. |
java.util.regex.Pattern |
getValidationPattern(java.lang.String key)
|
java.util.Iterator |
getValidationPatternNames()
|
void |
setResourceDirectory(java.lang.String dir)
Sets the ESAPI resource directory. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String RESOURCE_DIRECTORY
| Constructor Detail |
public SecurityConfiguration()
| Method Detail |
public java.lang.String getApplicationName()
ISecurityConfiguration
getApplicationName in interface ISecurityConfigurationpublic char[] getMasterPassword()
getMasterPassword in interface ISecurityConfigurationpublic java.io.File getKeystore()
getKeystore in interface ISecurityConfigurationpublic java.lang.String getResourceDirectory()
getResourceDirectory in interface ISecurityConfigurationpublic void setResourceDirectory(java.lang.String dir)
ISecurityConfiguration
setResourceDirectory in interface ISecurityConfigurationpublic byte[] getMasterSalt()
getMasterSalt in interface ISecurityConfigurationpublic java.util.List getAllowedFileExtensions()
getAllowedFileExtensions in interface ISecurityConfigurationpublic int getAllowedFileUploadSize()
getAllowedFileUploadSize in interface ISecurityConfigurationpublic java.lang.String getPasswordParameterName()
getPasswordParameterName in interface ISecurityConfigurationpublic java.lang.String getUsernameParameterName()
getUsernameParameterName in interface ISecurityConfigurationpublic java.lang.String getEncryptionAlgorithm()
getEncryptionAlgorithm in interface ISecurityConfigurationpublic java.lang.String getHashAlgorithm()
getHashAlgorithm in interface ISecurityConfigurationpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface ISecurityConfigurationpublic java.lang.String getDigitalSignatureAlgorithm()
getDigitalSignatureAlgorithm in interface ISecurityConfigurationpublic java.lang.String getRandomAlgorithm()
getRandomAlgorithm in interface ISecurityConfigurationpublic int getAllowedLoginAttempts()
getAllowedLoginAttempts in interface ISecurityConfigurationpublic int getMaxOldPasswordHashes()
getMaxOldPasswordHashes in interface ISecurityConfigurationpublic Threshold getQuota(java.lang.String eventName)
ISecurityConfiguration
getQuota in interface ISecurityConfigurationeventName -
public java.util.logging.Level getLogLevel()
public java.lang.String getResponseContentType()
public long getRememberTokenDuration()
public java.util.Iterator getValidationPatternNames()
public java.util.regex.Pattern getValidationPattern(java.lang.String key)
public boolean getLogEncodingRequired()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||