locations
South Africa Supabase security
South African teams building on Supabase need practical safeguards that reduce exposure risk and support POPIA-oriented accountability across data systems. This page compiles location-specific considerations and translates them into practical, verifiable security steps for Supabase apps.
Supabase security context for South Africa
South African teams building on Supabase need practical safeguards that reduce exposure risk and support POPIA-oriented accountability across data systems.
Pricing / operational notes for South Africa
Security operations often include recurring control verification, incident process updates, and evidence readiness. Strong baseline architecture reduces repeated firefighting.
Regulatory considerations (high-level, sourced)
- Protection of Personal Information Act 4 of 2013 (POPIA) β POPIA sets conditions for lawful processing and protection of personal information. Teams should enforce technical controls that block unauthorized direct access and support accountability. (source: https://www.justice.gov.za/legislation/acts/2013-004.pdf)
- Information Regulator guidance resources β The Information Regulator publishes guidance and implementation resources that inform operational compliance expectations and governance practices. (source: https://inforegulator.org.za/guidance-notes/)
Local trends that shape risk
- Organizations are prioritizing practical implementation of lawful processing controls in production systems.
- Security teams are improving access governance and audit trails for sensitive operations.
- Engineering leadership increasingly expects measurable evidence for remediation effectiveness.
What to prioritize first in South Africa (high leverage)
- Block direct client access to sensitive data surfaces (tables, Storage, privileged RPC).
- Make verification repeatable: one checklist you can run in dev/staging/prod.
- Reduce policy complexity: prefer backend-only access for sensitive workflows.
- Add monitoring and logs so you can respond quickly if something changes.
Practical checklist
- Define clear backend-only boundaries for sensitive data operations.
- Review and minimize table, storage, and function permissions available to client roles.
- Implement private storage access with server-issued short-lived links.
- Audit RPC and policy changes during each release cycle.
- Test direct access attempts and confirm expected denials after remediation.
- Maintain incident-ready logs without exposing secrets or personal data.
- Track recurring risks and assign owners for long-term control improvements.
How to use this South Africa page during a review
- Start with the local trends and identify which ones apply to your app and customers.
- Pick one high-risk surface (tables/Storage/RPC) and run direct access tests to validate exposure.
- Apply one template/conversion and repeat the same tests to prove the fix worked.
- Capture evidence (what changed + what test proves it) and add a drift guard after migrations.
Evidence to keep for South Africa (so reviews go faster)
- A short architecture note describing which operations are backend-only and why.
- A copy of the verification checklist you run after migrations and releases.
- A record of security-critical configuration changes (policies, grants, bucket settings, functions).
- Logs or monitoring signals that help you detect unexpected access patterns.
Baseline architecture that maps well to South Africa expectations
If you want a posture thatβs easy to explain in reviews, keep the architecture simple:
- Backend-only access for sensitive operations (tables/Storage/RPC).
- Short-lived signed URLs for private files generated on the server after authorization.
- Least privilege for client roles: no broad grants, minimal policies, deny-by-default where possible.
- Repeatable verification and drift checks after migrations.
Recommended reading (glossary terms)
- Row Level Security (RLS) β
/glossary/row-level-security - Public Table Exposure β
/glossary/public-table-exposure - Over-permissive RLS Policies β
/glossary/over-permissive-rls-policies - Supabase Storage Bucket Privacy β
/glossary/supabase-storage-bucket-privacy - RPC EXECUTE Grants β
/glossary/rpc-execute-grants - Signed URLs β
/glossary/signed-urls - Service Role Key β
/glossary/service-role-key - Forced RLS (FORCE ROW LEVEL SECURITY) β
/glossary/force-row-level-security - Client Role Grants (anon/authenticated) β
/glossary/client-role-grants - Ownership-bound RLS Policies β
/glossary/ownership-bound-rls-policies - Storage Object Enumeration β
/glossary/storage-object-enumeration - Public RPC Surface Area β
/glossary/public-rpc-surface-area - NEXT_PUBLIC Secret Leakage β
/glossary/next-public-secret-leakage - Broken Object Level Authorization (BOLA) β
/glossary/broken-object-level-authorization - Insecure Direct Object References (IDOR) β
/glossary/insecure-direct-object-references - Tenant ID Trusted from Client β
/glossary/tenant-id-trust-in-client - Missing WITH CHECK Policy β
/glossary/missing-with-check-policy - Broad SELECT for Authenticated Role β
/glossary/broad-authenticated-select - Broad UPDATE for Authenticated Role β
/glossary/broad-authenticated-update - Broad DELETE for Authenticated Role β
/glossary/broad-authenticated-delete - Default Privilege Drift β
/glossary/default-privilege-drift - Schema USAGE Granted to PUBLIC β
/glossary/schema-usage-granted-to-public - Exposed Materialized Views β
/glossary/exposed-materialized-views - Insecure SECURITY DEFINER Functions β
/glossary/insecure-security-definer-functions - Mutable Function search_path β
/glossary/mutable-function-search-path - Trigger Privilege Escalation β
/glossary/trigger-privilege-escalation - Migration Owner Bypass of RLS β
/glossary/migration-owner-bypass - Shadow Table Without RLS β
/glossary/shadow-table-without-rls - Audit Log Table Publicly Readable β
/glossary/audit-log-public-readable - Soft Delete Policy Bypass β
/glossary/soft-delete-policy-bypass - UPSERT Policy Gap β
/glossary/upsert-policy-gap - Cross-Schema Data Exposure β
/glossary/cross-schema-exposure - Unrestricted View Definitions β
/glossary/unrestricted-view-definitions - Leaked JWT Signing Secret β
/glossary/leaked-jwt-secret - Stale JWT Claims β
/glossary/stale-jwt-claims - Auth Role Claim Confusion β
/glossary/auth-role-claim-confusion - Magic Link Open Redirect β
/glossary/magic-link-redirect-open-redirect - Password Reset Token Leakage β
/glossary/password-reset-token-leakage - OAuth Role Mapping Errors β
/glossary/oauth-role-mapping-errors - SSO Group Sync Escalation β
/glossary/sso-group-sync-escalation - Invite Flow Tenant Escalation β
/glossary/invite-flow-tenant-escalation - Membership Race Condition β
/glossary/membership-race-condition - Admin Panel Client-Only Auth β
/glossary/admin-panel-client-auth-only - Database URL Leaked in Client β
/glossary/leaked-database-url-in-client - Secrets in Repository History β
/glossary/secrets-in-repo-history - Environment Parity Security Drift β
/glossary/env-parity-security-drift - Staging Database Public Exposure β
/glossary/staging-db-public-exposure - Test Data Left in Production β
/glossary/test-data-in-production - Unencrypted Sensitive Columns β
/glossary/unencrypted-sensitive-columns - Missing Key Rotation Policy β
/glossary/key-rotation-policy-missing - Service Role Overreach in Cron Jobs β
/glossary/service-role-overreach-in-cron - PII in Error Traces β
/glossary/pii-in-error-traces - PII in Analytics Events β
/glossary/pii-in-analytics-events - Missing Data Retention Policy β
/glossary/data-retention-policy-missing - Incomplete GDPR Delete Flow β
/glossary/incomplete-gdpr-delete-flow - No Exfiltration Anomaly Detection β
/glossary/no-anomaly-detection-exfiltration - Weak Tenant Isolation Tests β
/glossary/weak-tenant-isolation-tests - Policy Drift After Schema Rename β
/glossary/policy-drift-after-schema-rename - Orphaned Policies After Table Rename β
/glossary/orphaned-policies-after-table-rename - Generated Columns Leak Sensitive Data β
/glossary/generated-columns-sensitive-leak - View Without Security Barrier β
/glossary/view-without-security-barrier - Missing Column-Level Redaction β
/glossary/column-level-redaction-missing - Unrestricted PostgREST Origin Proxy β
/glossary/unrestricted-postgrest-origin - CORS Misconfiguration in Edge Functions β
/glossary/cors-misconfiguration-edge-functions - Missing Webhook Signature Validation β
/glossary/missing-webhook-signature-validation - Webhook Replay Attack Risk β
/glossary/webhook-replay-attack-risk - Billing Webhook Idempotency Gap β
/glossary/billing-webhook-idempotency-gap - Insecure Edge Function Authentication β
/glossary/insecure-edge-function-auth - Edge Function Service Role Overuse β
/glossary/edge-function-service-role-overuse - RPC Dynamic SQL Injection β
/glossary/rpc-dynamic-sql-injection - RPC Missing Input Validation β
/glossary/rpc-missing-input-validation - RPC Unbounded Result Sets β
/glossary/rpc-unbounded-result-set - RPC Error Message Data Leak β
/glossary/rpc-error-data-leak - Public Function Source Disclosure β
/glossary/public-function-source-disclosure - Overloaded RPC Signature Miss β
/glossary/overloaded-rpc-signature-miss - Unrestricted Admin Search Endpoint β
/glossary/unrestricted-admin-search-endpoint - Bulk Export Endpoint Overexposure β
/glossary/bulk-export-endpoint-overexposure - CSV Import Trusts Client Columns β
/glossary/csv-import-trusts-client-columns - Row Ownership Transfer Without Recheck β
/glossary/row-ownership-transfer-without-recheck - File Upload MIME Spoofing β
/glossary/file-upload-mime-spoofing - Storage Upload Size Abuse β
/glossary/storage-upload-size-abuse - Missing Malware Scanning on Uploads β
/glossary/missing-malware-scanning-uploads - Public Backup Bucket Leak β
/glossary/public-backup-bucket-leak - Expired Signed URL Caching Leak β
/glossary/expired-signed-url-caching-leak - Object Path Predictability Risk β
/glossary/object-path-predictability-risk - Storage Lifecycle Policy Missing β
/glossary/storage-lifecycle-policy-missing - Bucket LIST Permission Too Broad β
/glossary/bucket-list-permission-too-broad - Realtime Channel Authorization Gap β
/glossary/realtime-channel-authorization-gap - Realtime Presence Data Leak β
/glossary/realtime-presence-data-leak - Publication Includes Sensitive Tables β
/glossary/publication-includes-sensitive-tables - Replication Role Overgrant β
/glossary/replication-role-overgrant - Unbounded Pagination Enumeration β
/glossary/unbounded-pagination-enumeration - Guessable Primary Keys β
/glossary/guessable-primary-keys - Missing Rate Limits on Write Paths β
/glossary/rate-limit-missing-on-write-paths - Missing CAPTCHA on Sensitive Flows β
/glossary/missing-captcha-sensitive-flows - Insecure Feature Flag Disclosure β
/glossary/insecure-feature-flag-disclosure - No Two-Person Review for Privilege Changes β
/glossary/no-two-person-review-privilege-changes - Dependency Drift Misses Security Updates β
/glossary/dependency-drift-security-updates-missed - Private Key Material in Logs β
/glossary/private-key-material-in-logs - API Cache Leaks Private Data β
/glossary/api-cache-private-data-leak - Data API Public Schema Exposure β
/glossary/data-api-public-schema-exposure - Data API Custom Schema Misconfiguration β
/glossary/data-api-custom-schema-misconfiguration - pg_graphql Extension Exposure β
/glossary/pg-graphql-extension-exposure - Realtime Public Channel Mode β
/glossary/realtime-public-channel-mode - Realtime Topic Policy Mismatch β
/glossary/realtime-topic-policy-mismatch - Realtime Broadcast Overexposure β
/glossary/realtime-broadcast-overexposure - Edge Function JWT Verification Gap β
/glossary/edge-function-jwt-verification-gap - Service Role Authorization Header Override β
/glossary/service-role-authorization-header-override - Publishable vs Secret Key Scope Confusion β
/glossary/publishable-secret-key-scope-confusion - Missing Network Restrictions β
/glossary/missing-network-restrictions - IPv6 Allowlist Gap β
/glossary/ipv6-allowlist-gap - Default Function EXECUTE to PUBLIC β
/glossary/default-function-execute-to-public - Untrusted Language Function Risk β
/glossary/untrusted-language-function-risk - Storage Authenticated Endpoint Overtrust β
/glossary/storage-authenticated-endpoint-overtrust
Recommended fixes (templates)
- Lock down a public table (backend-only access) β
/templates/access-control/lock-down-public-table - Make a bucket private + serve files with signed URLs β
/templates/storage-safety/make-bucket-private-signed-urls - Lock down RPC: revoke EXECUTE from public roles β
/templates/rpc-functions/lock-down-rpc-execute
Common misconceptions to avoid in South Africa
- βWe removed the UI button so the data isnβt reachable.β (Attackers donβt use your UI.)
- βWe have RLS policies, so weβre safe.β (RLS can be disabled, not forced, or too permissive.)
- βFiles are just files.β (Public buckets can leak invoices, exports, and attachments.)
- βWeβll fix it later.β (Drift and forgotten grants/policies are common causes of leaks.)
A review checklist for South Africa (fast, high-signal)
If you only have an hour, use this checklist to reduce the chance of missing the obvious:
- Pick one sensitive table and confirm RLS is enabled/forced where relevant and that grants to client roles are not broad.
- Pick one Storage bucket and confirm it is private and not listable; confirm signed URLs are server-generated and short-lived if used.
- Pick one privileged RPC function and confirm public EXECUTE is revoked; confirm calls go through backend endpoints with auth checks.
- Run one direct access test per surface (tables/Storage/RPC) and save the expected denial as evidence.
- Write down boundary statements and add a drift guard after migrations.
This is not exhaustive β itβs the 80/20 that prevents βwe thought it was safeβ surprises.
Quick recap for South Africa
The most robust baseline in any region is simple and verifiable:
- Treat the browser as untrusted for sensitive operations.
- Keep secrets server-only and avoid logging/persisting sensitive tokens or signed URLs.
- Remove direct client access to sensitive tables, private files, and privileged functions.
- Verify with direct access tests and keep a drift guard after migrations.
Use the regulations and local trends above to decide what to document and monitor more heavily for this location.
FAQ
Is this page legal advice?
No. It summarizes common regulatory considerations and practical security steps. For legal obligations, consult counsel.
Whatβs the fastest risk reduction step regardless of location?
Backend-only access for sensitive resources, plus verification that direct client access fails (tables, storage, and RPC).
How should I validate these recommendations?
Run direct access tests using client credentials, verify backend endpoints enforce auth, and re-scan after fixes to confirm exposure is gone.
Next step
If you want to confirm whatβs exposed in your own project, run a scan first β then apply templates and verify direct client access is blocked.