|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.owasp.esapi.reference.DefaultSecurityConfiguration
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.
| Nested Class Summary |
| Nested classes inherited from class org.owasp.esapi.SecurityConfiguration |
SecurityConfiguration.Threshold |
| Field Summary | |
static java.lang.String |
RESOURCE_DIRECTORY
|
| Constructor Summary | |
DefaultSecurityConfiguration()
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. |
SecurityConfiguration.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 DefaultSecurityConfiguration()
| Method Detail |
public java.lang.String getApplicationName()
SecurityConfiguration
getApplicationName in interface SecurityConfigurationpublic char[] getMasterPassword()
getMasterPassword in interface SecurityConfigurationpublic java.io.File getKeystore()
getKeystore in interface SecurityConfigurationpublic java.lang.String getResourceDirectory()
getResourceDirectory in interface SecurityConfigurationpublic void setResourceDirectory(java.lang.String dir)
SecurityConfiguration
setResourceDirectory in interface SecurityConfigurationpublic byte[] getMasterSalt()
getMasterSalt in interface SecurityConfigurationpublic java.util.List getAllowedFileExtensions()
getAllowedFileExtensions in interface SecurityConfigurationpublic int getAllowedFileUploadSize()
getAllowedFileUploadSize in interface SecurityConfigurationpublic java.lang.String getPasswordParameterName()
getPasswordParameterName in interface SecurityConfigurationpublic java.lang.String getUsernameParameterName()
getUsernameParameterName in interface SecurityConfigurationpublic java.lang.String getEncryptionAlgorithm()
getEncryptionAlgorithm in interface SecurityConfigurationpublic java.lang.String getHashAlgorithm()
getHashAlgorithm in interface SecurityConfigurationpublic java.lang.String getCharacterEncoding()
getCharacterEncoding in interface SecurityConfigurationpublic java.lang.String getDigitalSignatureAlgorithm()
getDigitalSignatureAlgorithm in interface SecurityConfigurationpublic java.lang.String getRandomAlgorithm()
getRandomAlgorithm in interface SecurityConfigurationpublic int getAllowedLoginAttempts()
getAllowedLoginAttempts in interface SecurityConfigurationpublic int getMaxOldPasswordHashes()
getMaxOldPasswordHashes in interface SecurityConfigurationpublic SecurityConfiguration.Threshold getQuota(java.lang.String eventName)
SecurityConfiguration
getQuota in interface SecurityConfigurationeventName -
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 | ||||||||||