Debian Codegraph @

src/test/resources/esapi/ESAPI.properties

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