Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Implement is_sensitive/2 using configurable application env
If it exists, consult a file to configure application env. If `sensitive` env key is found therein, use it to determine which values to redact from log entries. The value of the `sensitive` key should be a dict of the form: ``` #{ Section1 => [Field1, Field2, ...], Section2 => all } ``` where `Section`s are strings that define sections which contain sensitive fields, and `Field`s are strings. The atom `all` indicates all fields for that section are sensitive. A typical configuration might look like: ``` #{ "admins" => all, "replicator" => ["password"] } ``` meaning that all values in the `[admins]` section, and the `password` value in the `[replicator]` section will be redacted from the logs.
- Loading branch information
Showing
2 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters