Utilities to redact sensitive data in Elixir projects
By redacting we consider here the practice of hiding part of a potentially sensitive information, while keeping a small part of it to allow understanding that it may be a valid one.
For example, you may want to redact a telephone number in your logs, but keep the initial digits (e.g. the prefix) because that information is relevant to your understanding of the system, and at the same moment it does not expose any sensitive information.
Full documentation is available on hexdocs
See RedactEx for general information about this library and its intended use See RedactEx.Redactor for generating fast redactors for strings See RedactEx.Redactable protocol for deriving redactable structs
The recommended way to work is to use asdf language runtime versions manager.
You will find a .tool-versions.recommended file that - hopefully - is up to date with the versions used in CI.
Please be sure that your test pass with those versions before pushing to save yourself the wait for automatic checks.
# Use project's defaults
cp .tool-versions.recommended .tool-versions
- Expand explanation of fallback custom implementations of algorithms
- fix dialyzer :(
- Other ways of redacting (e.g. first X letters and last Y exposed, random redactors, ecc)
- maybe-email redactor
- define a default strict implementation for
redact
in theAny
implementation? - some other default magic configuration in derive, e.g. a default module+function?
- better handling of fallbacks for derived structs, and macro-generated helpers to "try_redact" structs that may be nil or other