<commit_before>package utils.helpers

import app.ConfigProperties._
import scala.concurrent.duration._
import scala.language.postfixOps
import play.api.Logger

class Config {
  // Micro-service config
  val vehicleLookupMicroServiceBaseUrl: String = getProperty("vehicleLookupMicroServiceUrlBase", "NOT FOUND")
  val disposeVehicleMicroServiceBaseUrl: String = getProperty("disposeVehicleMicroServiceUrlBase", "NOT FOUND")

  // Ordnance survey config
  val ordnanceSurveyMicroServiceUrl: String = getProperty("ordnancesurvey.ms.url", "NOT FOUND")
  val ordnanceSurveyRequestTimeout: Int = getProperty("ordnancesurvey.requesttimeout", (5 seconds).toMillis.toInt)

  // GDS address lookup config
  val gdsAddressLookupBaseUrl: String = getProperty("gdsaddresslookup.baseurl", "")
  val gdsAddressLookupAuthorisation: String = getProperty("gdsaddresslookup.authorisation", "")
  val gdsAddressLookupRequestTimeout: Int = getProperty("gdsaddresslookup.requesttimeout", (5 seconds).toMillis.toInt)

  // Dispose
  val disposeMsRequestTimeout: Int = getProperty("dispose.ms.requesttimeout", (5 seconds).toMillis.toInt)

  // Brute force prevention config
  val bruteForcePreventionMicroServiceBaseUrl: String = getProperty("bruteForcePreventionMicroServiceBase", "NOT FOUND")
  val bruteForcePreventionTimeout: Int = getProperty("bruteForcePrevention.requesttimeout", (5 seconds).toMillis.toInt)
  val bruteForcePreventionEnabled: Boolean = {
    val enabled = getProperty("bruteForcePrevention.enabled", default = true)
    //Logger.debug(s"bruteForcePreventionEnabled = $enabled") //ToDo Do we need to log this information?
    enabled
  }
  val bruteForcePreventionServiceNameHeader: String = getProperty("bruteForcePrevention.headers.serviceName", "")
  val bruteForcePreventionMaxAttemptsHeader: Int = getProperty("bruteForcePrevention.headers.maxAttempts", 3)<commit_msg>removed ToDO regarding logging brute force enabled, the logging has been commented out for the last 2 weeks<commit_after>package utils.helpers

import app.ConfigProperties._
import scala.concurrent.duration._
import scala.language.postfixOps
import play.api.Logger

class Config {
  // Micro-service config
  val vehicleLookupMicroServiceBaseUrl: String = getProperty("vehicleLookupMicroServiceUrlBase", "NOT FOUND")
  val disposeVehicleMicroServiceBaseUrl: String = getProperty("disposeVehicleMicroServiceUrlBase", "NOT FOUND")

  // Ordnance survey config
  val ordnanceSurveyMicroServiceUrl: String = getProperty("ordnancesurvey.ms.url", "NOT FOUND")
  val ordnanceSurveyRequestTimeout: Int = getProperty("ordnancesurvey.requesttimeout", (5 seconds).toMillis.toInt)

  // GDS address lookup config
  val gdsAddressLookupBaseUrl: String = getProperty("gdsaddresslookup.baseurl", "")
  val gdsAddressLookupAuthorisation: String = getProperty("gdsaddresslookup.authorisation", "")
  val gdsAddressLookupRequestTimeout: Int = getProperty("gdsaddresslookup.requesttimeout", (5 seconds).toMillis.toInt)

  // Dispose
  val disposeMsRequestTimeout: Int = getProperty("dispose.ms.requesttimeout", (5 seconds).toMillis.toInt)

  // Brute force prevention config
  val bruteForcePreventionMicroServiceBaseUrl: String = getProperty("bruteForcePreventionMicroServiceBase", "NOT FOUND")
  val bruteForcePreventionTimeout: Int = getProperty("bruteForcePrevention.requesttimeout", (5 seconds).toMillis.toInt)
  val bruteForcePreventionEnabled: Boolean = {
    val enabled = getProperty("bruteForcePrevention.enabled", default = true)
    //Logger.debug(s"bruteForcePreventionEnabled = $enabled")
    enabled
  }
  val bruteForcePreventionServiceNameHeader: String = getProperty("bruteForcePrevention.headers.serviceName", "")
  val bruteForcePreventionMaxAttemptsHeader: Int = getProperty("bruteForcePrevention.headers.maxAttempts", 3)
{'fraction_non_alphanumeric': 0.0922266139657444, 'fraction_numerical': 0.002898550724637681, 'mean_word_length': 6.778688524590164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7634253', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1052, 'n_words': 228}