AppProperty.java 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. /*
  2. * Password Management Servlets (PWM)
  3. * http://www.pwm-project.org
  4. *
  5. * Copyright (c) 2006-2009 Novell, Inc.
  6. * Copyright (c) 2009-2017 The PWM Project
  7. *
  8. * This program is free software; you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation; either version 2 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  21. */
  22. package password.pwm;
  23. import java.util.ResourceBundle;
  24. /**
  25. * Definition of available PWM application properties. All {@link AppProperty} entries have a default value that is backed
  26. * by an associated {@code AppProperty.properties} file. Properties can be overridden by the application administrator in
  27. * the configuration using the setting {@link password.pwm.config.PwmSetting#APP_PROPERTY_OVERRIDES}.
  28. */
  29. public enum AppProperty {
  30. APPLICATION_FILELOCK_FILENAME ("application.fileLock.filename"),
  31. APPLICATION_FILELOCK_WAIT_SECONDS ("application.fileLock.waitSeconds"),
  32. APPLICATION_WORDLIST_RETRY_SECONDS ("application.wordlistRetryImportSeconds"),
  33. AUDIT_EVENTS_EMAILFROM ("audit.events.emailFrom"),
  34. AUDIT_EVENTS_EMAILSUBJECT ("audit.events.emailSubject"),
  35. AUDIT_EVENTS_LOCALDB_MAX_BULK_REMOVALS ("audit.events.localdb.maxBulkRemovals"),
  36. AUDIT_SYSLOG_MAX_MESSAGE_LENGTH ("audit.syslog.message.length"),
  37. AUDIT_SYSLOG_TRUNCATE_MESSAGE ("audit.syslog.message.truncateMsg"),
  38. AUDIT_CEF_MAX_MESSAGE_LENGTH ("audit.cef.message.length"),
  39. AUDIT_CEF_TRUNCATE_MESSAGE ("audit.cef.message.truncateMsg"),
  40. BACKUP_LOCATION ("backup.path"),
  41. BACKUP_CONFIG_COUNT ("backup.config.count"),
  42. BACKUP_LOCALDB_COUNT ("backup.localdb.count"),
  43. CACHE_ENABLE ("cache.enable"),
  44. CACHE_MEMORY_MAX_ITEMS ("cache.memory.maxItems"),
  45. CACHE_PWRULECHECK_LIFETIME_MS ("cache.pwRuleCheckLifetimeMS"),
  46. CACHE_FORM_UNIQUE_VALUE_LIFETIME_MS ("cache.uniqueFormValueLifetimeMS"),
  47. CLIENT_ACTIVITY_MAX_EPS_RATE ("client.ajax.activityMaxEpsRate"),
  48. CLIENT_AJAX_PW_WAIT_CHECK_SECONDS ("client.ajax.changePasswordWaitCheckSeconds"),
  49. CLIENT_AJAX_TYPING_TIMEOUT ("client.ajax.typingTimeout"),
  50. CLIENT_AJAX_TYPING_WAIT ("client.ajax.typingWait"),
  51. CLIENT_FORM_NONCE_ENABLE ("client.formNonce.enable"),
  52. CLIENT_FORM_NONCE_LENGTH ("client.formNonce.length"),
  53. CLIENT_FORM_CLIENT_REGEX_ENABLED ("client.form.clientRegexEnable"),
  54. CLIENT_WARNING_HEADER_SHOW ("client.warningHeader.show"),
  55. CLIENT_PW_SHOW_REVERT_TIMEOUT ("client.pwShowRevertTimeout"),
  56. CLIENT_JS_ENABLE_HTML5DIALOG ("client.js.enableHtml5Dialog"),
  57. CLIENT_JSP_SHOW_ICONS ("client.jsp.showIcons"),
  58. CONFIG_MAX_JDBC_JAR_SIZE ("config.maxJdbcJarSize"),
  59. CONFIG_RELOAD_ON_CHANGE ("config.reloadOnChange"),
  60. CONFIG_MAX_PERSISTENT_LOGIN_SECONDS ("config.maxPersistentLoginSeconds"),
  61. CONFIG_HISTORY_MAX_ITEMS ("config.login.history.maxEvents"),
  62. CONFIG_FILE_SCAN_FREQUENCY ("config.fileScanFrequencyMS"),
  63. CONFIG_NEWUSER_PASSWORD_POLICY_CACHE_MS ("config.newuser.passwordPolicyCacheMS"),
  64. CONFIG_THEME ("config.theme"),
  65. CONFIG_JBCRYPT_PWLIB_ENABLE ("config.enableJbCryptPwLibrary"),
  66. CONFIG_EDITOR_QUERY_FILTER_TEST_LIMIT ("configEditor.queryFilter.testLimit"),
  67. CONFIG_EDITOR_IDLE_TIMEOUT ("configEditor.idleTimeoutSeconds"),
  68. CONFIG_GUIDE_IDLE_TIMEOUT ("configGuide.idleTimeoutSeconds"),
  69. CONFIG_MANAGER_ZIPDEBUG_MAXLOGLINES ("configManager.zipDebug.maxLogLines"),
  70. CONFIG_MANAGER_ZIPDEBUG_MAXLOGSECONDS ("configManager.zipDebug.maxLogSeconds"),
  71. CLUSTER_DB_ENABLE ("cluster.db.enable"),
  72. CLUSTER_DB_HEARTBEAT_SECONDS ("cluster.db.heartbeatSeconds"),
  73. CLUSTER_DB_NODE_TIMEOUT_SECONDS ("cluster.db.nodeTimeoutSeconds"),
  74. CLUSTER_DB_NODE_PURGE_SECONDS ("cluster.db.nodePurgeSeconds"),
  75. DB_JDBC_LOAD_STRATEGY ("db.jdbcLoadStrategy"),
  76. DB_CONNECTIONS_MAX ("db.connections.max"),
  77. DB_CONNECTIONS_TIMEOUT_MS ("db.connections.timeoutMs"),
  78. DB_CONNECTIONS_WATCHDOG_FREQUENCY_SECONDS ("db.connections.watchdogFrequencySeconds"),
  79. DB_SCHEMA_KEY_LENGTH ("db.schema.keyLength"),
  80. DOWNLOAD_FILENAME_STATISTICS_CSV ("download.filename.statistics.csv"),
  81. DOWNLOAD_FILENAME_USER_REPORT_SUMMARY_CSV ("download.filename.reportSummary.csv"),
  82. DOWNLOAD_FILENAME_USER_REPORT_RECORDS_CSV ("download.filename.reportRecords.csv"),
  83. DOWNLOAD_FILENAME_AUDIT_RECORDS_CSV ("download.filename.auditRecords.csv"),
  84. DOWNLOAD_FILENAME_LDAP_PERMISSION_CSV ("download.filename.ldapPermission.csv"),
  85. DOWNLOAD_FILENAME_USER_DEBUG_JSON ("download.filename.userDebug.json"),
  86. FORM_EMAIL_REGEX ("form.email.regexTest"),
  87. HTTP_RESOURCES_MAX_CACHE_ITEMS ("http.resources.maxCacheItems"),
  88. HTTP_RESOURCES_MAX_CACHE_BYTES ("http.resources.maxCacheBytes"),
  89. HTTP_RESOURCES_EXPIRATION_SECONDS ("http.resources.expirationSeconds"),
  90. HTTP_RESOURCES_ENABLE_GZIP ("http.resources.gzip.enable"),
  91. HTTP_RESOURCES_PATH_NONCE_LENGTH ("http.resources.pathNonce.length"),
  92. HTTP_RESOURCES_ENABLE_PATH_NONCE ("http.resources.pathNonceEnable"),
  93. HTTP_RESOURCES_NONCE_PATH_PREFIX ("http.resources.pathNoncePrefix"),
  94. HTTP_RESOURCES_ZIP_FILES ("http.resources.zipFiles"),
  95. HTTP_COOKIE_DEFAULT_SECURE_FLAG ("http.cookie.default.secureFlag"),
  96. HTTP_COOKIE_THEME_NAME ("http.cookie.theme.name"),
  97. HTTP_COOKIE_THEME_AGE ("http.cookie.theme.age"),
  98. HTTP_COOKIE_LOCALE_NAME ("http.cookie.locale.name"),
  99. HTTP_COOKIE_AUTHRECORD_NAME ("http.cookie.authRecord.name"),
  100. HTTP_COOKIE_AUTHRECORD_AGE ("http.cookie.authRecord.age"),
  101. HTTP_COOKIE_MAX_READ_LENGTH ("http.cookie.maxReadLength"),
  102. HTTP_COOKIE_CAPTCHA_SKIP_NAME ("http.cookie.captchaSkip.name"),
  103. HTTP_COOKIE_CAPTCHA_SKIP_AGE ("http.cookie.captchaSkip.age"),
  104. HTTP_COOKIE_LOGIN_NAME ("http.cookie.login.name"),
  105. HTTP_BASIC_AUTH_CHARSET ("http.basicAuth.charset"),
  106. HTTP_BODY_MAXREAD_LENGTH ("http.body.maxReadLength"),
  107. HTTP_CLIENT_SOCKET_TIMEOUT_MS ("http.client.socketTimeoutMs"),
  108. HTTP_CLIENT_CONNECT_TIMEOUT_MS ("http.client.connectTimeoutMs"),
  109. HTTP_CLIENT_REQUEST_TIMEOUT_MS ("http.client.requestTimeoutMs"),
  110. HTTP_CLIENT_PROMISCUOUS_WORDLIST_ENABLE ("http.client.promiscuous.wordlist.enable"),
  111. HTTP_ENABLE_GZIP ("http.gzip.enable"),
  112. HTTP_ERRORS_ALLOW_HTML ("http.errors.allowHtml"),
  113. HTTP_HEADER_SERVER ("http.header.server"),
  114. HTTP_HEADER_SEND_CONTENT_LANGUAGE ("http.header.sendContentLanguage"),
  115. HTTP_HEADER_SEND_XAMB ("http.header.sendXAmb"),
  116. HTTP_HEADER_SEND_XINSTANCE ("http.header.sendXInstance"),
  117. HTTP_HEADER_SEND_XNOISE ("http.header.sendXNoise"),
  118. HTTP_HEADER_SEND_XSESSIONID ("http.header.sendXSessionID"),
  119. HTTP_HEADER_SEND_XVERSION ("http.header.sendXVersion"),
  120. HTTP_HEADER_SEND_XCONTENTTYPEOPTIONS ("http.header.sendXContentTypeOptions"),
  121. HTTP_HEADER_SEND_XXSSPROTECTION ("http.header.sendXXSSProtection"),
  122. HTTP_HEADER_NOISE_LENGTH ("http.header.noise.length"),
  123. HTTP_HEADER_CSP_NONCE_BYTES ("http.header.csp.nonce.bytes"),
  124. HTTP_PARAM_NAME_FORWARD_URL ("http.parameter.forward"),
  125. HTTP_PARAM_NAME_LOGOUT_URL ("http.parameter.logout"),
  126. HTTP_PARAM_NAME_THEME ("http.parameter.theme"),
  127. HTTP_PARAM_NAME_LOCALE ("http.parameter.locale"),
  128. HTTP_PARAM_NAME_PASSWORD_EXPIRED ("http.parameter.passwordExpired"),
  129. HTTP_PARAM_NAME_SSO_OVERRIDE ("http.parameter.ssoOverride"),
  130. HTTP_PARAM_MAX_READ_LENGTH ("http.parameter.maxReadLength"),
  131. HTTP_PARAM_SESSION_VERIFICATION ("http.parameter.sessionVerification"),
  132. HTTP_PARAM_OAUTH_ACCESS_TOKEN ("http.parameter.oauth.accessToken"),
  133. HTTP_PARAM_OAUTH_ATTRIBUTES ("http.parameter.oauth.attributes"),
  134. HTTP_PARAM_OAUTH_CLIENT_ID ("http.parameter.oauth.clientID"),
  135. HTTP_PARAM_OAUTH_CODE ("http.parameter.oauth.code"),
  136. HTTP_PARAM_OAUTH_EXPIRES ("http.parameter.oauth.expires"),
  137. HTTP_PARAM_OAUTH_RESPONSE_TYPE ("http.parameter.oauth.responseType"),
  138. HTTP_PARAM_OAUTH_REDIRECT_URI ("http.parameter.oauth.redirectUri"),
  139. HTTP_PARAM_OAUTH_REFRESH_TOKEN ("http.parameter.oauth.refreshToken"),
  140. HTTP_PARAM_OAUTH_STATE ("http.parameter.oauth.state"),
  141. HTTP_PARAM_OAUTH_GRANT_TYPE ("http.parameter.oauth.grantType"),
  142. HTTP_DOWNLOAD_BUFFER_SIZE ("http.download.buffer.size"),
  143. HTTP_SESSION_RECYCLE_AT_AUTH ("http.session.recycleAtAuth"),
  144. HTTP_SESSION_VALIDATION_KEY_LENGTH ("http.session.validationKeyLength"),
  145. HTTP_SERVLET_ENABLE_POST_REDIRECT_GET ("http.servlet.enablePostRedirectGet"),
  146. LOCALDB_AGGRESSIVE_COMPACT_ENABLED ("localdb.aggressiveCompact.enabled"),
  147. LOCALDB_IMPLEMENTATION ("localdb.implementation"),
  148. LOCALDB_INIT_STRING ("localdb.initParameters"),
  149. LOCALDB_LOCATION ("localdb.location"),
  150. LOCALDB_LOGWRITER_BUFFER_SIZE ("localdb.logWriter.bufferSize"),
  151. LOCALDB_LOGWRITER_MAX_BUFFER_WAIT_MS ("localdb.logWriter.maxBufferWaitMs"),
  152. LOCALDB_LOGWRITER_MAX_TRIM_SIZE ("localdb.logWriter.maxTrimSize"),
  153. MACRO_RANDOM_CHAR_MAX_LENGTH ("macro.randomChar.maxLength"),
  154. MACRO_LDAP_ATTR_CHAR_MAX_LENGTH ("macro.ldapAttr.maxLength"),
  155. /** Time intruder records exist in the intruder table before being deleted. */
  156. INTRUDER_RETENTION_TIME_MS ("intruder.retentionTimeMS"),
  157. /** How often to cleanup the intruder table. */
  158. INTRUDER_CLEANUP_FREQUENCY_MS ("intruder.cleanupFrequencyMS"),
  159. INTRUDER_MIN_DELAY_PENALTY_MS ("intruder.minimumDelayPenaltyMS"),
  160. INTRUDER_MAX_DELAY_PENALTY_MS ("intruder.maximumDelayPenaltyMS"),
  161. INTRUDER_DELAY_PER_COUNT_MS ("intruder.delayPerCountMS"),
  162. INTRUDER_DELAY_MAX_JITTER_MS ("intruder.delayMaxJitterMS"),
  163. HEALTHCHECK_ENABLED ("healthCheck.enabled"),
  164. HEALTHCHECK_NOMINAL_CHECK_INTERVAL ("healthCheck.nominalCheckIntervalSeconds"),
  165. HEALTHCHECK_MIN_CHECK_INTERVAL ("healthCheck.minimumCheckIntervalSeconds"),
  166. HEALTHCHECK_MAX_RECORD_AGE ("healthCheck.maximumRecordAgeSeconds"),
  167. HEALTHCHECK_MAX_FORCE_WAIT ("healthCheck.maximumForceCheckWaitSeconds"),
  168. HEALTH_CERTIFICATE_WARN_SECONDS ("health.certificate.warnSeconds"),
  169. HEALTH_LDAP_CAUTION_DURATION_MS ("health.ldap.cautionDurationMS"),
  170. HEALTH_JAVA_MAX_THREADS ("health.java.maxThreads"),
  171. HEALTH_JAVA_MIN_HEAP_BYTES ("health.java.minHeapBytes"),
  172. HELPDESK_TOKEN_MAX_AGE ("helpdesk.token.maxAgeSeconds"),
  173. HELPDESK_TOKEN_VALUE ("helpdesk.token.value"),
  174. HELPDESK_VERIFICATION_INVALID_DELAY_MS ("helpdesk.verification.invalid.delayMs"),
  175. HELPDESK_VERIFICATION_TIMEOUT_SECONDS ("helpdesk.verification.timeoutSeconds"),
  176. LDAP_RESOLVE_CANONICAL_DN ("ldap.resolveCanonicalDN"),
  177. LDAP_CACHE_CANONICAL_ENABLE ("ldap.cache.canonical.enable"),
  178. LDAP_CACHE_CANONICAL_SECONDS ("ldap.cache.canonical.seconds"),
  179. LDAP_CACHE_USER_GUID_ENABLE ("ldap.cache.userGuid.enable"),
  180. LDAP_CACHE_USER_GUID_SECONDS ("ldap.cache.userGuid.seconds"),
  181. LDAP_CHAI_SETTINGS ("ldap.chaiSettings"),
  182. LDAP_PROXY_CONNECTION_PER_PROFILE ("ldap.proxy.connectionsPerProfile"),
  183. LDAP_PROXY_MAX_CONNECTIONS ("ldap.proxy.maxConnections"),
  184. LDAP_EXTENSIONS_NMAS_ENABLE ("ldap.extensions.nmas.enable"),
  185. LDAP_CONNECTION_TIMEOUT ("ldap.connection.timeoutMS"),
  186. LDAP_PROFILE_RETRY_DELAY ("ldap.profile.retryDelayMS"),
  187. LDAP_PROMISCUOUS_ENABLE ("ldap.promiscuousEnable"),
  188. LDAP_PASSWORD_REPLICA_CHECK_INIT_DELAY_MS ("ldap.password.replicaCheck.initialDelayMS"),
  189. LDAP_PASSWORD_REPLICA_CHECK_CYCLE_DELAY_MS ("ldap.password.replicaCheck.cycleDelayMS"),
  190. LDAP_PASSWORD_CHANGE_SELF_ENABLE ("ldap.password.change.self.enable"),
  191. LDAP_PASSWORD_CHANGE_HELPDESK_ENABLE ("ldap.password.change.helpdesk.enable"),
  192. LDAP_GUID_PATTERN ("ldap.guid.pattern"),
  193. LDAP_BROWSER_MAX_ENTRIES ("ldap.browser.maxEntries"),
  194. LDAP_SEARCH_PAGING_ENABLE ("ldap.search.paging.enable"),
  195. LDAP_SEARCH_PAGING_SIZE ("ldap.search.paging.size"),
  196. LDAP_SEARCH_PARALLEL_ENABLE ("ldap.search.parallel.enable"),
  197. LDAP_SEARCH_PARALLEL_FACTOR ("ldap.search.parallel.factor"),
  198. LDAP_SEARCH_PARALLEL_THREAD_MAX ("ldap.search.parallel.threadMax"),
  199. LDAP_ORACLE_POST_TEMPPW_USE_CURRENT_TIME ("ldap.oracle.postTempPasswordUseCurrentTime"),
  200. LOGGING_PATTERN ("logging.pattern"),
  201. LOGGING_FILE_MAX_SIZE ("logging.file.maxSize"),
  202. LOGGING_FILE_MAX_ROLLOVER ("logging.file.maxRollover"),
  203. LOGGING_FILE_PATH ("logging.file.path"),
  204. LOGGING_DEV_OUTPUT ("logging.devOutput.enable"),
  205. NEWUSER_LDAP_USE_TEMP_PW ("newUser.ldap.useTempPassword"),
  206. NEWUSER_TOKEN_ALLOW_PLAIN_PW ("newUser.token.allowPlainPassword"),
  207. NMAS_THREADS_MAX_COUNT ("nmas.threads.maxCount"),
  208. NMAS_THREADS_MIN_SECONDS ("nmas.threads.minSeconds"),
  209. NMAS_THREADS_MAX_SECONDS ("nmas.threads.maxSeconds"),
  210. NMAS_THREADS_WATCHDOG_FREQUENCY ("nmas.threads.watchdogFrequencyMs"),
  211. NMAS_THREADS_WATCHDOG_DEBUG ("nmas.threads.watchdogDebug"),
  212. NMAS_IGNORE_NMASCR_DURING_FORCECHECK ("nmas.ignoreNmasCrDuringForceSetupCheck"),
  213. NMAS_USE_LOCAL_SASL_FACTORY ("nmas.useLocalSaslFactory"),
  214. NMAS_FORCE_SASL_FACTORY_REGISTRATION ("nmas.forceSaslFactoryRegistration"),
  215. OAUTH_ID_REQUEST_TYPE ("oauth.id.requestType"),
  216. OAUTH_ID_ACCESS_GRANT_TYPE ("oauth.id.accessGrantType"),
  217. OAUTH_ID_REFRESH_GRANT_TYPE ("oauth.id.refreshGrantType"),
  218. OAUTH_ENABLE_TOKEN_REFRESH ("oauth.enableTokenRefresh"),
  219. OAUTH_RETURN_URL_OVERRIDE ("oauth.returnUrlOverride"),
  220. /* Allows one older TOTP token - compensate for clock out of sync */
  221. TOTP_PAST_INTERVALS ("otp.totp.pastIntervals"),
  222. /* Allows one newer TOTP token - compensate for clock out of sync */
  223. TOTP_FUTURE_INTERVALS ("otp.totp.futureIntervals"),
  224. TOTP_INTERVAL ("otp.totp.intervalSeconds"),
  225. OTP_TOKEN_LENGTH ("otp.token.length"),
  226. OTP_SALT_CHARLENGTH ("otp.salt.charLength"),
  227. OTP_RECOVERY_TOKEN_MACRO ("otp.recovery.macro"),
  228. OTP_RECOVERY_HASH_COUNT ("otp.recoveryHash.iterations"),
  229. OTP_RECOVERY_HASH_METHOD ("otp.recoveryHash.method"),
  230. OTP_QR_IMAGE_HEIGHT ("otp.qrImage.height"),
  231. OTP_QR_IMAGE_WIDTH ("otp.qrImage.width"),
  232. OTP_ENCRYPTION_ALG ("otp.encryptionAlg"),
  233. PASSWORD_RANDOMGEN_MAX_ATTEMPTS ("password.randomGenerator.maxAttempts"),
  234. PASSWORD_RANDOMGEN_MAX_LENGTH ("password.randomGenerator.maxLength"),
  235. PASSWORD_RANDOMGEN_JITTER_COUNT ("password.randomGenerator.jitter.count"),
  236. PEOPLESEARCH_MAX_VALUE_VERIFYUSERDN ("peoplesearch.values.verifyUserDN"),
  237. PEOPLESEARCH_VALUE_MAXCOUNT ("peoplesearch.values.maxCount"),
  238. PEOPLESEARCH_VIEW_DETAIL_LINKS ("peoplesearch.view.detail.links"),
  239. PEOPLESEARCH_ORGCHART_ENABLE_CHILD_COUNT ("peoplesearch.orgChart.enableChildCount"),
  240. PEOPLESEARCH_ORGCHART_MAX_PARENTS ("peoplesearch.orgChart.maxParents"),
  241. QUEUE_EMAIL_RETRY_TIMEOUT_MS ("queue.email.retryTimeoutMs"),
  242. QUEUE_EMAIL_MAX_COUNT ("queue.email.maxCount"),
  243. QUEUE_EMAIL_MAX_THREADS ("queue.email.maxThreads"),
  244. QUEUE_SMS_RETRY_TIMEOUT_MS ("queue.sms.retryTimeoutMs"),
  245. QUEUE_SMS_MAX_COUNT ("queue.sms.maxCount"),
  246. QUEUE_SYSLOG_RETRY_TIMEOUT_MS ("queue.syslog.retryTimeoutMs"),
  247. QUEUE_SYSLOG_MAX_AGE_MS ("queue.syslog.maxAgeMs"),
  248. QUEUE_SYSLOG_MAX_COUNT ("queue.syslog.maxCount"),
  249. RECAPTCHA_CLIENT_JS_URL ("recaptcha.clientJsUrl"),
  250. RECAPTCHA_CLIENT_IFRAME_URL ("recaptcha.clientIframeUrl"),
  251. RECAPTCHA_VALIDATE_URL ("recaptcha.validateUrl"),
  252. REPORTING_LDAP_SEARCH_TIMEOUT ("reporting.ldap.searchTimeoutMs"),
  253. REPORTING_LDAP_SEARCH_THREADS ("reporting.ldap.searchThreads"),
  254. SECURITY_STRIP_INLINE_JAVASCRIPT ("security.html.stripInlineJavascript"),
  255. SECURITY_HTTP_FORCE_REQUEST_SEQUENCING ("security.http.forceRequestSequencing"),
  256. SECURITY_HTTP_STRIP_HEADER_REGEX ("security.http.stripHeaderRegex"),
  257. SECURITY_HTTP_PERFORM_CSRF_HEADER_CHECKS ("security.http.performCsrfHeaderChecks"),
  258. SECURITY_HTTP_PROMISCUOUS_ENABLE ("security.http.promiscuousEnable"),
  259. SECURITY_HTTP_CONFIG_CSP_HEADER ("security.http.config.cspHeader"),
  260. SECURITY_HTTPSSERVER_SELF_FUTURESECONDS ("security.httpsServer.selfCert.futureSeconds"),
  261. SECURITY_HTTPSSERVER_SELF_ALG ("security.httpsServer.selfCert.alg"),
  262. SECURITY_HTTPSSERVER_SELF_KEY_SIZE ("security.httpsServer.selfCert.keySize"),
  263. SECURITY_LOGIN_HIDDEN_ERROR_TYPES ("security.login.hiddenErrorTypes"),
  264. SECURITY_RESPONSES_HASH_ITERATIONS ("security.responses.hashIterations"),
  265. SECURITY_INPUT_TRIM ("security.input.trim"),
  266. SECURITY_INPUT_PASSWORD_TRIM ("security.input.password.trim"),
  267. SECURITY_INPUT_THEME_MATCH_REGEX ("security.input.themeMatchRegex"),
  268. SECURITY_WS_REST_SERVER_SECRET_HEADER ("security.ws.rest.server.secretKeyHeader"),
  269. SECURITY_SHAREDHISTORY_HASH_ITERATIONS ("security.sharedHistory.hashIterations"),
  270. SECURITY_SHAREDHISTORY_HASH_NAME ("security.sharedHistory.hashName"),
  271. SECURITY_SHAREDHISTORY_CASE_INSENSITIVE ("security.sharedHistory.caseInsensitive"),
  272. SECURITY_SHAREDHISTORY_SALT_LENGTH ("security.sharedHistory.saltLength"),
  273. SECURITY_CERTIFICATES_VALIDATE_TIMESTAMPS ("security.certs.validateTimestamps"),
  274. SECURITY_CONFIG_MIN_SECURITY_KEY_LENGTH ("security.config.minSecurityKeyLength"),
  275. SECURITY_DEFAULT_EPHEMERAL_BLOCK_ALG ("security.defaultEphemeralBlockAlg"),
  276. SECURITY_DEFAULT_EPHEMERAL_HASH_ALG ("security.defaultEphemeralHashAlg"),
  277. SEEDLIST_BUILTIN_PATH ("seedlist.builtin.path"),
  278. SMTP_SUBJECT_ENCODING_CHARSET ("smtp.subjectEncodingCharset"),
  279. TOKEN_CLEANER_INTERVAL_SECONDS ("token.cleaner.intervalSeconds"),
  280. TOKEN_MASK_EMAIL_REGEX ("token.mask.email.regex"),
  281. TOKEN_MASK_EMAIL_REPLACE ("token.mask.email.replace"),
  282. TOKEN_MASK_SHOW_SELECTION ("token.mask.showSelection"),
  283. TOKEN_MASK_SMS_REGEX ("token.mask.sms.regex"),
  284. TOKEN_MASK_SMS_REPLACE ("token.mask.sms.replace"),
  285. TOKEN_MAX_UNIQUE_CREATE_ATTEMPTS ("token.maxUniqueCreateAttempts"),
  286. TOKEN_RESEND_DELAY_MS ("token.resend.delayMS"),
  287. TOKEN_REMOVE_ON_CLAIM ("token.removeOnClaim"),
  288. TOKEN_VERIFY_PW_MODIFY_TIME ("token.verifyPwModifyTime"),
  289. TOKEN_STORAGE_MAX_KEY_LENGTH ("token.storage.maxKeyLength"),
  290. TELEMETRY_SENDER_IMPLEMENTATION ("telemetry.senderImplementation"),
  291. TELEMETRY_SENDER_SETTINGS ("telemetry.senderSettings"),
  292. TELEMETRY_SEND_FREQUENCY_SECONDS ("telemetry.sendFrequencySeconds"),
  293. TELEMETRY_MIN_AUTHENTICATIONS ("telemetry.minimumAuthentications"),
  294. /** Regular expression to be used for matching URLs to be shortened by the URL Shortening Service Class. */
  295. URL_SHORTNER_URL_REGEX ("urlshortener.url.regex"),
  296. WORDLIST_BUILTIN_PATH ("wordlist.builtin.path"),
  297. WORDLIST_CHAR_LENGTH_MAX ("wordlist.maxCharLength"),
  298. WORDLIST_CHAR_LENGTH_MIN ("wordlist.minCharLength"),
  299. WS_REST_CLIENT_PWRULE_HALTONERROR ("ws.restClient.pwRule.haltOnError"),
  300. WS_REST_SERVER_SIGNING_FORM_TIMEOUT_SECONDS ("ws.restServer.signing.form.timeoutSeconds"),
  301. ALLOW_MACRO_IN_REGEX_SETTING ("password.policy.allowMacroInRegexSetting"),
  302. ;
  303. public static final String VALUE_SEPARATOR = ";;;";
  304. private static final String DESCRIPTION_SUFFIX = "_description";
  305. private final String key;
  306. private String defaultValue;
  307. AppProperty(final String key) {
  308. this.key = key;
  309. }
  310. public String getKey() {
  311. return key;
  312. }
  313. public static AppProperty forKey(final String key) {
  314. for (final AppProperty appProperty : AppProperty.values()) {
  315. if (appProperty.getKey().equals(key)) {
  316. return appProperty;
  317. }
  318. }
  319. return null;
  320. }
  321. public String getDefaultValue() {
  322. if (defaultValue == null) {
  323. defaultValue = readAppPropertiesBundle(this.getKey());
  324. }
  325. return defaultValue;
  326. }
  327. public String getDescription() {
  328. return readAppPropertiesBundle(this.getKey() + DESCRIPTION_SUFFIX);
  329. }
  330. private static String readAppPropertiesBundle(final String key) {
  331. return ResourceBundle.getBundle(AppProperty.class.getName()).getString(key);
  332. }
  333. }