Data masking is a well-established approach to protecting sensitive data in a database while still allowing the data to be usable. By subtly obscuring your data, either temporarily or permanently, data masking allows your engineering teams to use sensitive data while keeping it confidential, secure, and safe. Data masking can also make it easier to comply with regulations such as GDPR and HIPAA.
MongoDB supports data masking through the core feature of an aggregation pipeline. In this paper, we explore:
- How to determine which data should be masked
- Construction of the aggregation pipeline
- How to safely expose masked data
- Additional resources about data masking