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

Document security invoker view option for auth.users exposed #24

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

olirice
Copy link
Collaborator

@olirice olirice commented Apr 1, 2024

What kind of change does this PR introduce?

Updates the "auth.users exposed" lint to check for 3 different conditions

  • auth.users exposed in a materialized view (no RLS possible)
  • auth.users exposed in a SECURITY DEFINER view (no RLS possible)
  • auth.users exposed in SECURITY INVOKER view, but RLS not enabled on auth.users

We also add tests for each of these cases, and confirm that resolving the issue in the third case removes the record.

Finally, the docs have been updated to reflect document security_invoker + RLS as an option for resolving the problem in addition to the trigger based solution already in the docs

resolves #23

@olirice olirice merged commit a3445b1 into main Apr 2, 2024
2 checks passed
@olirice olirice deleted the or/auth-users-exposed-option-2 branch April 2, 2024 13:00
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.

Document security invoker + RLS on auth.users as an option for exposing auth.users in a view
2 participants