AppProperty.java 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413
  1. /*
  2. * Password Management Servlets (PWM)
  3. * http://www.pwm-project.org
  4. *
  5. * Copyright (c) 2006-2009 Novell, Inc.
  6. * Copyright (c) 2009-2018 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. {
  31. ACTIVATE_USER_TOKEN_AUTO_SELECT_DEST ( "activateUser.token.autoSelectSingleDestination" ),
  32. APPLICATION_FILELOCK_FILENAME ( "application.fileLock.filename" ),
  33. APPLICATION_FILELOCK_WAIT_SECONDS ( "application.fileLock.waitSeconds" ),
  34. APPLICATION_READ_APP_LOCK_MAX_WAIT_MS ( "application.readAppLock.maxWaitMs" ),
  35. APPLICATION_RESTART_MAX_REQUEST_WAIT_MS ( "application.restart.maxRequestWaitMs" ),
  36. APPLICATION_WORDLIST_RETRY_SECONDS ( "application.wordlistRetryImportSeconds" ),
  37. AUDIT_EVENTS_EMAILFROM ( "audit.events.emailFrom" ),
  38. AUDIT_EVENTS_EMAILSUBJECT ( "audit.events.emailSubject" ),
  39. AUDIT_EVENTS_LOCALDB_MAX_BULK_REMOVALS ( "audit.events.localdb.maxBulkRemovals" ),
  40. AUDIT_SYSLOG_CEF_TIMEZONE ( "audit.syslog.cef.timezone" ),
  41. AUDIT_SYSLOG_CEF_HEADER_PRODUCT ( "audit.syslog.cef.header.product" ),
  42. AUDIT_SYSLOG_CEF_HEADER_SEVERITY ( "audit.syslog.cef.header.severity" ),
  43. AUDIT_SYSLOG_CEF_HEADER_VENDOR ( "audit.syslog.cef.header.vendor" ),
  44. AUDIT_SYSLOG_MAX_MESSAGE_LENGTH ( "audit.syslog.message.length" ),
  45. AUDIT_SYSLOG_TRUNCATE_MESSAGE ( "audit.syslog.message.truncateMsg" ),
  46. AUTH_ALLOW_SSO_WITH_UNKNOWN_PW ( "auth.allowSSOwithUnknownPassword" ),
  47. BACKUP_LOCATION ( "backup.path" ),
  48. BACKUP_CONFIG_COUNT ( "backup.config.count" ),
  49. BACKUP_LOCALDB_COUNT ( "backup.localdb.count" ),
  50. CACHE_ENABLE ( "cache.enable" ),
  51. CACHE_MEMORY_MAX_ITEMS ( "cache.memory.maxItems" ),
  52. CACHE_PWRULECHECK_LIFETIME_MS ( "cache.pwRuleCheckLifetimeMS" ),
  53. CACHE_FORM_UNIQUE_VALUE_LIFETIME_MS ( "cache.uniqueFormValueLifetimeMS" ),
  54. CLIENT_ACTIVITY_MAX_EPS_RATE ( "client.ajax.activityMaxEpsRate" ),
  55. CLIENT_AJAX_PW_WAIT_CHECK_SECONDS ( "client.ajax.changePasswordWaitCheckSeconds" ),
  56. CLIENT_AJAX_TYPING_TIMEOUT ( "client.ajax.typingTimeout" ),
  57. CLIENT_AJAX_TYPING_WAIT ( "client.ajax.typingWait" ),
  58. CLIENT_FORM_NONCE_ENABLE ( "client.formNonce.enable" ),
  59. CLIENT_FORM_NONCE_LENGTH ( "client.formNonce.length" ),
  60. CLIENT_FORM_CLIENT_REGEX_ENABLED ( "client.form.clientRegexEnable" ),
  61. CLIENT_WARNING_HEADER_SHOW ( "client.warningHeader.show" ),
  62. CLIENT_PW_SHOW_REVERT_TIMEOUT ( "client.pwShowRevertTimeout" ),
  63. CLIENT_JS_ENABLE_HTML5DIALOG ( "client.js.enableHtml5Dialog" ),
  64. CLIENT_JSP_SHOW_ICONS ( "client.jsp.showIcons" ),
  65. CONFIG_MAX_JDBC_JAR_SIZE ( "config.maxJdbcJarSize" ),
  66. CONFIG_RELOAD_ON_CHANGE ( "config.reloadOnChange" ),
  67. CONFIG_MAX_PERSISTENT_LOGIN_SECONDS ( "config.maxPersistentLoginSeconds" ),
  68. CONFIG_HISTORY_MAX_ITEMS ( "config.login.history.maxEvents" ),
  69. CONFIG_FILE_SCAN_FREQUENCY ( "config.fileScanFrequencyMS" ),
  70. CONFIG_NEWUSER_PASSWORD_POLICY_CACHE_MS ( "config.newuser.passwordPolicyCacheMS" ),
  71. CONFIG_THEME ( "config.theme" ),
  72. CONFIG_JBCRYPT_PWLIB_ENABLE ( "config.enableJbCryptPwLibrary" ),
  73. CONFIG_EDITOR_BLOCK_OLD_IE ( "configEditor.blockOldIE" ),
  74. CONFIG_EDITOR_QUERY_FILTER_TEST_LIMIT ( "configEditor.queryFilter.testLimit" ),
  75. CONFIG_EDITOR_IDLE_TIMEOUT ( "configEditor.idleTimeoutSeconds" ),
  76. CONFIG_GUIDE_IDLE_TIMEOUT ( "configGuide.idleTimeoutSeconds" ),
  77. CONFIG_MANAGER_ZIPDEBUG_MAXLOGBYTES ( "configManager.zipDebug.maxLogBytes" ),
  78. CONFIG_MANAGER_ZIPDEBUG_MAXLOGSECONDS ( "configManager.zipDebug.maxLogSeconds" ),
  79. CLUSTER_DB_ENABLE ( "cluster.db.enable" ),
  80. CLUSTER_DB_HEARTBEAT_SECONDS ( "cluster.db.heartbeatSeconds" ),
  81. CLUSTER_DB_NODE_TIMEOUT_SECONDS ( "cluster.db.nodeTimeoutSeconds" ),
  82. CLUSTER_DB_NODE_PURGE_SECONDS ( "cluster.db.nodePurgeSeconds" ),
  83. CLUSTER_LDAP_HEARTBEAT_SECONDS ( "cluster.ldap.heartbeatSeconds" ),
  84. CLUSTER_LDAP_NODE_TIMEOUT_SECONDS ( "cluster.ldap.nodeTimeoutSeconds" ),
  85. CLUSTER_LDAP_NODE_PURGE_SECONDS ( "cluster.ldap.nodePurgeSeconds" ),
  86. DB_JDBC_LOAD_STRATEGY ( "db.jdbcLoadStrategy" ),
  87. DB_CONNECTIONS_MAX ( "db.connections.max" ),
  88. DB_CONNECTIONS_TIMEOUT_MS ( "db.connections.timeoutMs" ),
  89. DB_CONNECTIONS_WATCHDOG_FREQUENCY_SECONDS ( "db.connections.watchdogFrequencySeconds" ),
  90. DB_INIT_HALT_ON_INDEX_CREATE_ERROR ( "db.init.haltOnIndexCreateError" ),
  91. DB_SCHEMA_KEY_LENGTH ( "db.schema.keyLength" ),
  92. DOWNLOAD_FILENAME_STATISTICS_CSV ( "download.filename.statistics.csv" ),
  93. DOWNLOAD_FILENAME_SESSIONS_CSV ( "download.filename.sessions.csv" ),
  94. DOWNLOAD_FILENAME_USER_REPORT_SUMMARY_CSV ( "download.filename.reportSummary.csv" ),
  95. DOWNLOAD_FILENAME_USER_REPORT_RECORDS_CSV ( "download.filename.reportRecords.csv" ),
  96. DOWNLOAD_FILENAME_AUDIT_RECORDS_CSV ( "download.filename.auditRecords.csv" ),
  97. DOWNLOAD_FILENAME_LDAP_PERMISSION_CSV ( "download.filename.ldapPermission.csv" ),
  98. DOWNLOAD_FILENAME_USER_DEBUG_JSON ( "download.filename.userDebug.json" ),
  99. FORGOTTEN_PASSWORD_TOKEN_AUTO_SELECT_DEST ( "forgottenPassword.token.autoSelectSingleDestination" ),
  100. FORM_EMAIL_REGEX ( "form.email.regexTest" ),
  101. HTTP_RESOURCES_MAX_CACHE_ITEMS ( "http.resources.maxCacheItems" ),
  102. HTTP_RESOURCES_MAX_CACHE_BYTES ( "http.resources.maxCacheBytes" ),
  103. HTTP_RESOURCES_EXPIRATION_SECONDS ( "http.resources.expirationSeconds" ),
  104. HTTP_RESOURCES_ENABLE_GZIP ( "http.resources.gzip.enable" ),
  105. HTTP_RESOURCES_PATH_NONCE_LENGTH ( "http.resources.pathNonce.length" ),
  106. HTTP_RESOURCES_ENABLE_PATH_NONCE ( "http.resources.pathNonceEnable" ),
  107. HTTP_RESOURCES_NONCE_PATH_PREFIX ( "http.resources.pathNoncePrefix" ),
  108. HTTP_RESOURCES_ZIP_FILES ( "http.resources.zipFiles" ),
  109. HTTP_COOKIE_DEFAULT_SECURE_FLAG ( "http.cookie.default.secureFlag" ),
  110. HTTP_COOKIE_HTTPONLY_ENABLE ( "http.cookie.httponly.enable" ),
  111. HTTP_COOKIE_THEME_NAME ( "http.cookie.theme.name" ),
  112. HTTP_COOKIE_THEME_AGE ( "http.cookie.theme.age" ),
  113. HTTP_COOKIE_LOCALE_NAME ( "http.cookie.locale.name" ),
  114. HTTP_COOKIE_AUTHRECORD_NAME ( "http.cookie.authRecord.name" ),
  115. HTTP_COOKIE_AUTHRECORD_AGE ( "http.cookie.authRecord.age" ),
  116. HTTP_COOKIE_MAX_READ_LENGTH ( "http.cookie.maxReadLength" ),
  117. HTTP_COOKIE_CAPTCHA_SKIP_NAME ( "http.cookie.captchaSkip.name" ),
  118. HTTP_COOKIE_CAPTCHA_SKIP_AGE ( "http.cookie.captchaSkip.age" ),
  119. HTTP_COOKIE_LOGIN_NAME ( "http.cookie.login.name" ),
  120. HTTP_COOKIE_NONCE_NAME ( "http.cookie.nonce.name" ),
  121. HTTP_COOKIE_NONCE_LENGTH ( "http.cookie.nonce.length" ),
  122. HTTP_COOKIE_SAMESITE_VALUE ( "http.cookie.sameSite.value" ),
  123. HTTP_BASIC_AUTH_CHARSET ( "http.basicAuth.charset" ),
  124. HTTP_BODY_MAXREAD_LENGTH ( "http.body.maxReadLength" ),
  125. HTTP_CLIENT_ALWAYS_LOG_ENTITIES ( "http.client.alwaysLogEntities" ),
  126. HTTP_CLIENT_SOCKET_TIMEOUT_MS ( "http.client.socketTimeoutMs" ),
  127. HTTP_CLIENT_CONNECT_TIMEOUT_MS ( "http.client.connectTimeoutMs" ),
  128. HTTP_CLIENT_REQUEST_TIMEOUT_MS ( "http.client.requestTimeoutMs" ),
  129. HTTP_CLIENT_ENABLE_HOSTNAME_VERIFICATION ( "http.client.enableHostnameVerification" ),
  130. HTTP_CLIENT_PROMISCUOUS_WORDLIST_ENABLE ( "http.client.promiscuous.wordlist.enable" ),
  131. HTTP_ENABLE_GZIP ( "http.gzip.enable" ),
  132. HTTP_ERRORS_ALLOW_HTML ( "http.errors.allowHtml" ),
  133. HTTP_HEADER_SERVER ( "http.header.server" ),
  134. HTTP_HEADER_SEND_CONTENT_LANGUAGE ( "http.header.sendContentLanguage" ),
  135. HTTP_HEADER_SEND_XAMB ( "http.header.sendXAmb" ),
  136. HTTP_HEADER_SEND_XINSTANCE ( "http.header.sendXInstance" ),
  137. HTTP_HEADER_SEND_XNOISE ( "http.header.sendXNoise" ),
  138. HTTP_HEADER_SEND_XSESSIONID ( "http.header.sendXSessionID" ),
  139. HTTP_HEADER_SEND_XVERSION ( "http.header.sendXVersion" ),
  140. HTTP_HEADER_SEND_XCONTENTTYPEOPTIONS ( "http.header.sendXContentTypeOptions" ),
  141. HTTP_HEADER_SEND_XXSSPROTECTION ( "http.header.sendXXSSProtection" ),
  142. HTTP_HEADER_NOISE_LENGTH ( "http.header.noise.length" ),
  143. HTTP_HEADER_CSP_NONCE_BYTES ( "http.header.csp.nonce.bytes" ),
  144. HTTP_PARAM_NAME_FORWARD_URL ( "http.parameter.forward" ),
  145. HTTP_PARAM_NAME_LOGOUT_URL ( "http.parameter.logout" ),
  146. HTTP_PARAM_NAME_THEME ( "http.parameter.theme" ),
  147. HTTP_PARAM_NAME_LOCALE ( "http.parameter.locale" ),
  148. HTTP_PARAM_NAME_PASSWORD_EXPIRED ( "http.parameter.passwordExpired" ),
  149. HTTP_PARAM_NAME_SSO_OVERRIDE ( "http.parameter.ssoOverride" ),
  150. HTTP_PARAM_MAX_READ_LENGTH ( "http.parameter.maxReadLength" ),
  151. HTTP_PARAM_SESSION_VERIFICATION ( "http.parameter.sessionVerification" ),
  152. HTTP_PARAM_OAUTH_ACCESS_TOKEN ( "http.parameter.oauth.accessToken" ),
  153. HTTP_PARAM_OAUTH_ATTRIBUTES ( "http.parameter.oauth.attributes" ),
  154. HTTP_PARAM_OAUTH_CLIENT_ID ( "http.parameter.oauth.clientID" ),
  155. HTTP_PARAM_OAUTH_CLIENT_SECRET ( "http.parameter.oauth.clientSecret" ),
  156. HTTP_PARAM_OAUTH_CODE ( "http.parameter.oauth.code" ),
  157. HTTP_PARAM_OAUTH_EXPIRES ( "http.parameter.oauth.expires" ),
  158. HTTP_PARAM_OAUTH_RESPONSE_TYPE ( "http.parameter.oauth.responseType" ),
  159. HTTP_PARAM_OAUTH_REDIRECT_URI ( "http.parameter.oauth.redirectUri" ),
  160. HTTP_PARAM_OAUTH_REFRESH_TOKEN ( "http.parameter.oauth.refreshToken" ),
  161. HTTP_PARAM_OAUTH_SCOPE ( "http.parameter.oauth.scope" ),
  162. HTTP_PARAM_OAUTH_STATE ( "http.parameter.oauth.state" ),
  163. HTTP_PARAM_OAUTH_GRANT_TYPE ( "http.parameter.oauth.grantType" ),
  164. HTTP_DOWNLOAD_BUFFER_SIZE ( "http.download.buffer.size" ),
  165. HTTP_SESSION_RECYCLE_AT_AUTH ( "http.session.recycleAtAuth" ),
  166. HTTP_SERVLET_ENABLE_POST_REDIRECT_GET ( "http.servlet.enablePostRedirectGet" ),
  167. L10N_RTL_REGEX ( "l10n.rtl.regex" ),
  168. LOCALDB_AGGRESSIVE_COMPACT_ENABLED ( "localdb.aggressiveCompact.enabled" ),
  169. LOCALDB_IMPLEMENTATION ( "localdb.implementation" ),
  170. LOCALDB_INIT_STRING ( "localdb.initParameters" ),
  171. LOCALDB_LOCATION ( "localdb.location" ),
  172. LOCALDB_LOGWRITER_BUFFER_SIZE ( "localdb.logWriter.bufferSize" ),
  173. LOCALDB_LOGWRITER_MAX_BUFFER_WAIT_MS ( "localdb.logWriter.maxBufferWaitMs" ),
  174. LOCALDB_LOGWRITER_MAX_TRIM_SIZE ( "localdb.logWriter.maxTrimSize" ),
  175. MACRO_RANDOM_CHAR_MAX_LENGTH ( "macro.randomChar.maxLength" ),
  176. MACRO_LDAP_ATTR_CHAR_MAX_LENGTH ( "macro.ldapAttr.maxLength" ),
  177. /** Time intruder records exist in the intruder table before being deleted. */
  178. INTRUDER_RETENTION_TIME_MS ( "intruder.retentionTimeMS" ),
  179. /** How often to cleanup the intruder table. */
  180. INTRUDER_CLEANUP_FREQUENCY_MS ( "intruder.cleanupFrequencyMS" ),
  181. INTRUDER_MIN_DELAY_PENALTY_MS ( "intruder.minimumDelayPenaltyMS" ),
  182. INTRUDER_MAX_DELAY_PENALTY_MS ( "intruder.maximumDelayPenaltyMS" ),
  183. INTRUDER_DELAY_PER_COUNT_MS ( "intruder.delayPerCountMS" ),
  184. INTRUDER_DELAY_MAX_JITTER_MS ( "intruder.delayMaxJitterMS" ),
  185. HEALTHCHECK_ENABLED ( "healthCheck.enabled" ),
  186. HEALTHCHECK_NOMINAL_CHECK_INTERVAL ( "healthCheck.nominalCheckIntervalSeconds" ),
  187. HEALTHCHECK_MIN_CHECK_INTERVAL ( "healthCheck.minimumCheckIntervalSeconds" ),
  188. HEALTHCHECK_MAX_RECORD_AGE ( "healthCheck.maximumRecordAgeSeconds" ),
  189. HEALTHCHECK_MAX_FORCE_WAIT ( "healthCheck.maximumForceCheckWaitSeconds" ),
  190. HEALTH_SUPPORT_BUNDLE_WRITE_INTERVAL_SECONDS ( "health.supportBundle.file.writeIntervalSeconds" ),
  191. HEALTH_SUPPORT_BUNDLE_FILE_WRITE_COUNT ( "health.supportBundle.file.writeRetentionCount" ),
  192. HEALTH_CERTIFICATE_WARN_SECONDS ( "health.certificate.warnSeconds" ),
  193. HEALTH_LDAP_CAUTION_DURATION_MS ( "health.ldap.cautionDurationMS" ),
  194. HEALTH_LDAP_PROXY_WARN_PW_EXPIRE_SECONDS ( "health.ldap.proxy.pwExpireWarnSeconds" ),
  195. HEALTH_JAVA_MAX_THREADS ( "health.java.maxThreads" ),
  196. HEALTH_JAVA_MIN_HEAP_BYTES ( "health.java.minHeapBytes" ),
  197. HELPDESK_TOKEN_MAX_AGE ( "helpdesk.token.maxAgeSeconds" ),
  198. HELPDESK_TOKEN_VALUE ( "helpdesk.token.value" ),
  199. HELPDESK_VERIFICATION_INVALID_DELAY_MS ( "helpdesk.verification.invalid.delayMs" ),
  200. HELPDESK_VERIFICATION_TIMEOUT_SECONDS ( "helpdesk.verification.timeoutSeconds" ),
  201. LDAP_RESOLVE_CANONICAL_DN ( "ldap.resolveCanonicalDN" ),
  202. LDAP_CACHE_CANONICAL_ENABLE ( "ldap.cache.canonical.enable" ),
  203. LDAP_CACHE_CANONICAL_SECONDS ( "ldap.cache.canonical.seconds" ),
  204. LDAP_CACHE_USER_GUID_ENABLE ( "ldap.cache.userGuid.enable" ),
  205. LDAP_CACHE_USER_GUID_SECONDS ( "ldap.cache.userGuid.seconds" ),
  206. LDAP_CHAI_SETTINGS ( "ldap.chaiSettings" ),
  207. LDAP_PROXY_CONNECTION_PER_PROFILE ( "ldap.proxy.connectionsPerProfile" ),
  208. LDAP_PROXY_MAX_CONNECTIONS ( "ldap.proxy.maxConnections" ),
  209. LDAP_PROXY_USE_THREAD_LOCAL ( "ldap.proxy.useThreadLocal" ),
  210. LDAP_EXTENSIONS_NMAS_ENABLE ( "ldap.extensions.nmas.enable" ),
  211. LDAP_CONNECTION_TIMEOUT ( "ldap.connection.timeoutMS" ),
  212. LDAP_PROFILE_RETRY_DELAY ( "ldap.profile.retryDelayMS" ),
  213. LDAP_PROMISCUOUS_ENABLE ( "ldap.promiscuousEnable" ),
  214. LDAP_PASSWORD_REPLICA_CHECK_INIT_DELAY_MS ( "ldap.password.replicaCheck.initialDelayMS" ),
  215. LDAP_PASSWORD_REPLICA_CHECK_CYCLE_DELAY_MS ( "ldap.password.replicaCheck.cycleDelayMS" ),
  216. LDAP_PASSWORD_CHANGE_SELF_ENABLE ( "ldap.password.change.self.enable" ),
  217. LDAP_PASSWORD_CHANGE_HELPDESK_ENABLE ( "ldap.password.change.helpdesk.enable" ),
  218. LDAP_GUID_PATTERN ( "ldap.guid.pattern" ),
  219. LDAP_BROWSER_MAX_ENTRIES ( "ldap.browser.maxEntries" ),
  220. LDAP_SEARCH_PAGING_ENABLE ( "ldap.search.paging.enable" ),
  221. LDAP_SEARCH_PAGING_SIZE ( "ldap.search.paging.size" ),
  222. LDAP_SEARCH_PARALLEL_ENABLE ( "ldap.search.parallel.enable" ),
  223. LDAP_SEARCH_PARALLEL_FACTOR ( "ldap.search.parallel.factor" ),
  224. LDAP_SEARCH_PARALLEL_THREAD_MAX ( "ldap.search.parallel.threadMax" ),
  225. LDAP_ORACLE_POST_TEMPPW_USE_CURRENT_TIME ( "ldap.oracle.postTempPasswordUseCurrentTime" ),
  226. LOGGING_PATTERN ( "logging.pattern" ),
  227. LOGGING_FILE_MAX_SIZE ( "logging.file.maxSize" ),
  228. LOGGING_FILE_MAX_ROLLOVER ( "logging.file.maxRollover" ),
  229. LOGGING_FILE_PATH ( "logging.file.path" ),
  230. LOGGING_DEV_OUTPUT ( "logging.devOutput.enable" ),
  231. NEWUSER_LDAP_USE_TEMP_PW ( "newUser.ldap.useTempPassword" ),
  232. NEWUSER_TOKEN_ALLOW_PLAIN_PW ( "newUser.token.allowPlainPassword" ),
  233. NMAS_THREADS_MAX_COUNT ( "nmas.threads.maxCount" ),
  234. NMAS_THREADS_MIN_SECONDS ( "nmas.threads.minSeconds" ),
  235. NMAS_THREADS_MAX_SECONDS ( "nmas.threads.maxSeconds" ),
  236. NMAS_THREADS_WATCHDOG_FREQUENCY ( "nmas.threads.watchdogFrequencyMs" ),
  237. NMAS_THREADS_WATCHDOG_DEBUG ( "nmas.threads.watchdogDebug" ),
  238. NMAS_IGNORE_NMASCR_DURING_FORCECHECK ( "nmas.ignoreNmasCrDuringForceSetupCheck" ),
  239. NMAS_USE_LOCAL_SASL_FACTORY ( "nmas.useLocalSaslFactory" ),
  240. NMAS_FORCE_SASL_FACTORY_REGISTRATION ( "nmas.forceSaslFactoryRegistration" ),
  241. OAUTH_ID_REQUEST_TYPE ( "oauth.id.requestType" ),
  242. OAUTH_ID_ACCESS_GRANT_TYPE ( "oauth.id.accessGrantType" ),
  243. OAUTH_ID_REFRESH_GRANT_TYPE ( "oauth.id.refreshGrantType" ),
  244. OAUTH_ENABLE_TOKEN_REFRESH ( "oauth.enableTokenRefresh" ),
  245. OAUTH_RETURN_URL_OVERRIDE ( "oauth.returnUrlOverride" ),
  246. /* Allows one older TOTP token - compensate for clock out of sync */
  247. TOTP_PAST_INTERVALS ( "otp.totp.pastIntervals" ),
  248. /* Allows one newer TOTP token - compensate for clock out of sync */
  249. TOTP_FUTURE_INTERVALS ( "otp.totp.futureIntervals" ),
  250. TOTP_INTERVAL ( "otp.totp.intervalSeconds" ),
  251. OTP_TOKEN_LENGTH ( "otp.token.length" ),
  252. OTP_SALT_CHARLENGTH ( "otp.salt.charLength" ),
  253. OTP_RECOVERY_TOKEN_MACRO ( "otp.recovery.macro" ),
  254. OTP_RECOVERY_HASH_COUNT ( "otp.recoveryHash.iterations" ),
  255. OTP_RECOVERY_HASH_METHOD ( "otp.recoveryHash.method" ),
  256. OTP_QR_IMAGE_HEIGHT ( "otp.qrImage.height" ),
  257. OTP_QR_IMAGE_WIDTH ( "otp.qrImage.width" ),
  258. OTP_ENCRYPTION_ALG ( "otp.encryptionAlg" ),
  259. PASSWORD_RANDOMGEN_MAX_ATTEMPTS ( "password.randomGenerator.maxAttempts" ),
  260. PASSWORD_RANDOMGEN_MAX_LENGTH ( "password.randomGenerator.maxLength" ),
  261. PASSWORD_RANDOMGEN_JITTER_COUNT ( "password.randomGenerator.jitter.count" ),
  262. /* Strength thresholds, introduced by the addition of the zxcvbn strength meter library (since it has 5 levels) */
  263. PASSWORD_STRENGTH_THRESHOLD_VERY_STRONG ( "password.strength.threshold.veryStrong" ),
  264. PASSWORD_STRENGTH_THRESHOLD_STRONG ( "password.strength.threshold.strong" ),
  265. PASSWORD_STRENGTH_THRESHOLD_GOOD ( "password.strength.threshold.good" ),
  266. PASSWORD_STRENGTH_THRESHOLD_WEAK ( "password.strength.threshold.weak" ),
  267. PASSWORD_STRENGTH_THRESHOLD_VERY_WEAK ( "password.strength.threshold.veryWeak" ),
  268. PWNOTIFY_BATCH_COUNT ( "pwNotify.batch.count" ),
  269. PWNOTIFY_BATCH_DELAY_TIME_MULTIPLIER ( "pwNotify.batch.delayTimeMultiplier" ),
  270. PWNOTIFY_MAX_LDAP_SEARCH_SIZE ( "pwNotify.maxLdapSearchSize" ),
  271. PWNOTIFY_MAX_SKIP_RERUN_WINDOW_SECONDS ( "pwNotify.maxSkipRerunWindowSeconds" ),
  272. PEOPLESEARCH_EXPORT_CSV_MAX_DEPTH ( "peoplesearch.export.csv.maxDepth" ),
  273. PEOPLESEARCH_EXPORT_CSV_MAX_ITEMS ( "peoplesearch.export.csv.maxItems" ),
  274. PEOPLESEARCH_EXPORT_CSV_MAX_SECONDS ( "peoplesearch.export.csv.maxSeconds" ),
  275. PEOPLESEARCH_EXPORT_CSV_MAX_THREADS ( "peoplesearch.export.csv.threads" ),
  276. PEOPLESEARCH_ORGCHART_ENABLE_CHILD_COUNT ( "peoplesearch.orgChart.enableChildCount" ),
  277. PEOPLESEARCH_ORGCHART_MAX_PARENTS ( "peoplesearch.orgChart.maxParents" ),
  278. PEOPLESEARCH_MAX_VALUE_VERIFYUSERDN ( "peoplesearch.values.verifyUserDN" ),
  279. PEOPLESEARCH_VALUE_MAXCOUNT ( "peoplesearch.values.maxCount" ),
  280. PEOPLESEARCH_VIEW_DETAIL_LINKS ( "peoplesearch.view.detail.links" ),
  281. PEOPLESEARCH_MAILTO_MAX_DEPTH ( "peoplesearch.mailto.maxDepth" ),
  282. QUEUE_EMAIL_RETRY_TIMEOUT_MS ( "queue.email.retryTimeoutMs" ),
  283. QUEUE_EMAIL_MAX_COUNT ( "queue.email.maxCount" ),
  284. QUEUE_EMAIL_MAX_THREADS ( "queue.email.maxThreads" ),
  285. QUEUE_SMS_RETRY_TIMEOUT_MS ( "queue.sms.retryTimeoutMs" ),
  286. QUEUE_SMS_MAX_COUNT ( "queue.sms.maxCount" ),
  287. QUEUE_SYSLOG_RETRY_TIMEOUT_MS ( "queue.syslog.retryTimeoutMs" ),
  288. QUEUE_SYSLOG_MAX_AGE_MS ( "queue.syslog.maxAgeMs" ),
  289. QUEUE_SYSLOG_MAX_COUNT ( "queue.syslog.maxCount" ),
  290. RECAPTCHA_CLIENT_JS_URL ( "recaptcha.clientJsUrl" ),
  291. RECAPTCHA_CLIENT_IFRAME_URL ( "recaptcha.clientIframeUrl" ),
  292. RECAPTCHA_VALIDATE_URL ( "recaptcha.validateUrl" ),
  293. REPORTING_LDAP_SEARCH_TIMEOUT ( "reporting.ldap.searchTimeoutMs" ),
  294. REPORTING_LDAP_SEARCH_THREADS ( "reporting.ldap.searchThreads" ),
  295. REPORTING_MAX_REPORT_AGE_SECONDS ( "reporting.maxReportAgeSeconds" ),
  296. SECURITY_STRIP_INLINE_JAVASCRIPT ( "security.html.stripInlineJavascript" ),
  297. SECURITY_HTTP_FORCE_REQUEST_SEQUENCING ( "security.http.forceRequestSequencing" ),
  298. SECURITY_HTTP_STRIP_HEADER_REGEX ( "security.http.stripHeaderRegex" ),
  299. SECURITY_HTTP_PERFORM_CSRF_HEADER_CHECKS ( "security.http.performCsrfHeaderChecks" ),
  300. SECURITY_HTTP_PROMISCUOUS_ENABLE ( "security.http.promiscuousEnable" ),
  301. SECURITY_HTTP_CONFIG_CSP_HEADER ( "security.http.config.cspHeader" ),
  302. SECURITY_HTTPSSERVER_SELF_FUTURESECONDS ( "security.httpsServer.selfCert.futureSeconds" ),
  303. SECURITY_HTTPSSERVER_SELF_ALG ( "security.httpsServer.selfCert.alg" ),
  304. SECURITY_HTTPSSERVER_SELF_KEY_SIZE ( "security.httpsServer.selfCert.keySize" ),
  305. SECURITY_LOGIN_HIDDEN_ERROR_TYPES ( "security.login.hiddenErrorTypes" ),
  306. SECURITY_RESPONSES_HASH_ITERATIONS ( "security.responses.hashIterations" ),
  307. SECURITY_INPUT_TRIM ( "security.input.trim" ),
  308. SECURITY_INPUT_PASSWORD_TRIM ( "security.input.password.trim" ),
  309. SECURITY_INPUT_THEME_MATCH_REGEX ( "security.input.themeMatchRegex" ),
  310. SECURITY_WS_REST_SERVER_SECRET_HEADER ( "security.ws.rest.server.secretKeyHeader" ),
  311. SECURITY_SHAREDHISTORY_HASH_ITERATIONS ( "security.sharedHistory.hashIterations" ),
  312. SECURITY_SHAREDHISTORY_HASH_NAME ( "security.sharedHistory.hashName" ),
  313. SECURITY_SHAREDHISTORY_CASE_INSENSITIVE ( "security.sharedHistory.caseInsensitive" ),
  314. SECURITY_SHAREDHISTORY_SALT_LENGTH ( "security.sharedHistory.saltLength" ),
  315. SECURITY_CERTIFICATES_VALIDATE_TIMESTAMPS ( "security.certs.validateTimestamps" ),
  316. SECURITY_CONFIG_MIN_SECURITY_KEY_LENGTH ( "security.config.minSecurityKeyLength" ),
  317. SECURITY_DEFAULT_EPHEMERAL_BLOCK_ALG ( "security.defaultEphemeralBlockAlg" ),
  318. SECURITY_DEFAULT_EPHEMERAL_HASH_ALG ( "security.defaultEphemeralHashAlg" ),
  319. SEEDLIST_BUILTIN_PATH ( "seedlist.builtin.path" ),
  320. SMTP_SUBJECT_ENCODING_CHARSET ( "smtp.subjectEncodingCharset" ),
  321. SMTP_RETRYABLE_SEND_RESPONSE_STATUSES ( "smtp.retryableSendResponseStatus" ),
  322. TOKEN_CLEANER_INTERVAL_SECONDS ( "token.cleaner.intervalSeconds" ),
  323. TOKEN_MASK_EMAIL_REGEX ( "token.mask.email.regex" ),
  324. TOKEN_MASK_EMAIL_REPLACE ( "token.mask.email.replace" ),
  325. TOKEN_MASK_SHOW_SELECTION ( "token.mask.showSelection" ),
  326. TOKEN_MASK_SMS_REGEX ( "token.mask.sms.regex" ),
  327. TOKEN_MASK_SMS_REPLACE ( "token.mask.sms.replace" ),
  328. TOKEN_MAX_UNIQUE_CREATE_ATTEMPTS ( "token.maxUniqueCreateAttempts" ),
  329. TOKEN_RESEND_DELAY_MS ( "token.resend.delayMS" ),
  330. TOKEN_REMOVE_ON_CLAIM ( "token.removeOnClaim" ),
  331. TOKEN_VERIFY_PW_MODIFY_TIME ( "token.verifyPwModifyTime" ),
  332. TOKEN_STORAGE_MAX_KEY_LENGTH ( "token.storage.maxKeyLength" ),
  333. TELEMETRY_SENDER_IMPLEMENTATION ( "telemetry.senderImplementation" ),
  334. TELEMETRY_SENDER_SETTINGS ( "telemetry.senderSettings" ),
  335. TELEMETRY_SEND_FREQUENCY_SECONDS ( "telemetry.sendFrequencySeconds" ),
  336. TELEMETRY_MIN_AUTHENTICATIONS ( "telemetry.minimumAuthentications" ),
  337. /** Regular expression to be used for matching URLs to be shortened by the URL Shortening Service Class. */
  338. URL_SHORTNER_URL_REGEX ( "urlshortener.url.regex" ),
  339. WORDLIST_BUILTIN_PATH ( "wordlist.builtin.path" ),
  340. WORDLIST_CHAR_LENGTH_MAX ( "wordlist.maxCharLength" ),
  341. WORDLIST_CHAR_LENGTH_MIN ( "wordlist.minCharLength" ),
  342. WORDLIST_IMPORT_AUTO_IMPORT_RECHECK_SECONDS ( "wordlist.import.autoImportRecheckSeconds" ),
  343. WORDLIST_IMPORT_DURATION_GOAL_MS ( "wordlist.import.durationGoalMS" ),
  344. WORDLIST_IMPORT_MIN_TRANSACTIONS ( "wordlist.import.minTransactions" ),
  345. WORDLIST_IMPORT_MAX_TRANSACTIONS ( "wordlist.import.maxTransactions" ),
  346. WORDLIST_INSPECTOR_FREQUENCY_SECONDS ( "wordlist.inspector.frequencySeconds" ),
  347. WS_REST_CLIENT_PWRULE_HALTONERROR ( "ws.restClient.pwRule.haltOnError" ),
  348. WS_REST_SERVER_SIGNING_FORM_TIMEOUT_SECONDS ( "ws.restServer.signing.form.timeoutSeconds" ),
  349. WS_REST_SERVER_STATISTICS_DEFAULT_HISTORY ( "ws.restServer.statistics.defaultHistoryDays" ),
  350. WS_REST_SERVER_STATISTICS_DEFAULT_VERSION ( "ws.restServer.statistics.defaultVersion" ),
  351. ALLOW_MACRO_IN_REGEX_SETTING ( "password.policy.allowMacroInRegexSetting" ),;
  352. public static final String VALUE_SEPARATOR = ";;;";
  353. private static final String DESCRIPTION_SUFFIX = "_description";
  354. private final String key;
  355. private String defaultValue;
  356. AppProperty( final String key )
  357. {
  358. this.key = key;
  359. }
  360. public String getKey( )
  361. {
  362. return key;
  363. }
  364. public static AppProperty forKey( final String key )
  365. {
  366. for ( final AppProperty appProperty : AppProperty.values() )
  367. {
  368. if ( appProperty.getKey().equals( key ) )
  369. {
  370. return appProperty;
  371. }
  372. }
  373. return null;
  374. }
  375. public String getDefaultValue( )
  376. {
  377. if ( defaultValue == null )
  378. {
  379. defaultValue = readAppPropertiesBundle( this.getKey() );
  380. }
  381. return defaultValue;
  382. }
  383. public String getDescription( )
  384. {
  385. return readAppPropertiesBundle( this.getKey() + DESCRIPTION_SUFFIX );
  386. }
  387. private static String readAppPropertiesBundle( final String key )
  388. {
  389. return ResourceBundle.getBundle( AppProperty.class.getName() ).getString( key );
  390. }
  391. }