β οΈ This post links to an external website. β οΈ
Redacting request parameters alone canβt ensure privacy when logging them. Humberto Figuera tackles this challenge with the introduction of
Obscura.Phoenix.Logger, a solution that allows for the logging of sanitized request data without altering the behavior of controllers in Phoenix applications. The design maintains the integrity ofconn.paramswhile capturing only redacted values for logs, preventing sensitive information like email addresses or credit card numbers from being exposed. This method emphasizes ownership of parameter data, ensuring that what is logged does not inadvertently change application behavior or leak personal identifiable information (PII). Required steps for implementation include disabling the default Phoenix logger and integrating the handling of sanitized data. As one of the key takeaways, the handler helps prevent logging sensitive parameters while permitting controllers to operate with original request data intact.
continue reading onhfiguera.github.io
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.