Security Corner:
Self-obfuscating Value Objects—A Design Pattern for PII

By Eric Mann

Leveraging commonly used and well-defined design patterns is paramount in ensuring your application is stable and maintainable over time. Extending those design patterns to focus on security-first is an effective way of ensuring your application and its data are reliably secure. One such pattern is a Value Object, which can be customized to automatically and transparently obfuscate the value it contains. We can use such an object to protect PII, availing it still for use within your business logic while preventing accidental leaks or disclosing the sensitive data with which you work.

This article was originally published in the November 2020 issue of php[architect] magazine. To read the complete article please subscribe or purchase the complete issue.

Leave a comment

Use the form below to leave a comment: