| 1 |
# OWASP Enterprise Security API (ESAPI) Properties file -- TEST Version |
| 2 |
############################################################################# |
| 3 |
# |
| 4 |
# WARNING WARNING WARNING WARNING WARNING WARNING |
| 5 |
# |
| 6 |
# ####### # # |
| 7 |
# # ###### #### ##### # # ###### ##### #### |
| 8 |
# # # # # # # # # # # |
| 9 |
# # ##### #### # # # ##### # # #### |
| 10 |
# # # # # # # # ##### # |
| 11 |
# # # # # # # # # # # # # |
| 12 |
# # ###### #### # # ###### # # #### |
| 13 |
# |
| 14 |
# This is NOT the version of ESAPI.properties that you are looking for. |
| 15 |
# Do NOT use this for your production applications!!!!! |
| 16 |
# |
| 17 |
# That is over in the 'configuration/esapi/ESAPI.properties' file. You |
| 18 |
# should retrieve THAT version from the official GitHub report from |
| 19 |
# https://github.com/ESAPI/esapi-java-legacy/blob/develop/configuration/esapi/ESAPI.properties |
| 20 |
# but make sure that you select it from the 'master' branch (which will |
| 21 |
# correspond to the latest official ESAPI relase). Sorry for the |
| 22 |
# inconvenience. We are trying to figure out how to get it to the official |
| 23 |
# "esapi-<releaseVersion>-sources.jar fiel available from Maven Central, but |
| 24 |
# in the meantime, you will have to get it from GitHub. |
| 25 |
# |
| 26 |
# PLEASE do not base your production use of ESAPI on this TEST version of |
| 27 |
# ESAPI.properties as this test version has been dumbed down in several places |
| 28 |
# for JUnit testing. |
| 29 |
# |
| 30 |
# You have been warned. |
| 31 |
# |
| 32 |
############################################################################# |
| 33 |
# This file is part of the Open Web Application Security Project (OWASP) |
| 34 |
# Enterprise Security API (ESAPI) project. For details, please see |
| 35 |
# http://www.owasp.org/index.php/ESAPI. |
| 36 |
# |
| 37 |
# Copyright (c) 2008,2009 - The OWASP Foundation |
| 38 |
# |
| 39 |
# DISCUSS: This may cause a major backwards compatibility issue, etc. but |
| 40 |
# from a name space perspective, we probably should have prefaced |
| 41 |
# all the property names with ESAPI or at least OWASP. Otherwise |
| 42 |
# there could be problems is someone loads this properties file into |
| 43 |
# the System properties. We could also put this file into the |
| 44 |
# esapi.jar file (perhaps as a ResourceBundle) and then allow an external |
| 45 |
# ESAPI properties be defined that would overwrite these defaults. |
| 46 |
# That keeps the application's properties relatively simple as usually |
| 47 |
# they will only want to override a few properties. If looks like we |
| 48 |
# already support multiple override levels of this in the |
| 49 |
# DefaultSecurityConfiguration class, but I'm suggesting placing the |
| 50 |
# defaults in the esapi.jar itself. That way, if the jar is signed, |
| 51 |
# we could detect if those properties had been tampered with. (The |
| 52 |
# code to check the jar signatures is pretty simple... maybe 70-90 LOC, |
| 53 |
# but off course there is an execution penalty (similar to the way |
| 54 |
# that the separate sunjce.jar used to be when a class from it was |
| 55 |
# first loaded). Thoughts? |
| 56 |
############################################################################### |
| 57 |
# |
| 58 |
# WARNING: Operating system protection should be used to lock down the .esapi |
| 59 |
# resources directory and all the files inside and all the directories all the |
| 60 |
# way up to the root directory of the file system. Note that if you are using |
| 61 |
# file-based implementations, that some files may need to be read-write as they |
| 62 |
# get updated dynamically. |
| 63 |
# |
| 64 |
# Before using, be sure to update the MasterKey and MasterSalt as described below. |
| 65 |
# N.B.: If you had stored data that you have previously encrypted with ESAPI 1.4, |
| 66 |
# you *must* FIRST decrypt it using ESAPI 1.4 and then (if so desired) |
| 67 |
# re-encrypt it with ESAPI 2.0. If you fail to do this, you will NOT be |
| 68 |
# able to decrypt your data with ESAPI 2.0. |
| 69 |
# |
| 70 |
# YOU HAVE BEEN WARNED!!! More details are in the ESAPI 2.0 Release Notes. |
| 71 |
# |
| 72 |
#=========================================================================== |
| 73 |
# ESAPI Configuration |
| 74 |
# |
| 75 |
# If true, then print all the ESAPI properties set here when they are loaded. |
| 76 |
# If false, they are not printed. Useful to reduce output when running JUnit tests. |
| 77 |
# If you need to troubleshoot a properties related problem, turning this on may help, |
| 78 |
# but we leave it off for running JUnit tests. (It will be 'true' in the one delivered |
| 79 |
# as part of production ESAPI, mostly for backward compatibility.) |
| 80 |
ESAPI.printProperties=false |
| 81 |
|
| 82 |
# ESAPI is designed to be easily extensible. You can use the reference implementation |
| 83 |
# or implement your own providers to take advantage of your enterprise's security |
| 84 |
# infrastructure. The functions in ESAPI are referenced using the ESAPI locator, like: |
| 85 |
# |
| 86 |
# String ciphertext = |
| 87 |
# ESAPI.encryptor().encrypt("Secret message"); // Deprecated in 2.0 |
| 88 |
# CipherText cipherText = |
| 89 |
# ESAPI.encryptor().encrypt(new PlainText("Secret message")); // Preferred |
| 90 |
# |
| 91 |
# Below you can specify the classname for the provider that you wish to use in your |
| 92 |
# application. The only requirement is that it implement the appropriate ESAPI interface. |
| 93 |
# This allows you to switch security implementations in the future without rewriting the |
| 94 |
# entire application. |
| 95 |
# |
| 96 |
# ExperimentalAccessController requires ESAPI-AccessControlPolicy.xml in .esapi directory |
| 97 |
ESAPI.AccessControl=org.owasp.esapi.reference.DefaultAccessController |
| 98 |
# FileBasedAuthenticator requires users.txt file in .esapi directory |
| 99 |
ESAPI.Authenticator=org.owasp.esapi.reference.FileBasedAuthenticator |
| 100 |
ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder |
| 101 |
ESAPI.Encryptor=org.owasp.esapi.reference.crypto.JavaEncryptor |
| 102 |
|
| 103 |
ESAPI.Executor=org.owasp.esapi.reference.DefaultExecutor |
| 104 |
ESAPI.HTTPUtilities=org.owasp.esapi.reference.DefaultHTTPUtilities |
| 105 |
ESAPI.IntrusionDetector=org.owasp.esapi.reference.DefaultIntrusionDetector |
| 106 |
# Log4JFactory Requires log4j.xml or log4j.properties in classpath - http://www.laliluna.de/log4j-tutorial.html |
| 107 |
ESAPI.Logger=org.owasp.esapi.logging.log4j.Log4JLogFactory |
| 108 |
#ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory |
| 109 |
#ESAPI.Logger=org.owasp.esapi.reference.ExampleExtendedLog4JLogFactory |
| 110 |
ESAPI.Randomizer=org.owasp.esapi.reference.DefaultRandomizer |
| 111 |
ESAPI.Validator=org.owasp.esapi.reference.DefaultValidator |
| 112 |
|
| 113 |
#=========================================================================== |
| 114 |
# ESAPI Authenticator |
| 115 |
# |
| 116 |
Authenticator.AllowedLoginAttempts=3 |
| 117 |
Authenticator.MaxOldPasswordHashes=13 |
| 118 |
Authenticator.UsernameParameterName=username |
| 119 |
Authenticator.PasswordParameterName=password |
| 120 |
# RememberTokenDuration (in days) |
| 121 |
Authenticator.RememberTokenDuration=14 |
| 122 |
# Session Timeouts (in minutes) |
| 123 |
Authenticator.IdleTimeoutDuration=20 |
| 124 |
Authenticator.AbsoluteTimeoutDuration=120 |
| 125 |
|
| 126 |
#=========================================================================== |
| 127 |
# ESAPI Encoder |
| 128 |
# |
| 129 |
# ESAPI canonicalizes input before validation to prevent bypassing filters with encoded attacks. |
| 130 |
# Failure to canonicalize input is a very common mistake when implementing validation schemes. |
| 131 |
# Canonicalization is automatic when using the ESAPI Validator, but you can also use the |
| 132 |
# following code to canonicalize data. |
| 133 |
# |
| 134 |
# ESAPI.Encoder().canonicalize( "%22hello world"" ); |
| 135 |
# |
| 136 |
# Multiple encoding is when a single encoding format is applied multiple times. Allowing |
| 137 |
# multiple encoding is strongly discouraged. |
| 138 |
Encoder.AllowMultipleEncoding=false |
| 139 |
|
| 140 |
# Mixed encoding is when multiple different encoding formats are applied, or when |
| 141 |
# multiple formats are nested. Allowing multiple encoding is strongly discouraged. |
| 142 |
Encoder.AllowMixedEncoding=false |
| 143 |
|
| 144 |
# The default list of codecs to apply when canonicalizing untrusted data. The list should include the codecs |
| 145 |
# for all downstream interpreters or decoders. For example, if the data is likely to end up in a URL, HTML, or |
| 146 |
# inside JavaScript, then the list of codecs below is appropriate. The order of the list is not terribly important. |
| 147 |
Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec |
| 148 |
|
| 149 |
|
| 150 |
#=========================================================================== |
| 151 |
# ESAPI Encryption |
| 152 |
# |
| 153 |
# The ESAPI Encryptor provides basic cryptographic functions with a simplified API. |
| 154 |
# To get started, generate a new key using java -classpath esapi.jar org.owasp.esapi.reference.crypto.JavaEncryptor |
| 155 |
# There is not currently any support for key rotation, so be careful when changing your key and salt as it |
| 156 |
# will invalidate all signed, encrypted, and hashed data. |
| 157 |
# |
| 158 |
# WARNING: Not all combinations of algorithms and key lengths are supported. |
| 159 |
# If you choose to use a key length greater than 128, you MUST download the |
| 160 |
# unlimited strength policy files and install in the lib directory of your JRE/JDK. |
| 161 |
# See http://java.sun.com/javase/downloads/index.jsp for more information. |
| 162 |
# |
| 163 |
# Backward compatibility with ESAPI Java 1.4 is supported by the two deprecated API |
| 164 |
# methods, Encryptor.encrypt(String) and Encryptor.decrypt(String). However, whenever |
| 165 |
# possible, these methods should be avoided as they use ECB cipher mode, which in almost |
| 166 |
# all circumstances a poor choice because of it's weakness. CBC cipher mode is the default |
| 167 |
# for the new Encryptor encrypt / decrypt methods for ESAPI Java 2.0. In general, you |
| 168 |
# should only use this compatibility setting if you have persistent data encrypted with |
| 169 |
# version 1.4 and even then, you should ONLY set this compatibility mode UNTIL |
| 170 |
# you have decrypted all of your old encrypted data and then re-encrypted it with |
| 171 |
# ESAPI 2.0 using CBC mode. If you have some reason to mix the deprecated 1.4 mode |
| 172 |
# with the new 2.0 methods, make sure that you use the same cipher algorithm for both |
| 173 |
# (256-bit AES was the default for 1.4; 128-bit is the default for 2.0; see below for |
| 174 |
# more details.) Otherwise, you will have to use the new 2.0 encrypt / decrypt methods |
| 175 |
# where you can specify a SecretKey. (Note that if you are using the 256-bit AES, |
| 176 |
# that requires downloading the special jurisdiction policy files mentioned above.) |
| 177 |
# |
| 178 |
# ***** IMPORTANT: These are for JUnit testing. Test files may have been |
| 179 |
# encrypted using these values so do not change these or |
| 180 |
# those tests will fail. The version under |
| 181 |
# src/main/resources/.esapi/ESAPI.properties |
| 182 |
# will be delivered with Encryptor.MasterKey and |
| 183 |
# Encryptor.MasterSalt set to the empty string. |
| 184 |
# |
| 185 |
# FINAL NOTE: |
| 186 |
# If Maven changes these when run, that needs to be fixed. |
| 187 |
# 256-bit key... requires unlimited strength jurisdiction policy files |
| 188 |
### Encryptor.MasterKey=pJhlri8JbuFYDgkqtHmm9s0Ziug2PE7ovZDyEPm4j14= |
| 189 |
# 128-bit key |
| 190 |
Encryptor.MasterKey=a6H9is3hEVGKB4Jut+lOVA== |
| 191 |
Encryptor.MasterSalt=SbftnvmEWD5ZHHP+pX3fqugNysc= |
| 192 |
# Encryptor.MasterSalt= |
| 193 |
|
| 194 |
# Provides the default JCE provider that ESAPI will "prefer" for its symmetric |
| 195 |
# encryption and hashing. (That is it will look to this provider first, but it |
| 196 |
# will defer to other providers if the requested algorithm is not implemented |
| 197 |
# by this provider.) If left unset, ESAPI will just use your Java VM's current |
| 198 |
# preferred JCE provider, which is generally set in the file |
| 199 |
# "$JAVA_HOME/jre/lib/security/java.security". |
| 200 |
# |
| 201 |
# The main intent of this is to allow ESAPI symmetric encryption to be |
| 202 |
# used with a FIPS 140-2 compliant crypto-module. For details, see the section |
| 203 |
# "Using ESAPI Symmetric Encryption with FIPS 140-2 Cryptographic Modules" in |
| 204 |
# the ESAPI 2.0 Symmetric Encryption User Guide, at: |
| 205 |
# http://owasp-esapi-java.googlecode.com/svn/trunk/documentation/esapi4java-core-2.0-symmetric-crypto-user-guide.html |
| 206 |
# However, this property also allows you to easily use an alternate JCE provider |
| 207 |
# such as "Bouncy Castle" without having to make changes to "java.security". |
| 208 |
# See Javadoc for SecurityProviderLoader for further details. If you wish to use |
| 209 |
# a provider that is not known to SecurityProviderLoader, you may specify the |
| 210 |
# fully-qualified class name of the JCE provider class that implements |
| 211 |
# java.security.Provider. If the name contains a '.', this is interpreted as |
| 212 |
# a fully-qualified class name that implements java.security.Provider. |
| 213 |
# |
| 214 |
# NOTE: Setting this property has the side-effect of changing it in your application |
| 215 |
# as well, so if you are using JCE in your application directly rather than |
| 216 |
# through ESAPI (you wouldn't do that, would you? ;-), it will change the |
| 217 |
# preferred JCE provider there as well. |
| 218 |
# |
| 219 |
# Default: Keeps the JCE provider set to whatever JVM sets it to. |
| 220 |
Encryptor.PreferredJCEProvider= |
| 221 |
|
| 222 |
# AES is the most widely used and strongest encryption algorithm. This |
| 223 |
# should agree with your Encryptor.CipherTransformation property. |
| 224 |
# By default, ESAPI Java 1.4 uses "PBEWithMD5AndDES" and which is |
| 225 |
# very weak. It is essentially a password-based encryption key, hashed |
| 226 |
# with MD5 around 1K times and then encrypted with the weak DES algorithm |
| 227 |
# (56-bits) using ECB mode and an unspecified padding (it is |
| 228 |
# JCE provider specific, but most likely "NoPadding"). However, 2.0 uses |
| 229 |
# "AES/CBC/PKCSPadding". If you want to change these, change them here. |
| 230 |
# Warning: This property does not control the default reference implementation for |
| 231 |
# ESAPI 2.0 using JavaEncryptor. Also, this property will be dropped |
| 232 |
# in the future. |
| 233 |
# @deprecated |
| 234 |
Encryptor.EncryptionAlgorithm=AES |
| 235 |
# For ESAPI Java 2.0 - New encrypt / decrypt methods use this. |
| 236 |
Encryptor.CipherTransformation=AES/CBC/PKCS5Padding |
| 237 |
|
| 238 |
# Applies to ESAPI 2.0 and later only! |
| 239 |
# Comma-separated list of cipher modes that provide *BOTH* |
| 240 |
# confidentiality *AND* message authenticity. (NIST refers to such cipher |
| 241 |
# modes as "combined modes" so that's what we shall call them.) If any of these |
| 242 |
# cipher modes are used then no MAC is calculated and stored |
| 243 |
# in the CipherText upon encryption. Likewise, if one of these |
| 244 |
# cipher modes is used with decryption, no attempt will be made |
| 245 |
# to validate the MAC contained in the CipherText object regardless |
| 246 |
# of whether it contains one or not. Since the expectation is that |
| 247 |
# these cipher modes support support message authenticity already, |
| 248 |
# injecting a MAC in the CipherText object would be at best redundant. |
| 249 |
# |
| 250 |
# Note that as of JDK 1.5, the SunJCE provider does not support *any* |
| 251 |
# of these cipher modes. Of these listed, only GCM and CCM are currently |
| 252 |
# NIST approved. YMMV for other JCE providers. E.g., Bouncy Castle supports |
| 253 |
# GCM and CCM with "NoPadding" mode, but not with "PKCS5Padding" or other |
| 254 |
# padding modes. |
| 255 |
Encryptor.cipher_modes.combined_modes=GCM,CCM,IAPM,EAX,OCB,CWC |
| 256 |
|
| 257 |
# Applies to ESAPI 2.0 and later only! |
| 258 |
# Additional cipher modes allowed for ESAPI 2.0 encryption. These |
| 259 |
# cipher modes are in _addition_ to those specified by the property |
| 260 |
# 'Encryptor.cipher_modes.combined_modes'. |
| 261 |
# |
| 262 |
# IMPORTANT NOTE: In the official ESAPI.properties we do *NOT* include ECB |
| 263 |
# here as this is an extremely weak mode. However, we *must* |
| 264 |
# allow it here so we can test ECB mode. That is important |
| 265 |
# since the logic is somewhat different (i.e., ECB mode does |
| 266 |
# not use an IV). |
| 267 |
# DISCUSS: Better name? |
| 268 |
# NOTE: ECB added only for testing purposes. Don't try this at home! |
| 269 |
Encryptor.cipher_modes.additional_allowed=CBC,ECB |
| 270 |
|
| 271 |
# 128-bit is almost always sufficient and appears to be more resistant to |
| 272 |
# related key attacks than is 256-bit AES. Use '_' to use default key size |
| 273 |
# for cipher algorithms (where it makes sense because the algorithm supports |
| 274 |
# a variable key size). Key length must agree to what's provided as the |
| 275 |
# cipher transformation, otherwise this will be ignored after logging a |
| 276 |
# warning. |
| 277 |
# |
| 278 |
# NOTE: This is what applies BOTH ESAPI 1.4 and 2.0. See warning above about mixing! |
| 279 |
Encryptor.EncryptionKeyLength=128 |
| 280 |
# Min key length - to support testing with 2TDEA |
| 281 |
Encryptor.MinEncryptionKeyLength=112 |
| 282 |
|
| 283 |
# Because 2.x uses CBC mode by default, it requires an initialization vector (IV). |
| 284 |
# (All cipher modes except ECB require an IV.) Previously there were two choices: we can either |
| 285 |
# use a fixed IV known to both parties or allow ESAPI to choose a random IV. The |
| 286 |
# former was deprecated in ESAPI 2.2 and removed in ESAPI 2.3. It was not secure |
| 287 |
# because the Encryptor (as are all the other major ESAPI components) is a |
| 288 |
# singleton and thus the same IV would get reused each time. It was not a |
| 289 |
# well-thought out plan. (To do it correctly means we need to add a setIV() method |
| 290 |
# and get rid of the Encryptor singleton, thus it will not happen until 3.0.) |
| 291 |
# However, while the IV does not need to be hidden from adversaries, it is important that the |
| 292 |
# adversary not be allowed to choose it. Thus for now, ESAPI just chooses a random IV. |
| 293 |
# Originally there was plans to allow a developer to provide a class and method |
| 294 |
# name to define a custom static method to generate an IV, but that is just |
| 295 |
# trouble waiting to happen. Thus in effect, the ONLY acceptable property value |
| 296 |
# for this property is "random". In the not too distant future (possibly the |
| 297 |
# next release), I will be removing it, but for now I am leaving this and |
| 298 |
# checking for it so a ConfigurationException can be thrown if anyone using |
| 299 |
# ESAPI ignored the deprecation warning message and still has it set to "fixed". |
| 300 |
# |
| 301 |
# Valid values: random |
| 302 |
Encryptor.ChooseIVMethod=random |
| 303 |
|
| 304 |
# Whether or not CipherText should use a message authentication code (MAC) with it. |
| 305 |
# This prevents an adversary from altering the IV as well as allowing a more |
| 306 |
# fool-proof way of determining the decryption failed because of an incorrect |
| 307 |
# key being supplied. This refers to the "separate" MAC calculated and stored |
| 308 |
# in CipherText, not part of any MAC that is calculated as a result of a |
| 309 |
# "combined mode" cipher mode. |
| 310 |
# |
| 311 |
# If you are using ESAPI with a FIPS 140-2 cryptographic module, you *must* also |
| 312 |
# set this property to false. |
| 313 |
Encryptor.CipherText.useMAC=true |
| 314 |
|
| 315 |
# Whether or not the PlainText object may be overwritten and then marked |
| 316 |
# eligible for garbage collection. If not set, this is still treated as 'true'. |
| 317 |
Encryptor.PlainText.overwrite=true |
| 318 |
|
| 319 |
# Do not use DES except in a legacy situations. 56-bit is way too small key size. |
| 320 |
#Encryptor.EncryptionKeyLength=56 |
| 321 |
#Encryptor.MinEncryptionKeyLength=56 |
| 322 |
#Encryptor.EncryptionAlgorithm=DES |
| 323 |
|
| 324 |
# TripleDES is considered strong enough for most purposes. |
| 325 |
# Note: There is also a 112-bit version of DESede. Using the 168-bit version |
| 326 |
# requires downloading the special jurisdiction policy from Sun. |
| 327 |
#Encryptor.EncryptionKeyLength=168 |
| 328 |
#Encryptor.MinEncryptionKeyLength=112 |
| 329 |
#Encryptor.EncryptionAlgorithm=DESede |
| 330 |
|
| 331 |
Encryptor.HashAlgorithm=SHA-512 |
| 332 |
Encryptor.HashIterations=1024 |
| 333 |
Encryptor.DigitalSignatureAlgorithm=SHA1withDSA |
| 334 |
Encryptor.DigitalSignatureKeyLength=1024 |
| 335 |
Encryptor.RandomAlgorithm=SHA1PRNG |
| 336 |
Encryptor.CharacterEncoding=UTF-8 |
| 337 |
# Currently supported choices for JDK 1.5 and 1.6 are: |
| 338 |
# HmacSHA1 (160 bits), HmacSHA256 (256 bits), HmacSHA384 (384 bits), and |
| 339 |
# HmacSHA512 (512 bits). |
| 340 |
# Note that HmacMD5 is *not* supported for the PRF used by the KDF even though |
| 341 |
# these JDKs support it. |
| 342 |
Encryptor.KDF.PRF=HmacSHA256 |
| 343 |
|
| 344 |
#=========================================================================== |
| 345 |
# ESAPI HttpUtilties |
| 346 |
# |
| 347 |
# The HttpUtilities provide basic protections to HTTP requests and responses. Primarily these methods |
| 348 |
# protect against malicious data from attackers, such as unprintable characters, escaped characters, |
| 349 |
# and other simple attacks. The HttpUtilities also provides utility methods for dealing with cookies, |
| 350 |
# headers, and CSRF tokens. |
| 351 |
# |
| 352 |
# Default file upload location (remember to escape backslashes with \\) |
| 353 |
HttpUtilities.UploadDir=C:\\ESAPI\\testUpload |
| 354 |
# let this default to java.io.tmpdir for testing |
| 355 |
#HttpUtilities.UploadTempDir=C:\\temp |
| 356 |
# Force flags on cookies, if you use HttpUtilities to set cookies |
| 357 |
HttpUtilities.ForceHttpOnlySession=false |
| 358 |
HttpUtilities.ForceSecureSession=false |
| 359 |
HttpUtilities.ForceHttpOnlyCookies=true |
| 360 |
HttpUtilities.ForceSecureCookies=true |
| 361 |
# Maximum size of HTTP headers |
| 362 |
HttpUtilities.MaxHeaderSize=4096 |
| 363 |
# File upload configuration |
| 364 |
HttpUtilities.ApprovedUploadExtensions=.pdf,.doc,.docx,.ppt,.pptx,.xls,.xlsx,.rtf,.txt,.jpg,.png |
| 365 |
HttpUtilities.MaxUploadFileBytes=500000000 |
| 366 |
# Using UTF-8 throughout your stack is highly recommended. That includes your database driver, |
| 367 |
# container, and any other technologies you may be using. Failure to do this may expose you |
| 368 |
# to Unicode transcoding injection attacks. Use of UTF-8 does not hinder internationalization. |
| 369 |
HttpUtilities.ResponseContentType=text/html; charset=UTF-8 |
| 370 |
# This is the name of the cookie used to represent the HTTP session |
| 371 |
# Typically this will be the default "JSESSIONID" |
| 372 |
HttpUtilities.HttpSessionIdName=JSESSIONID |
| 373 |
|
| 374 |
|
| 375 |
|
| 376 |
#=========================================================================== |
| 377 |
# ESAPI Executor |
| 378 |
# CHECKME - Not sure what this is used for, but surely it should be made OS independent. |
| 379 |
Executor.WorkingDirectory=C:\\Windows\\Temp |
| 380 |
Executor.ApprovedExecutables=C:\\Windows\\System32\\cmd.exe,C:\\Windows\\System32\\runas.exe |
| 381 |
|
| 382 |
|
| 383 |
#=========================================================================== |
| 384 |
# ESAPI Logging |
| 385 |
# Set the application name if these logs are combined with other applications |
| 386 |
Logger.ApplicationName=ExampleApplication |
| 387 |
# If you use an HTML log viewer that does not properly HTML escape log data, you can set LogEncodingRequired to true |
| 388 |
Logger.LogEncodingRequired=false |
| 389 |
# Determines whether ESAPI should log the application name. This might be clutter in some single-server/single-app environments. |
| 390 |
Logger.LogApplicationName=true |
| 391 |
# Determines whether ESAPI should log the server IP and port. This might be clutter in some single-server environments. |
| 392 |
Logger.LogServerIP=true |
| 393 |
|
| 394 |
#=========================================================================== |
| 395 |
# ESAPI Intrusion Detection |
| 396 |
# |
| 397 |
# Each event has a base to which .count, .interval, and .action are added |
| 398 |
# The IntrusionException will fire if we receive "count" events within "interval" seconds |
| 399 |
# The IntrusionDetector is configurable to take the following actions: log, logout, and disable |
| 400 |
# (multiple actions separated by commas are allowed e.g. event.test.actions=log,disable |
| 401 |
# |
| 402 |
# Custom Events |
| 403 |
# Names must start with "event." as the base |
| 404 |
# Use IntrusionDetector.addEvent( "test" ) in your code to trigger "event.test" here |
| 405 |
# You can also disable intrusion detection completely by changing |
| 406 |
# the following parameter to true |
| 407 |
# |
| 408 |
IntrusionDetector.Disable=false |
| 409 |
# |
| 410 |
IntrusionDetector.event.test.count=2 |
| 411 |
IntrusionDetector.event.test.interval=10 |
| 412 |
IntrusionDetector.event.test.actions=disable,log |
| 413 |
|
| 414 |
# Exception Events |
| 415 |
# All EnterpriseSecurityExceptions are registered automatically |
| 416 |
# Call IntrusionDetector.getInstance().addException(e) for Exceptions that do not extend EnterpriseSecurityException |
| 417 |
# Use the fully qualified classname of the exception as the base |
| 418 |
|
| 419 |
# any intrusion is an attack |
| 420 |
IntrusionDetector.org.owasp.esapi.errors.IntrusionException.count=1 |
| 421 |
IntrusionDetector.org.owasp.esapi.errors.IntrusionException.interval=1 |
| 422 |
IntrusionDetector.org.owasp.esapi.errors.IntrusionException.actions=log,disable,logout |
| 423 |
|
| 424 |
# for test purposes |
| 425 |
# CHECKME: Shouldn't there be something in the property name itself that designates |
| 426 |
# that these are for testing??? |
| 427 |
IntrusionDetector.org.owasp.esapi.errors.IntegrityException.count=10 |
| 428 |
IntrusionDetector.org.owasp.esapi.errors.IntegrityException.interval=5 |
| 429 |
IntrusionDetector.org.owasp.esapi.errors.IntegrityException.actions=log,disable,logout |
| 430 |
|
| 431 |
# rapid validation errors indicate scans or attacks in progress |
| 432 |
# org.owasp.esapi.errors.ValidationException.count=10 |
| 433 |
# org.owasp.esapi.errors.ValidationException.interval=10 |
| 434 |
# org.owasp.esapi.errors.ValidationException.actions=log,logout |
| 435 |
|
| 436 |
# sessions jumping between hosts indicates session hijacking |
| 437 |
IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.count=2 |
| 438 |
IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.interval=10 |
| 439 |
IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.actions=log,logout |
| 440 |
|
| 441 |
|
| 442 |
#=========================================================================== |
| 443 |
# ESAPI Validation |
| 444 |
# |
| 445 |
# The ESAPI Validator works on regular expressions with defined names. You can define names |
| 446 |
# either here, or you may define application specific patterns in a separate file defined below. |
| 447 |
# This allows enterprises to specify both organizational standards as well as application specific |
| 448 |
# validation rules. |
| 449 |
# |
| 450 |
#Validator.ConfigurationFile.MultiValued=false |
| 451 |
Validator.ConfigurationFile=validation-test1.properties |
| 452 |
|
| 453 |
# Validators used by ESAPI |
| 454 |
Validator.AccountName=^[a-zA-Z0-9]{3,20}$ |
| 455 |
Validator.SystemCommand=^[a-zA-Z\\-\\/]{1,64}$ |
| 456 |
Validator.RoleName=^[a-z]{1,20}$ |
| 457 |
Validator.Redirect=^\\/test.*$ |
| 458 |
|
| 459 |
# Global HTTP Validation Rules |
| 460 |
# Values with Base64 encoded data (e.g. encrypted state) will need at least [a-zA-Z0-9\/+=] |
| 461 |
Validator.HTTPScheme=^(http|https)$ |
| 462 |
Validator.HTTPServerName=^[a-zA-Z0-9_.\\-]*$ |
| 463 |
Validator.HTTPCookieName=^[a-zA-Z0-9\\-_]{1,32}$ |
| 464 |
Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]{0,1024}$ |
| 465 |
Validator.HTTPHeaderName=^[a-zA-Z0-9\\-_]{1,32}$ |
| 466 |
Validator.HTTPHeaderValue=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$ |
| 467 |
Validator.HTTPServletPath=^[a-zA-Z0-9.\\-\\/_]*$ |
| 468 |
Validator.HTTPPath=^[a-zA-Z0-9.\\-_]*$ |
| 469 |
Validator.HTTPURL=^.*$ |
| 470 |
Validator.HTTPJSESSIONID=^[A-Z0-9]{10,30}$ |
| 471 |
|
| 472 |
# Contributed by [email protected] |
| 473 |
# Googlecode Issue 116 (http://code.google.com/p/owasp-esapi-java/issues/detail?id=116) |
| 474 |
Validator.HTTPParameterName=^[a-zA-Z0-9_\\-]{1,32}$ |
| 475 |
Validator.HTTPParameterValue=^[-\\p{L}\\p{N}./+=_ !$*?@]{0,1000}$ |
| 476 |
Validator.HTTPContextPath=^/[a-zA-Z0-9.\\-_]*$ |
| 477 |
Validator.HTTPQueryString=^([a-zA-Z0-9_\\-]{1,32}=[\\p{L}\\p{N}.\\-/+=_ !$*?@%]*&?)*$ |
| 478 |
Validator.HTTPURI=^/([a-zA-Z0-9.\\-_]*/?)*$ |
| 479 |
|
| 480 |
|
| 481 |
# Validation of file related input |
| 482 |
Validator.FileName=^[a-zA-Z0-9!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$ |
| 483 |
Validator.DirectoryName=^[a-zA-Z0-9:/\\\\!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$ |
| 484 |
|
| 485 |
# Validation of dates. Controls whether or not 'lenient' dates are accepted. |
| 486 |
# See DataFormat.setLenient(boolean flag) for further details. |
| 487 |
Validator.AcceptLenientDates=false |