Class: ReeAudit::Config

Inherits:
Object
  • Object
show all
Includes:
Ree::BeanDSL
Defined in:
lib/ree_lib/packages/ree_audit/package/ree_audit/config.rb

Constant Summary collapse

MAX_PARAMS_BYTES =
4096
MAX_PARAMS_DEPTH =
4
DEFAULT_FILTER_WORDS =

Blacklist of the framework layer: it protects any host application from leaking a credential into the audit trail. Applications are expected to add their own whitelist on top of it inside their sink.

%w[
  password token credential bearer authorization secret key code email phone
].freeze

Instance Method Summary collapse

Instance Method Details

#buildObject



24
25
26
27
28
29
30
31
# File 'lib/ree_lib/packages/ree_audit/package/ree_audit/config.rb', line 24

def build
  to_obj({
    enabled: parse_bool_string(ENV['AUDIT_ENABLED']),
    max_params_bytes: get_int_value('AUDIT_MAX_PARAMS_BYTES', MAX_PARAMS_BYTES),
    max_params_depth: get_int_value('AUDIT_MAX_PARAMS_DEPTH', MAX_PARAMS_DEPTH),
    filter_words: parse_filter_words(ENV['AUDIT_FILTER_WORDS'])
  })
end