Combo.FilteredParams (combo v0.8.0)

View Source

Filtering sensitive parameters, such as passwords and tokens.

Configuration

Parameters to be filtered are specified by the :rule option.

config :combo, :filtered_params, 
  rule: {:discard, ["password", "secret"]}
  replacement: "[FILTERED]"

Rules

  • {:discard, keys}, filters paramaters specified by keys, and keep other parameters. For example: {:discard, ["password", "secret"]}.

  • {:keep, keys}, keeps paramaters specified by keys, and keep other parameters. For example: {:keep, ["id", "order"]}.

And, the matching on keys is case sensitive.

The default one is {:discard, ["password"]}.

Replacements

Common replacements are "[FILTERED]" or "[REDACTED]". The default one is "[FILTERED]".

Summary

Functions

filter(value, rule \\ rule())

Filters it.