cockroachdb / cockroachdb/cockroach

sql: add redaction for `crdb_internal` and `system` tables at the SQL level

Open
#100,645 0 comments 0 reactions 0 assignees View on GitHub
C-enhancement
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

**Is your feature request related to a problem? Please describe.**
Today, we achieve PCI compliance when dumping tables in debug zip bundles by manually defining which columns don't contain non-sensitive data, and then omit the rest. Optionally, you can define a custom redacted SQL query instead. (see `zip_table_registry.go`)

This is a manual process that is prone to human error, and bound to become out-of-date. While the list is an allow-list, which should minimize the chance that newly created sensitive columns leak into the debug zip, it's nonetheless a brittle approach that's not meant to last long term (rather, it was created as a short term solution to get us compliance fast).

**Describe the solution you'd like**
Redaction of `crdb_internal` and `system` tables needs to be implemented at the SQL server level, rather than the SQL client level. Folks implementing a new table in either of these databases, or adding a new column to existing tables, should be forced to define both the redacted and unredacted form for that column. Without this approach, we rely on manual lists of manually vetted columns that is destined to grow stale over time.

Jira issue: CRDB-26535

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.