←back to thread

PostgreSQL Anonymizer

(postgresql-anonymizer.readthedocs.io)
243 points chynkm | 4 comments | | HN request time: 0.001s | source
Show context
sgt ◴[] No.42735168[source]
Just be careful that you don't anonymize your production data.
replies(3): >>42735222 #>>42735455 #>>42735797 #
1. lovasoa ◴[] No.42735455[source]
The principle of the software seems to be that the original data is never altered. It is a postgres extension that "masks" the data for certain postgres users. You can always connect as the root user and see everything when you need to.
replies(1): >>42737584 #
2. heeton ◴[] No.42737584[source]
It allows updating the original data - https://postgresql-anonymizer.readthedocs.io/en/stable/stati...

> These methods will destroy the original data. Use with care.

replies(1): >>42741999 #
3. sgt ◴[] No.42741999[source]
So basically running SELECT anon.anonymize_database(); will do it.
replies(1): >>42744737 #
4. daamien ◴[] No.42744737{3}[source]
Both approach are possible

* Static Masking will destroy the authentic data once for all

* Dynamic Masking will only alter the data the "masked users". Regular users will continue to view the real data.

Both techniques have their own advantage depending on your context.