Class: SensitiveDataConfigType
- Inherits:
-
Object
- Object
- SensitiveDataConfigType
- Defined in:
- lib/AuthenticationSDK/logging/sensitive_logging.rb
Instance Attribute Summary collapse
-
#sensitiveStringRegexes ⇒ Object
Returns the value of attribute sensitiveStringRegexes.
-
#sensitiveTags ⇒ Object
Returns the value of attribute sensitiveTags.
Instance Method Summary collapse
-
#initialize ⇒ SensitiveDataConfigType
constructor
A new instance of SensitiveDataConfigType.
Constructor Details
#initialize ⇒ SensitiveDataConfigType
Returns a new instance of SensitiveDataConfigType.
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/AuthenticationSDK/logging/sensitive_logging.rb', line 16 def initialize @sensitiveTags = Array.new([ SensitiveTag.new("securityCode", "[0-9]{3,4}", "XXX", false), SensitiveTag.new("number", "(\\p{N}+)(\\p{N}{4})", "XXXX-\\2", false), SensitiveTag.new("cardNumber", "(\\p{N}+)(\\p{N}{4})", "XXXX-\\2", false), SensitiveTag.new("expirationMonth", "[0-1][0-9]", "XXXX", false), SensitiveTag.new("expirationYear", "2[0-9][0-9][0-9]", "XXXX", false), SensitiveTag.new("account", "(\\p{N}+)(\\p{N}{4})", "XXXX-\\2", false), SensitiveTag.new("routingNumber", "[0-9]+", "XXXXX", false), SensitiveTag.new("email", "[a-z0-9!#$%&'*+\/=?^_`{|}~-]+(?:.[a-z0-9!#$%&'*+\/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?", "XXXXX", false), SensitiveTag.new("firstName", "([a-zA-Z]+( )?[a-zA-Z]*'?-?[a-zA-Z]*( )?([a-zA-Z]*)?)", "xxxxx", false), SensitiveTag.new("lastName", "([a-zA-Z]+( )?[a-zA-Z]*'?-?[a-zA-Z]*( )?([a-zA-Z]*)?)", "xxxxx", false), SensitiveTag.new("phoneNumber", "(\\+[0-9]{1,2} )?\\(?[0-9]{3}\\)?[ .-]?[0-9]{3}[ .-]?[0-9]{4}", "xxxxx", false), SensitiveTag.new("type", "[-A-Za-z0-9 ]+", "xxxxx", false), SensitiveTag.new("token", "[-.A-Za-z0-9 ]+", "xxxxx", false), SensitiveTag.new("signature", "[-.A-Za-z0-9 ]+", "xxxxx", false) ]).freeze @sensitiveStringRegexes = [ "4\\p{N}{3}([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", "4\\p{N}{3}([\\ \\-]?)(?:\\p{N}{4}\\1){2}\\p{N}(?:\\p{N}{3})?", "5[1-5]\\p{N}{2}([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", "6(?:011|22(?:1(?=[\\ \\-]?(?:2[6-9]|[3-9]))|[2-8]|9(?=[\\ \\-]?(?:[01]|2[0-5])))|4[4-9]\\p{N}|5\\p{N}\\p{N})([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", "35(?:2[89]|[3-8]\\p{N})([\\ \\-]?)\\p{N}{4}\\1\\p{N}{4}\\1\\p{N}{4}", "3[47]\\p{N}\\p{N}([\\ \\-]?)\\p{N}{6}\\1\\p{N}{5}" ].freeze end |
Instance Attribute Details
#sensitiveStringRegexes ⇒ Object
Returns the value of attribute sensitiveStringRegexes.
14 15 16 |
# File 'lib/AuthenticationSDK/logging/sensitive_logging.rb', line 14 def sensitiveStringRegexes @sensitiveStringRegexes end |
#sensitiveTags ⇒ Object
Returns the value of attribute sensitiveTags.
14 15 16 |
# File 'lib/AuthenticationSDK/logging/sensitive_logging.rb', line 14 def sensitiveTags @sensitiveTags end |