Skip to content

Dynamic Masking Support for anon v2 #11733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 58 commits into
base: main
Choose a base branch
from

Conversation

thesuhas
Copy link
Contributor

@thesuhas thesuhas commented Apr 25, 2025

Problem

This PR works on adding dynamic masking support for anon v2. It currently only supports static masking.

Summary of changes

Added a security definer function that sets the dynamic masking guc to true with superuser permissions.
Added a security definer function that adds anon to session_preload_libraries if it's not already present.

Related to: https://github.com/neondatabase/cloud/issues/20456

@thesuhas thesuhas requested a review from a team as a code owner April 25, 2025 15:20
@thesuhas thesuhas requested review from iddm and lubennikovaav and removed request for a team April 25, 2025 15:20
@thesuhas thesuhas marked this pull request as draft April 25, 2025 15:20
Copy link

github-actions bot commented Apr 25, 2025

8349 tests run: 7844 passed, 0 failed, 505 skipped (full report)


Flaky tests (3)

Postgres 16

Postgres 15

Postgres 14

Code coverage* (full report)

  • functions: 32.7% (8970 of 27405 functions)
  • lines: 48.9% (78277 of 160115 lines)

* collected from Rust tests only


The comment gets automatically updated with the latest test results
2620485 at 2025-05-01T22:53:11.504Z :recycle:

Copy link
Contributor

@MMeent MMeent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned before, there are IMO too many places where anon is added by default. I'd rather not add these moving parts by default; AFAIK it is going to be an opt-in feature, and not forced on all users.

@thesuhas thesuhas marked this pull request as ready for review April 29, 2025 18:30
Base automatically changed from thesuhas/add_anon_v2_docker to main May 1, 2025 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants