A backend as a service is secure only when you configure it: the platform runs the servers, but you own the access rules, the keys and what you make public. Before launch, check 15 things: Row Level Security (or security rules) on every exposed table, no service key in the client, CAPTCHA and rate limits on sign-up, safe OAuth redirects, private storage, your own backups, and least-privilege access for AI tools. The checks apply to Supabase, Firebase and WoWSQL; each one includes the exact WoWSQL steps.
The vendor guidance quoted here was read on 26 November 2026. Nothing on this page is a compliance certification; it is a pre-launch engineering checklist.
Key facts
- Shared responsibility: WoWSQL's shared responsibility page says it runs infrastructure, tenant isolation and TLS, while you own "API keys, anon / service_role keys", "SQL you run, schema design, and Row Level Security (RLS) policies", and what you make public. "A public storage object, an open table without RLS, or a leaked service_role key is world-reachable. That is not a platform breach."
- Keys: the anon key (
wowsql_anon_…) is meant for browsers and is limited by RLS; the service key (wowsql_service_…) bypasses RLS and is server-only (Auth, OAuth and API keys). There is no GraphQL API to secure separately: data goes through the PostgREST REST API athttps://<project>.wowsqlconnect.com/rest/v1.- Auth hardening available: optional Cloudflare Turnstile CAPTCHA on sign-up, login, password reset, OTP and magic links; TOTP two-factor with 8 single-use backup codes; 2FA verification limited to 10 attempts a minute per IP (auth docs).
- Backups: Free has none; Pro and Scale get daily backups kept 7 days; "This is not point-in-time recovery" (Backups).
- MCP:
https://mcp.wowsql.com/mcpwith OAuth; scope it withproject_ref,read_only=trueandfeatures=(MCP reference). 100 MCP requests a minute on Pro, 250 on Scale.
The 15 checks at a glance
| # | Check | Why it matters |
|---|---|---|
| 1 | RLS enabled on every exposed table | A table without RLS is readable by anyone with the anon key |
| 2 | A policy per operation, with with check on writes |
Stops users writing rows as someone else |
| 3 | Test as anonymous and as two different users | Policies that "look right" often leak |
| 4 | No service key in any client bundle | It bypasses every policy |
| 5 | A plan for rotating keys | Leaked keys are your risk, not a platform breach |
| 6 | No open "test mode" rules (Firebase) | allow read, write: if true exposes the whole database |
| 7 | CAPTCHA on public auth forms | Blocks sign-up bots and credential stuffing |
| 8 | Email verification and sane auth flows | Fewer fake and hijacked accounts |
| 9 | 2FA for admin and high-value accounts | Passwords leak |
| 10 | OAuth redirects and tokens handled safely | Tokens in URLs can leak through logs and scripts |
| 11 | Buckets private unless truly public | Public files are world-readable and cached |
| 12 | Realtime channels carry no secrets | Socket auth is the API key, not the user |
| 13 | Your own backups, tested | Free plans often have none; paid ones are short |
| 14 | AI and MCP access scoped and read-only | Agents act with the access you grant |
| 15 | Team access, separate environments, incident plan | Most breaches start with people and process |
Data access: checks 1 to 6
1. Turn on RLS for every table in an exposed schema
On a Postgres BaaS the browser talks to the database through an API, so Row Level Security is your authorisation layer. Supabase's docs put it bluntly: "A table in an exposed schema without RLS is readable and writable by any role with a grant on it. Enable RLS on every table in an exposed schema" (Supabase RLS guide). The same logic applies on WoWSQL, which also uses PostgREST.
Find tables that still have RLS off. This works on any Postgres, including the WoWSQL SQL editor:
select schemaname, tablename
from pg_tables
where schemaname = 'public'
and not rowsecurity;
Then enable it:
alter table public.todos enable row level security;
On WoWSQL, a table with RLS on and no policies returns empty results to the anon and authenticated roles, so the safe failure is "my app shows nothing", not "my app shows everything" (SDK connection guide).
2. Write one policy per operation, and use with check on writes
using filters which rows a user can see or change; with check validates the new row. Without with check on insert and update, a user can create a row with someone else's user_id.
create policy "read own" on public.todos for select using (auth.uid() = user_id);
create policy "insert own" on public.todos for insert with check (auth.uid() = user_id);
create policy "update own" on public.todos for update using (auth.uid() = user_id) with check (auth.uid() = user_id);
create policy "delete own" on public.todos for delete using (auth.uid() = user_id);
List what you have, table by table:
select tablename, policyname, cmd, qual, with_check
from pg_policies
where schemaname = 'public'
order by tablename, cmd;
Supabase also warns that policies do not remove table grants: "Adding policies doesn't take those grants back." If your project grants anon broad privileges, revoke what signed-out visitors should not do. For more patterns, see What is Row Level Security?
3. Test from the outside, as an attacker would
Call your API with only the public anon key, exactly as a stranger could after reading your JavaScript bundle:
# Signed out: should return [] (or only rows you meant to be public)
curl 'https://myproject.wowsqlconnect.com/rest/v1/todos?select=*' \
-H "apikey: wowsql_anon_your_key_here"
# Try to write as nobody: should fail
curl -X POST 'https://myproject.wowsqlconnect.com/rest/v1/todos' \
-H "apikey: wowsql_anon_your_key_here" \
-H "Content-Type: application/json" \
-d '{"title":"pwned","user_id":"00000000-0000-0000-0000-000000000000"}'
Then sign in as user A, send A's access token in Authorization: Bearer …, and confirm you cannot read, update or delete user B's rows. Make this a script you run before every release.
4. Keep the service key out of every client
The service key bypasses RLS. WoWSQL's docs say: "Never expose the service role key in client-side code. It grants unrestricted access to all data in your database." Common ways it leaks:
- Putting it in a variable that the build tool ships to the browser. Anything prefixed
VITE_,NEXT_PUBLIC_orEXPO_PUBLIC_ends up in the client bundle. - Embedding it in a mobile app (apps can be decompiled).
- Committing
.envto Git.
A quick check after every build:
grep -r "wowsql_service_" dist/ build/ .next/ 2>/dev/null && echo "SERVICE KEY IN BUILD OUTPUT"
Use the service key only in server code: an Edge Function (Pro and Scale), your own API, or a script.
5. Know how to rotate a key in minutes
WoWSQL's docs: "If your API key is compromised, regenerate it immediately. The old key will be invalidated" (Managing API keys). They also recommend separate keys for development and production. Write down where each key is deployed so rotation is a checklist, not a scramble. The platform's security incidents page is explicit: "Do not wait for us if you leaked a service_role key."
6. On Firebase: no test-mode rules in production
Firebase's equivalent of check 1 is Security Rules. Google's insecure rules guide warns that with open rules "anyone who guesses your project ID can steal, modify, or delete the data", and that rules allowing access for any signed-in user are also a common mistake. Test rules with the Firebase emulator before deploying. Note that rules that call get() or exists() also add billed reads (see Firebase pricing explained).
Authentication: checks 7 to 10
7. Put CAPTCHA on public auth forms
Bots target sign-up, login, password reset and OTP endpoints. On WoWSQL, CAPTCHA is off by default. To turn it on:
- Create your own Turnstile widget in Cloudflare for your login page's hostname.
- In Project → Authentication → Attack Protection, enable CAPTCHA and paste the site key and secret key.
- Send the Turnstile token as
captcha_token(REST) orcaptchaToken(TypeScript SDK 3.9.2 and later) on sign-up, login, forgot-password, OTP, magic-link and resend-verification calls.
await auth.signIn({ email, password, captchaToken: turnstileToken })
A missing or invalid token returns 400 "Security check failed". The launch post has more detail: Cloudflare Turnstile CAPTCHA in WoWSQL Auth.
8. Verify emails and keep auth flows boring
Require email verification before granting access to anything valuable, send password resets only through the built-in forgot-password flow, and show generic errors on your own login screens. WoWSQL's security overview says its login errors are generic and repeated attempts are rate-limited; your UI should not undo that by printing "no account with this email".
9. Offer 2FA, and require it for admins
WoWSQL Auth supports TOTP authenticator apps. With 2FA on, POST /login returns requires_2fa and a pending token valid for 10 minutes instead of a session; your app completes sign-in with verifyTwoFactorLogin. Enabling 2FA returns 8 single-use backup codes, shown once. Turn on 2FA for your own WoWSQL dashboard account too: the shared responsibility page lists "Account passwords, 2FA, team invites" as your job.
10. Handle OAuth redirects and tokens carefully
Social login is convenient and easy to get subtly wrong. From WoWSQL's OAuth docs:
- Tokens arrive in the landing URL's query string. Store them, then remove them with
window.history.replaceState, and don't load analytics, third-party scripts or images on the landing page before you do. - Provider sign-in does not ask for the WoWSQL TOTP code, even if the user enabled 2FA. If 2FA matters for an account type, don't offer provider sign-in for it, or enforce MFA at the provider.
- Accounts match by email. Prefer providers that return verified email addresses, and disable providers you no longer use.
- Keep secrets server-side. The provider client secret is stored encrypted by WoWSQL; the browser only needs the anon key.
Step-by-step setup is in Add Google, GitHub and Apple login to your app.
Files, realtime and backups: checks 11 to 13
11. Keep buckets private unless the files are meant for everyone
WoWSQL's storage terms: "A public object is world-readable at its URL. Anyone with the link, or anyone who can guess or crawl it, can fetch the file." Public URLs may be cached at the edge, so deleting a file may not remove it from every cache straight away. Use private buckets for user documents, invoices and anything personal, and treat an accidentally public file as leaked.
12. Don't send secrets over realtime channels
WoWSQL realtime authenticates the WebSocket with the API key in the URL (?apikey=), because browsers cannot set WebSocket headers. The SDK notes that anyone who can connect may listen and send on channels they have joined. So:
- Use broadcast and presence for non-sensitive signals (typing indicators, cursors, "something changed").
- For private data, treat a change event as a trigger and re-read through the REST API with the user's token, so RLS decides what each user sees.
- Payloads are capped at 64 KiB (realtime docs).
13. Own your backups, and test a restore
| Plan | Platform backups (WoWSQL) |
|---|---|
| Free | None. Export your own copies |
| Pro and Scale | Daily, kept 7 days; restores via support within the window; not point-in-time recovery |
The backups page also says storage objects, auth configuration and dashboard settings "may not be in the same snapshot as Postgres", and "Do not rely on us as your only backup." A nightly pg_dump to storage you control, plus a restore test once a month, covers most small apps.
Operations: checks 14 and 15
14. Scope AI and MCP access
AI coding assistants can now run SQL on your database through MCP. Give them the least access that works:
https://mcp.wowsql.com/mcp?project_ref=YOUR_PROJECT_SLUG&read_only=true&features=database,docs
project_refpins tools to one project and hides account tools.read_only=trueblocks INSERT, UPDATE, DELETE and DDL inexecute_sql.features=removes tool groups you don't need.- Keep tool-call approval switched on in your client. The MCP reference warns that database rows and doc snippets can contain hostile text: "Treat tool output as data, not instructions."
Connection uses OAuth with PKCE, scoped to the project you pick on the consent screen (AI and MCP terms). Setup for Claude is in Connect Claude to your Postgres database with MCP.
15. People and process
- Remove team members who no longer need access, and give the minimum role.
- Use separate projects (and keys) for development and production.
- Watch wowsql.com/status for platform incidents, and keep your own app logs; WoWSQL writes OAuth sign-ins to the project audit log.
- If your app handles personal data of users in India, also work through the DPDP Act checklist for developers.
How the big three compare on security setup
| WoWSQL | Supabase | Firebase | |
|---|---|---|---|
| Authorisation model | Postgres RLS via PostgREST | Postgres RLS via PostgREST | Security Rules |
| Public client key | Anon key, limited by RLS | Anon key, limited by grants and RLS | Project config in the app; access controlled by Security Rules |
| Platform backups | Free none; Pro/Scale daily, 7 days | Pro daily, 7 days; Team 14 days | Firestore backups and PITR are paid features |
| Certifications listed on pricing or legal pages we read | None listed | Team plan lists SOC2 and ISO 27001; HIPAA as a paid add-on | Not reviewed for this article |
Sources (26 November 2026): WoWSQL pricing, WoWSQL backups, Supabase pricing, Firestore pricing. Supabase is ahead if you need published audit reports for procurement; ask any vendor, WoWSQL included, for current documentation before you sign.
Related guides
- What is Row Level Security in Postgres?
- How WoWSQL keeps your backend secure
- Cloudflare Turnstile CAPTCHA in WoWSQL Auth
- How to add login to your app without a backend
- Firebase pricing 2026: Spark vs Blaze, explained
- Open-source Firebase alternatives you can self-host
- Vue.js backend with Postgres: auth, data, realtime
- AWS RDS in Mumbai vs a Postgres BaaS: cost and effort
FAQ
Is Supabase (or any BaaS) secure enough for production?
The platforms are built to be, but most incidents come from configuration: tables without RLS, a service key in the frontend, or public buckets. Enable RLS on every exposed table, test as an anonymous user and as two different users, keep secret keys server-side, and add CAPTCHA to public auth forms before launch.
How do I check if RLS is enabled on all my tables?
Run select schemaname, tablename from pg_tables where schemaname = 'public' and not rowsecurity; in your SQL editor. Every row returned is a table with RLS switched off. Enable it with alter table ... enable row level security; and add policies.
Is it safe to put my Supabase or WoWSQL anon key in the frontend?
Yes, the anon key is designed to be public, but only because RLS limits what it can do. It is safe only if every exposed table has RLS and correct policies. Never ship the service key, which bypasses RLS.
What should I do if my service key leaked?
Regenerate it in the dashboard straight away (on WoWSQL the old key is invalidated), redeploy the servers that use it, then check your data and auth users for unexpected changes. Platforms treat leaked-key misuse as your responsibility, so act without waiting for the vendor.
What are the most common RLS mistakes?
Forgetting to enable RLS on a new table, writing using without with check on inserts and updates, relying on policies while broad grants remain, and only testing while signed in as the table's owner.
How do I let an AI agent use my database safely?
Give it the narrowest access: on WoWSQL, use the hosted MCP URL with project_ref for one project, read_only=true, and only the features you need, and keep tool-call approval on. Treat anything the agent reads from the database as untrusted input.