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