Skip to content
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

WIP: prevent postgres from mutating migration history #911

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

sweatybridge
Copy link
Contributor

@sweatybridge sweatybridge commented Mar 19, 2024

What kind of change does this PR introduce?

Bug fix

What is the new behavior?

Adds RLS policy to auth and storage schema to prevent postgres from accidentally updating migration history.

Additional context

Add any other context or screenshots.

@sweatybridge sweatybridge requested review from a team as code owners March 19, 2024 08:35
@sweatybridge sweatybridge changed the title fix: prevent postgres from mutating migration history WIP: prevent postgres from mutating migration history Mar 19, 2024
@soedirgo
Copy link
Member

Should we do auth first so we can limit the blast radius & not have to be blocked on supautils changes?

Hot take: this is ~never useful, just makes the test more brittle.
@soedirgo
Copy link
Member

soedirgo commented Apr 5, 2024

Removed the revoke/grant on auth.schema_migrations. postgres can already read all tables by way of pg_read_all_data through pg_monitor

@sweatybridge sweatybridge requested a review from a team as a code owner April 30, 2024 08:22
Copy link
Contributor

@darora darora left a comment

Choose a reason for hiding this comment

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

Are we good to roll this out? Or do we need additional testing - if so, what's the path forward?

We've tested that this doesn't break any of the flows that we've laid out in guides, e.g. setting up views on auth data, or triggers, etc?

Lastly, are we also planning to backport this to existing projects?

@soedirgo
Copy link
Member

This still needs additional testing, and I'll be having the Auth team test some of the common flows.

And yes, we'll backport this to existing projects.

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.

None yet

4 participants