Debian Codegraph @

configuration/esapi/ESAPI.properties

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