Skip to content
STIRUP

TECHNOLOGY INTELLIGENCE

Understand what's next.

Brume: Secure PostgreSQL Data Pseudonymization with Referential Integrity

Brume pseudonymizes PostgreSQL data during copying, preserving referential integrity and avoiding data leakage by transforming sensitive information before writing.

Share
AI-generated conceptual illustration accompanying: Brume: Secure PostgreSQL Data Pseudonymization with Referential Integrity
AI-generated editorial illustration of the article topic; not a photograph, product screenshot or measured result.

Problem with Traditional Data Masking and Pseudonymization

Development teams often need realistic data to reproduce bugs, run tests or prepare demos, but copying production exposes real personal data (PostgreSQL). Classic masking scripts also tend to break referential integrity, which forces you to disable triggers, suspend constraints or repair broken joins by hand (PostgreSQL). Brume copies a targeted subset of a source database to a target database or to a .sql file, and transforms personal data on the fly, before anything is written (PostgreSQL). This approach avoids the need for post-processing and reduces the risk of data leakage. By handling pseudonymization during the copy process, Brume ensures that sensitive information is never stored in unsecured environments. This method also preserves database structure and relationships, eliminating the need to manually adjust constraints or triggers. The result is a more efficient and secure way to work with test data, without compromising the integrity of the database schema.

Key Features of Brume

Brume offers several key features for pseudonymizing PostgreSQL test and debug copies. Column-level strategies include FAKE for generating realistic synthetic values, MASK for partial data reveals, HASH for one-way hashing, NULLIFY to remove sensitive data, and FPE_ID / FPE_UUID for format-preserving encryption of identifiers. DATE_SHIFT allows dates to be moved while maintaining their distribution. Transformations are deterministic and keyed by user-defined secrets, ensuring consistent results across environments. Additionally, referential integrity is preserved through format-preserving encryption, which consistently rewrites primary keys and the foreign keys that reference them.

Referential Integrity and Data Consistency

Brume ensures referential integrity and data consistency during pseudonymization by using format-preserving encryption to rewrite primary keys and corresponding foreign keys consistently . This approach maintains the relational structure of the data without exposing real identifiers. Additionally, the linked_columns feature ensures that values shared across tables—such as an email appearing in both users and audit_logs—receive the same pseudonym, preserving data coherence . Brume also supports traversing foreign keys up to a configurable depth, allowing the creation of small, self-contained data extracts that remain logically consistent with the original database . These mechanisms help maintain the integrity of test and debug copies of PostgreSQL databases while ensuring privacy.

Configuration and Compatibility

Brume's configuration is declarative, relying on a single brume.yml file to define pseudonymization strategies for each table and column. This file specifies semantic types such as EMAIL, PHONE, IBAN, and ADDRESS, along with JSONB paths for nested fields, ensuring precise data transformation. The configuration file can be version-controlled and reviewed like code, enabling collaboration and auditability before any pseudonymization runs. In terms of compatibility, Brume supports PostgreSQL versions 12 through 18, providing broad coverage for existing and newer database environments. Installation details are outlined in the Brume documentation, though specific steps are not included in the provided evidence.

Compliance and GDPR Alignment

Brume aligns with GDPR requirements by enabling pseudonymization, a technique explicitly referenced in Articles 25 and 32 of the GDPR as a means to protect personal data. This approach supports compliance by allowing organizations to create test and debug copies of PostgreSQL databases without exposing real personal data. By providing a reviewable and auditable transformation process, Brume empowers Data Protection Officers (DPOs) and security teams to ensure that personal data is appropriately handled before it leaves production environments. The tool is available for multiple platforms, including Debian/Ubuntu (apt), RHEL/Fedora (dnf), and macOS (Homebrew), facilitating broad adoption across different infrastructures.

Sources and reporting notes

Based on published source material. No independent hands-on testing is claimed.

Read more