Skip to content

Harden RLS for analytics and audit tables#190

Open
optimystical wants to merge 1 commit into
SebastienGosa:mainfrom
optimystical:harden-analytics-rls
Open

Harden RLS for analytics and audit tables#190
optimystical wants to merge 1 commit into
SebastienGosa:mainfrom
optimystical:harden-analytics-rls

Conversation

@optimystical
Copy link
Copy Markdown

Summary

  • Enable row-level security on search_queries, affiliate_clicks, and system_jobs.
  • Keep direct anon/authenticated table access closed for analytics, tracking, and worker audit data.
  • Document that server routes, cron jobs, and workers should use service_role for these tables.

Security rationale

These tables can contain user-linked search text, IP/user-agent tracking metadata, conversion/order identifiers, worker parameters, and job errors. They should not be directly exposed through Supabase's public API surface without explicit policies.

This complements the existing RLS hardening work in #188 without touching the same profile/list/annotation policies.

Validation

  • git diff --check

Refs #100

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.

1 participant