1 #===========================================================================
4 # If true, then print all the ESAPI properties set here when they are loaded.
5 # If false, they are not printed. Useful to reduce output when running JUnit tests.
6 # If you need to troubleshoot a properties related problem, turning this on may help.
7 # This is 'false' in the src/test/resources/.esapi version. It is 'true' by
8 # default for reasons of backward compatibility with earlier ESAPI versions.
9 ESAPI.printProperties=true
11 # ESAPI is designed to be easily extensible. You can use the reference implementation
12 # or implement your own providers to take advantage of your enterprise's security
13 # infrastructure. The functions in ESAPI are referenced using the ESAPI locator, like:
16 # ESAPI.encryptor().encrypt("Secret message"); // Deprecated in 2.0
17 # CipherText cipherText =
18 # ESAPI.encryptor().encrypt(new PlainText("Secret message")); // Preferred
20 # Below you can specify the classname for the provider that you wish to use in your
21 # application. The only requirement is that it implement the appropriate ESAPI interface.
22 # This allows you to switch security implementations in the future without rewriting the
25 # ExperimentalAccessController requires ESAPI-AccessControlPolicy.xml in .esapi directory
26 ESAPI.AccessControl=org.owasp.esapi.reference.DefaultAccessController
27 # FileBasedAuthenticator requires users.txt file in .esapi directory
28 ESAPI.Authenticator=org.owasp.esapi.reference.FileBasedAuthenticator
29 ESAPI.Encoder=org.owasp.esapi.reference.DefaultEncoder
30 ESAPI.Encryptor=org.owasp.esapi.reference.crypto.JavaEncryptor
32 ESAPI.Executor=org.owasp.esapi.reference.DefaultExecutor
33 ESAPI.HTTPUtilities=org.owasp.esapi.reference.DefaultHTTPUtilities
34 ESAPI.IntrusionDetector=org.owasp.esapi.reference.DefaultIntrusionDetector
35 # Log4JFactory Requires log4j.xml or log4j.properties in classpath
36 ESAPI.Logger=org.owasp.esapi.reference.Log4JLogFactory
37 #ESAPI.Logger=org.owasp.esapi.reference.JavaLogFactory
38 ESAPI.Randomizer=org.owasp.esapi.reference.DefaultRandomizer
39 ESAPI.Validator=org.owasp.esapi.reference.DefaultValidator
41 #===========================================================================
44 Authenticator.AllowedLoginAttempts=3
45 #Authenticator.MaxOldPasswordHashes=13
46 Authenticator.UsernameParameterName=username
47 #Authenticator.PasswordParameterName=password
48 # RememberTokenDuration (in days)
49 Authenticator.RememberTokenDuration=14
50 # Session Timeouts (in minutes)
51 Authenticator.IdleTimeoutDuration=20
52 Authenticator.AbsoluteTimeoutDuration=120
54 #===========================================================================
57 # ESAPI canonicalizes input before validation to prevent bypassing filters with encoded attacks.
58 # Failure to canonicalize input is a very common mistake when implementing validation schemes.
59 # Canonicalization is automatic when using the ESAPI Validator, but you can also use the
60 # following code to canonicalize data.
62 # ESAPI.Encoder().canonicalize( "%22hello world"" );
64 # Multiple encoding is when a single encoding format is applied multiple times. Allowing
65 # multiple encoding is strongly discouraged.
66 Encoder.AllowMultipleEncoding=false
68 # Mixed encoding is when multiple different encoding formats are applied, or when
69 # multiple formats are nested. Allowing multiple encoding is strongly discouraged.
70 Encoder.AllowMixedEncoding=false
72 # The default list of codecs to apply when canonicalizing untrusted data. The list should include the codecs
73 # for all downstream interpreters or decoders. For example, if the data is likely to end up in a URL, HTML, or
74 # inside JavaScript, then the list of codecs below is appropriate. The order of the list is not terribly important.
75 Encoder.DefaultCodecList=HTMLEntityCodec,PercentCodec,JavaScriptCodec
78 #===========================================================================
81 # The ESAPI Encryptor provides basic cryptographic functions with a simplified API.
82 # To get started, generate a new key using java -classpath esapi.jar org.owasp.esapi.reference.crypto.JavaEncryptor
83 # There is not currently any support for key rotation, so be careful when changing your key and salt as it
84 # will invalidate all signed, encrypted, and hashed data.
86 # WARNING: Not all combinations of algorithms and key lengths are supported.
87 # If you choose to use a key length greater than 128, you MUST download the
88 # unlimited strength policy files and install in the lib directory of your JRE/JDK.
89 # See http://java.sun.com/javase/downloads/index.jsp for more information.
91 # Backward compatibility with ESAPI Java 1.4 is supported by the two deprecated API
92 # methods, Encryptor.encrypt(String) and Encryptor.decrypt(String). However, whenever
93 # possible, these methods should be avoided as they use ECB cipher mode, which in almost
94 # all circumstances a poor choice because of it's weakness. CBC cipher mode is the default
95 # for the new Encryptor encrypt / decrypt methods for ESAPI Java 2.0. In general, you
96 # should only use this compatibility setting if you have persistent data encrypted with
97 # version 1.4 and even then, you should ONLY set this compatibility mode UNTIL
98 # you have decrypted all of your old encrypted data and then re-encrypted it with
99 # ESAPI 2.0 using CBC mode. If you have some reason to mix the deprecated 1.4 mode
100 # with the new 2.0 methods, make sure that you use the same cipher algorithm for both
101 # (256-bit AES was the default for 1.4; 128-bit is the default for 2.0; see below for
102 # more details.) Otherwise, you will have to use the new 2.0 encrypt / decrypt methods
103 # where you can specify a SecretKey. (Note that if you are using the 256-bit AES,
104 # that requires downloading the special jurisdiction policy files mentioned above.)
106 # ***** IMPORTANT: Do NOT forget to replace these with your own values! *****
107 # To calculate these values, you can run:
108 # java -classpath esapi.jar org.owasp.esapi.reference.crypto.JavaEncryptor
110 Encryptor.MasterKey=tzfztf56ftv
111 Encryptor.MasterSalt=123456ztrewq
113 # Provides the default JCE provider that ESAPI will "prefer" for its symmetric
114 # encryption and hashing. (That is it will look to this provider first, but it
115 # will defer to other providers if the requested algorithm is not implemented
116 # by this provider.) If left unset, ESAPI will just use your Java VM's current
117 # preferred JCE provider, which is generally set in the file
118 # "$JAVA_HOME/jre/lib/security/java.security".
120 # The main intent of this is to allow ESAPI symmetric encryption to be
121 # used with a FIPS 140-2 compliant crypto-module. For details, see the section
122 # "Using ESAPI Symmetric Encryption with FIPS 140-2 Cryptographic Modules" in
123 # the ESAPI 2.0 Symmetric Encryption User Guide, at:
124 # http://owasp-esapi-java.googlecode.com/svn/trunk/documentation/esapi4java-core-2.0-symmetric-crypto-user-guide.html
125 # However, this property also allows you to easily use an alternate JCE provider
126 # such as "Bouncy Castle" without having to make changes to "java.security".
127 # See Javadoc for SecurityProviderLoader for further details. If you wish to use
128 # a provider that is not known to SecurityProviderLoader, you may specify the
129 # fully-qualified class name of the JCE provider class that implements
130 # java.security.Provider. If the name contains a '.', this is interpreted as
131 # a fully-qualified class name that implements java.security.Provider.
133 # NOTE: Setting this property has the side-effect of changing it in your application
134 # as well, so if you are using JCE in your application directly rather than
135 # through ESAPI (you wouldn't do that, would you? ;-), it will change the
136 # preferred JCE provider there as well.
138 # Default: Keeps the JCE provider set to whatever JVM sets it to.
139 Encryptor.PreferredJCEProvider=
141 # AES is the most widely used and strongest encryption algorithm. This
142 # should agree with your Encryptor.CipherTransformation property.
143 # By default, ESAPI Java 1.4 uses "PBEWithMD5AndDES" and which is
144 # very weak. It is essentially a password-based encryption key, hashed
145 # with MD5 around 1K times and then encrypted with the weak DES algorithm
146 # (56-bits) using ECB mode and an unspecified padding (it is
147 # JCE provider specific, but most likely "NoPadding"). However, 2.0 uses
148 # "AES/CBC/PKCSPadding". If you want to change these, change them here.
149 # Warning: This property does not control the default reference implementation for
150 # ESAPI 2.0 using JavaEncryptor. Also, this property will be dropped
153 Encryptor.EncryptionAlgorithm=AES
154 # For ESAPI Java 2.0 - New encrypt / decrypt methods use this.
155 Encryptor.CipherTransformation=AES/CBC/PKCS5Padding
157 # Applies to ESAPI 2.0 and later only!
158 # Comma-separated list of cipher modes that provide *BOTH*
159 # confidentiality *AND* message authenticity. (NIST refers to such cipher
160 # modes as "combined modes" so that's what we shall call them.) If any of these
161 # cipher modes are used then no MAC is calculated and stored
162 # in the CipherText upon encryption. Likewise, if one of these
163 # cipher modes is used with decryption, no attempt will be made
164 # to validate the MAC contained in the CipherText object regardless
165 # of whether it contains one or not. Since the expectation is that
166 # these cipher modes support support message authenticity already,
167 # injecting a MAC in the CipherText object would be at best redundant.
169 # Note that as of JDK 1.5, the SunJCE provider does not support *any*
170 # of these cipher modes. Of these listed, only GCM and CCM are currently
171 # NIST approved. YMMV for other JCE providers. E.g., Bouncy Castle supports
172 # GCM and CCM with "NoPadding" mode, but not with "PKCS5Padding" or other
174 Encryptor.cipher_modes.combined_modes=GCM,CCM,IAPM,EAX,OCB,CWC
176 # Applies to ESAPI 2.0 and later only!
177 # Additional cipher modes allowed for ESAPI 2.0 encryption. These
178 # cipher modes are in _addition_ to those specified by the property
179 # 'Encryptor.cipher_modes.combined_modes'.
180 # Note: We will add support for streaming modes like CFB & OFB once
181 # we add support for 'specified' to the property 'Encryptor.ChooseIVMethod'
182 # (probably in ESAPI 2.1).
183 # DISCUSS: Better name?
184 Encryptor.cipher_modes.additional_allowed=CBC
186 # 128-bit is almost always sufficient and appears to be more resistant to
187 # related key attacks than is 256-bit AES. Use '_' to use default key size
188 # for cipher algorithms (where it makes sense because the algorithm supports
189 # a variable key size). Key length must agree to what's provided as the
190 # cipher transformation, otherwise this will be ignored after logging a
193 # NOTE: This is what applies BOTH ESAPI 1.4 and 2.0. See warning above about mixing!
194 Encryptor.EncryptionKeyLength=128
196 # Because 2.0 uses CBC mode by default, it requires an initialization vector (IV).
197 # (All cipher modes except ECB require an IV.) There are two choices: we can either
198 # use a fixed IV known to both parties or allow ESAPI to choose a random IV. While
199 # the IV does not need to be hidden from adversaries, it is important that the
200 # adversary not be allowed to choose it. Also, random IVs are generally much more
201 # secure than fixed IVs. (In fact, it is essential that feed-back cipher modes
202 # such as CFB and OFB use a different IV for each encryption with a given key so
203 # in such cases, random IVs are much preferred. By default, ESAPI 2.0 uses random
204 # IVs. If you wish to use 'fixed' IVs, set 'Encryptor.ChooseIVMethod=fixed' and
205 # uncomment the Encryptor.fixedIV.
207 # Valid values: random|fixed|specified 'specified' not yet implemented; planned for 2.1
208 Encryptor.ChooseIVMethod=random
209 # If you choose to use a fixed IV, then you must place a fixed IV here that
210 # is known to all others who are sharing your secret key. The format should
211 # be a hex string that is the same length as the cipher block size for the
212 # cipher algorithm that you are using. The following is an *example* for AES
213 # from an AES test vector for AES-128/CBC as described in:
214 # NIST Special Publication 800-38A (2001 Edition)
215 # "Recommendation for Block Cipher Modes of Operation".
216 # (Note that the block size for AES is 16 bytes == 128 bits.)
218 Encryptor.fixedIV=0x000102030405060708090a0b0c0d0e0f
220 # Whether or not CipherText should use a message authentication code (MAC) with it.
221 # This prevents an adversary from altering the IV as well as allowing a more
222 # fool-proof way of determining the decryption failed because of an incorrect
223 # key being supplied. This refers to the "separate" MAC calculated and stored
224 # in CipherText, not part of any MAC that is calculated as a result of a
225 # "combined mode" cipher mode.
227 # If you are using ESAPI with a FIPS 140-2 cryptographic module, you *must* also
228 # set this property to false.
229 Encryptor.CipherText.useMAC=true
231 # Whether or not the PlainText object may be overwritten and then marked
232 # eligible for garbage collection. If not set, this is still treated as 'true'.
233 Encryptor.PlainText.overwrite=true
235 # Do not use DES except in a legacy situations. 56-bit is way too small key size.
236 #Encryptor.EncryptionKeyLength=56
237 #Encryptor.EncryptionAlgorithm=DES
239 # TripleDES is considered strong enough for most purposes.
240 # Note: There is also a 112-bit version of DESede. Using the 168-bit version
241 # requires downloading the special jurisdiction policy from Sun.
242 #Encryptor.EncryptionKeyLength=168
243 #Encryptor.EncryptionAlgorithm=DESede
245 Encryptor.HashAlgorithm=SHA-512
246 Encryptor.HashIterations=1024
247 Encryptor.DigitalSignatureAlgorithm=SHA1withDSA
248 Encryptor.DigitalSignatureKeyLength=1024
249 Encryptor.RandomAlgorithm=SHA1PRNG
250 Encryptor.CharacterEncoding=UTF-8
252 # This is the Pseudo Random Function (PRF) that ESAPI's Key Derivation Function
253 # (KDF) normally uses. Note this is *only* the PRF used for ESAPI's KDF and
254 # *not* what is used for ESAPI's MAC. (Currently, HmacSHA1 is always used for
255 # the MAC, mostly to keep the overall size at a minimum.)
257 # Currently supported choices for JDK 1.5 and 1.6 are:
258 # HmacSHA1 (160 bits), HmacSHA256 (256 bits), HmacSHA384 (384 bits), and
259 # HmacSHA512 (512 bits).
260 # Note that HmacMD5 is *not* supported for the PRF used by the KDF even though
261 # the JDKs support it. See the ESAPI 2.0 Symmetric Encryption User Guide
263 Encryptor.KDF.PRF=HmacSHA256
264 #===========================================================================
266 # Set the application name if these logs are combined with other applications
267 Logger.ApplicationName=Ecompportal_application
268 # If you use an HTML log viewer that does not properly HTML escape log data, you can set LogEncodingRequired to true
269 Logger.LogEncodingRequired=false
270 # Determines whether ESAPI should log the application name. This might be clutter in some single-server/single-app environments.
271 Logger.LogApplicationName=true
272 # Determines whether ESAPI should log the server IP and port. This might be clutter in some single-server environments.
273 Logger.LogServerIP=true
274 # LogFileName, the name of the logging file. Provide a full directory path (e.g., C:\\ESAPI\\ESAPI_logging_file) if you
275 # want to place it in a specific directory.
276 Logger.LogFileName=Ecompportal_ESAPI_logging_file
277 # MaxLogFileSize, the max size (in bytes) of a single log file before it cuts over to a new one (default is 10,000,000)
278 Logger.MaxLogFileSize=10000000
281 #===========================================================================
282 # ESAPI Intrusion Detection
284 # Each event has a base to which .count, .interval, and .action are added
285 # The IntrusionException will fire if we receive "count" events within "interval" seconds
286 # The IntrusionDetector is configurable to take the following actions: log, logout, and disable
287 # (multiple actions separated by commas are allowed e.g. event.test.actions=log,disable
290 # Names must start with "event." as the base
291 # Use IntrusionDetector.addEvent( "test" ) in your code to trigger "event.test" here
292 # You can also disable intrusion detection completely by changing
293 # the following parameter to true
295 IntrusionDetector.Disable=false
297 IntrusionDetector.event.test.count=2
298 IntrusionDetector.event.test.interval=10
299 IntrusionDetector.event.test.actions=disable,log
302 # All EnterpriseSecurityExceptions are registered automatically
303 # Call IntrusionDetector.getInstance().addException(e) for Exceptions that do not extend EnterpriseSecurityException
304 # Use the fully qualified classname of the exception as the base
306 # any intrusion is an attack
307 IntrusionDetector.org.owasp.esapi.errors.IntrusionException.count=1
308 IntrusionDetector.org.owasp.esapi.errors.IntrusionException.interval=1
309 IntrusionDetector.org.owasp.esapi.errors.IntrusionException.actions=log,disable,logout
312 # CHECKME: Shouldn't there be something in the property name itself that designates
313 # that these are for testing???
314 IntrusionDetector.org.owasp.esapi.errors.IntegrityException.count=10
315 IntrusionDetector.org.owasp.esapi.errors.IntegrityException.interval=5
316 IntrusionDetector.org.owasp.esapi.errors.IntegrityException.actions=log,disable,logout
318 # rapid validation errors indicate scans or attacks in progress
319 # org.owasp.esapi.errors.ValidationException.count=10
320 # org.owasp.esapi.errors.ValidationException.interval=10
321 # org.owasp.esapi.errors.ValidationException.actions=log,logout
323 # sessions jumping between hosts indicates session hijacking
324 IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.count=2
325 IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.interval=10
326 IntrusionDetector.org.owasp.esapi.errors.AuthenticationHostException.actions=log,logout
329 #===========================================================================
332 # The ESAPI Validator works on regular expressions with defined names. You can define names
333 # either here, or you may define application specific patterns in a separate file defined below.
334 # This allows enterprises to specify both organizational standards as well as application specific
337 Validator.ConfigurationFile=validation.properties
338 Validator.ConfigurationFile.MultiValued=false
340 # Validators used by ESAPI
341 Validator.AccountName=^[a-zA-Z0-9]{3,20}$
342 Validator.SystemCommand=^[a-zA-Z\\-\\/]{1,64}$
343 Validator.RoleName=^[a-z]{1,20}$
345 #the word TEST below should be changed to your application
346 #name - only relative URL's are supported
347 Validator.Redirect=^\\/test.*$
349 # Global HTTP Validation Rules
350 # Values with Base64 encoded data (e.g. encrypted state) will need at least [a-zA-Z0-9\/+=]
351 Validator.HTTPScheme=^(http|https)$
352 Validator.HTTPServerName=^[a-zA-Z0-9_.\\-]*$
353 Validator.HTTPParameterName=^[a-zA-Z0-9_]{1,32}$
354 Validator.HTTPParameterValue=^[a-zA-Z0-9.\\-\\/+=@_ ]*$
355 Validator.HTTPCookieName=^[a-zA-Z0-9\\-_]{1,32}$
356 Validator.HTTPCookieValue=^[a-zA-Z0-9\\-\\/+=_ ]*$
357 Validator.HTTPHeaderName=^[a-zA-Z0-9\\-_]{1,32}$
358 Validator.HTTPHeaderValue=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$
359 Validator.HTTPContextPath=^\\/?[a-zA-Z0-9.\\-\\/_]*$
360 Validator.HTTPServletPath=^[a-zA-Z0-9.\\-\\/_]*$
361 Validator.HTTPPath=^[a-zA-Z0-9.\\-_]*$
362 Validator.HTTPQueryString=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ %]*$
363 Validator.HTTPURI=^[a-zA-Z0-9()\\-=\\*\\.\\?;,+\\/:&_ ]*$
364 Validator.HTTPURL=^.*$
365 Validator.HTTPJSESSIONID=^[A-Z0-9]{10,30}$
367 # Validation of file related input
368 Validator.FileName=^[a-zA-Z0-9!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$
369 Validator.DirectoryName=^[a-zA-Z0-9:/\\\\!@#$%^&{}\\[\\]()_+\\-=,.~'` ]{1,255}$