All Projects → rpobulic → Pg Mask

rpobulic / Pg Mask

Licence: gpl-3.0
Simple data masking for PostgreSQL

Labels

Projects that are alternatives of or similar to Pg Mask

Cgasm
We're insanely passionate about command line asm documentation in the cloud, and we're crushing it!
Stars: ✭ 321 (+1906.25%)
Mutual labels:  plpgsql
Mixerp
Open Source ERP, HRM, MRP, MPS
Stars: ✭ 472 (+2850%)
Mutual labels:  plpgsql
Demo
“Happy Lager” Craft CMS demo site.
Stars: ✭ 730 (+4462.5%)
Mutual labels:  plpgsql
Hioshop Server
海风小店,开源商城,微信小程序商城服务器端
Stars: ✭ 331 (+1968.75%)
Mutual labels:  plpgsql
Pg Shortkey
YouTube-like Short IDs as Postgres Primary Keys
Stars: ✭ 402 (+2412.5%)
Mutual labels:  plpgsql
Node Sqlite3
Asynchronous, non-blocking SQLite3 bindings for Node.js
Stars: ✭ 5,083 (+31668.75%)
Mutual labels:  plpgsql
Pointcloud
A PostgreSQL extension for storing point cloud (LIDAR) data.
Stars: ✭ 289 (+1706.25%)
Mutual labels:  plpgsql
Chinook Database
Sample database for SQL Server, Oracle, MySQL, PostgreSQL, SQLite, DB2
Stars: ✭ 786 (+4812.5%)
Mutual labels:  plpgsql
Vector Datasource
Tilezen vector tile service - OpenStreetMap data in several formats
Stars: ✭ 427 (+2568.75%)
Mutual labels:  plpgsql
Blog
Everything about database,business.(Most for PostgreSQL).
Stars: ✭ 6,330 (+39462.5%)
Mutual labels:  plpgsql
100daysofiac
100 Days of IaC in Azure
Stars: ✭ 347 (+2068.75%)
Mutual labels:  plpgsql
Practical Sql
Code and Data for the book "Practical SQL" by Anthony DeBarros, published by No Starch Press (2018).
Stars: ✭ 392 (+2350%)
Mutual labels:  plpgsql
Pgtap
PostgreSQL Unit Testing Suite
Stars: ✭ 631 (+3843.75%)
Mutual labels:  plpgsql
Plpgsql check
plpgsql_check is linter tool for language PL/pgSQL (native language for PostgreSQL store procedures).
Stars: ✭ 322 (+1912.5%)
Mutual labels:  plpgsql
Mysql Sys
The MySQL sys schema
Stars: ✭ 758 (+4637.5%)
Mutual labels:  plpgsql
Postgres Json Schema
JSON Schema validation for PostgreSQL
Stars: ✭ 319 (+1893.75%)
Mutual labels:  plpgsql
Audit Trigger
Simple, easily customised trigger-based auditing for PostgreSQL (Postgres). See also pgaudit.
Stars: ✭ 493 (+2981.25%)
Mutual labels:  plpgsql
Odata V4 Typeorm
OData to TYPEORM query compiler
Stars: ✭ 16 (+0%)
Mutual labels:  plpgsql
Mysql Deadlocks
收集一些常见的 MySQL 死锁案例
Stars: ✭ 777 (+4756.25%)
Mutual labels:  plpgsql
Postgrest Starter Kit
Starter Kit and tooling for authoring REST API backends with PostgREST
Stars: ✭ 657 (+4006.25%)
Mutual labels:  plpgsql

pg-mask

Simple data masking for PostgreSQL

Installation

Just clone the github repository to any path, both on source and target Linux (or any OS with bash) systems.

Usage

Columns with sensitive information which have to be obfuscated before sending the dump to an external party for development/testing/tuning, can be marked by entering a special expression into the database column description. There are three types of these expressions:

  1. "msk"det" for deterministic hashing (double quotes are part of the expression), should be used when the same original value has to have the same obfuscated value
  2. "msk"rand" for random obfuscation
  3. "msk"any valid SQL expression for a select from the corresponding table, returning the same type and within the maximum length of the column"

You can easily edit the column descriptions using pgadmin4 or DBeaver.

After marking the sensitive columns, you can export all data of owner:

path/pg-mask/bin/mask.sh dbname ownername

This will create three files in the current directory:

  • pre_data.sql
  • import_masked.sql
  • post_data.sql

These files should be copied to the target system. To import them into the target database, run this in the target directory:

path/pg-mask/bin/import_masked.sh dbname ownername

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].