-
-
Notifications
You must be signed in to change notification settings - Fork 175
feat: revoke supabase_{auth|storage}_admin from postgres #994
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
base: develop
Are you sure you want to change the base?
feat: revoke supabase_{auth|storage}_admin from postgres #994
Conversation
0a579ea
to
b59533b
Compare
74dbed6
to
b064948
Compare
3d1a215
to
4114665
Compare
701ee30
to
105e1a2
Compare
revoke supabase_storage_admin from postgres; | ||
revoke create on schema storage from postgres; | ||
revoke all on storage.migrations from anon, authenticated, service_role, postgres; | ||
|
||
revoke supabase_auth_admin from postgres; | ||
revoke create on schema auth from postgres; | ||
revoke all on auth.schema_migrations from dashboard_user, postgres; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The revoke all
privileges on the migrations tables are not covered by tests. We should add those to ensure no regressions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need some covering tests as mentioned above.
Merged #1577 to help with the testing. Now this PR would just need a rebase. |
105e1a2
to
98cc3d1
Compare
Rebased the PR |
Tests need to be adjusted, see logs (do ctrl+f "regression.diffs"). Looks like these lines have to be removed: postgres/nix/tests/expected/auth.out Lines 135 to 148 in 24f17a3
|
Prevents Auth and Storage schemas & migrations from being modified
34dff60
to
cd88df6
Compare
Thanks, all fixed now |
Context
Restricts privileges for
postgres
onauth
andstorage
schemas to prevent unintentional breakage.realtime
will be handled out of band because the privileges are set up in the supabase/realtime repo.Tested on local infra:
pause & restore (15.8.1.079 to 15.8.1.079-roles-1):
queries
q1
q2
q3