<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Denys</title>
    <description>The latest articles on DEV Community by Denys (zaichenko).</description>
    <link>https://dev.to/zaichenko</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F15610%2Fff2f6408-7a5d-4416-81d7-09123915f68c.jpeg</url>
      <title>DEV Community: Denys</title>
      <link>https://dev.to/zaichenko</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zaichenko"/>
    <language>en</language>
    <item>
      <title>Document management software for small business: 8 priced</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Mon, 16 Nov 2026 15:00:49 +0000</pubDate>
      <link>https://dev.to/zaichenko/document-management-software-for-small-business-8-priced-2aej</link>
      <guid>https://dev.to/zaichenko/document-management-software-for-small-business-8-priced-2aej</guid>
      <description>&lt;p&gt;TL;DR. Document management software for small business starts at about USD 2.50 per user a month for Zoho WorkDrive and USD 7 for Microsoft 365, where SharePoint is included, and climbs to USD 65 for M-Files. Most real bills are set by three things the price page shows last: the seat minimum, the setup fee and the storage or AI limits. If your team mostly stores and shares files, a suite you already pay for is usually enough. If you file by client, contract or project and need approvals, a dedicated tool earns its price. When neither fits, a platform built around your own folders and rules can cost far less to run. One company I built for stopped paying for modules nobody opened.&lt;/p&gt;

&lt;p&gt;I'm Denys, a full-stack and AI engineer. I build internal systems for small firms, including a document platform that moved construction teams off shared spreadsheets and docs. This list is for the owner or office manager who has to pick the tool and pay for it. Prices come from vendor pages and dated comparison sites I read in October and November 2026. Most are per user a month and net of tax, so check the vendor page on the day you buy.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should document management software for small business do?
&lt;/h2&gt;

&lt;p&gt;It should replace "which version is the latest, and who has it?" with one place that answers. In practice that means five things.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Storage and search.&lt;/strong&gt; Every file in one place, found by name, text inside the file or its tags.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Version history.&lt;/strong&gt; The last good copy comes back in a click.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Permissions.&lt;/strong&gt; Who can open, edit or share which folder.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sharing and signing.&lt;/strong&gt; Links for clients and suppliers, and e-signature, without email attachments.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approvals and retention.&lt;/strong&gt; A contract is reviewed before it's final, and old records are kept or deleted on a schedule.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most small firms need the first four on day one. Approvals and retention are where the cheap tools stop and the expensive ones start.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 8 tools compared
&lt;/h2&gt;

&lt;p&gt;There's no single best document management system for small business. The right pick depends on whether you need plain storage or filing with rules. Prices are list prices per user a month, billed yearly, in USD unless stated.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Tool&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;Price (Nov 2026)&lt;/th&gt;
&lt;th&gt;Billing unit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Microsoft SharePoint&lt;/td&gt;
&lt;td&gt;teams already on Microsoft 365&lt;/td&gt;
&lt;td&gt;USD 7 (inside Business Basic)&lt;/td&gt;
&lt;td&gt;per user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Google Drive&lt;/td&gt;
&lt;td&gt;simple shared storage, real-time editing&lt;/td&gt;
&lt;td&gt;USD 8.40&lt;/td&gt;
&lt;td&gt;per user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dropbox Business&lt;/td&gt;
&lt;td&gt;file sync and sharing&lt;/td&gt;
&lt;td&gt;USD 15 Standard, USD 24 Advanced&lt;/td&gt;
&lt;td&gt;per user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Box&lt;/td&gt;
&lt;td&gt;external sharing, governance&lt;/td&gt;
&lt;td&gt;from USD 5, USD 15 Business&lt;/td&gt;
&lt;td&gt;per user, 3-user minimum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Zoho WorkDrive&lt;/td&gt;
&lt;td&gt;tight budgets, Zoho users&lt;/td&gt;
&lt;td&gt;USD 2.50&lt;/td&gt;
&lt;td&gt;per user, 3-user minimum&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Egnyte&lt;/td&gt;
&lt;td&gt;file-server replacement, project files&lt;/td&gt;
&lt;td&gt;USD 22&lt;/td&gt;
&lt;td&gt;per user&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;M-Files&lt;/td&gt;
&lt;td&gt;filing by client, project or contract&lt;/td&gt;
&lt;td&gt;USD 65 Essentials&lt;/td&gt;
&lt;td&gt;per seat&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Folderit&lt;/td&gt;
&lt;td&gt;small teams that want a flat price&lt;/td&gt;
&lt;td&gt;USD 65 a month for 5 users&lt;/td&gt;
&lt;td&gt;per package&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Sources are in each entry below. Microsoft, Google and Zoho prices are according to &lt;a href="https://techpresso.co/reviews/best-document-management-software" rel="noopener noreferrer"&gt;Techpresso&lt;/a&gt; and &lt;a href="https://www.capterra.com/resources/document-management-software-pricing-models/" rel="noopener noreferrer"&gt;Capterra&lt;/a&gt;, because those vendors' own pages blocked or hid the figures when I read them.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Microsoft SharePoint
&lt;/h3&gt;

&lt;p&gt;SharePoint comes inside Microsoft 365. Business Basic is USD 7 per user a month paid yearly, with version history, permissions and 1 TB of OneDrive per person, according to &lt;a href="https://techpresso.co/reviews/best-document-management-software" rel="noopener noreferrer"&gt;Techpresso&lt;/a&gt;. List prices rose on 1 July 2026 (&lt;a href="https://www.pandadoc.com/blog/best-document-management-software/" rel="noopener noreferrer"&gt;PandaDoc&lt;/a&gt;). It rewards setup effort. Nothing is wrong out of the box, but nothing is tidy either.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Google Drive
&lt;/h3&gt;

&lt;p&gt;Google's Workspace plans run USD 8.40, 16.80 and 26.40 per user a month, according to &lt;a href="https://www.capterra.com/resources/document-management-software-pricing-models/" rel="noopener noreferrer"&gt;Capterra&lt;/a&gt; (September 2026 data). Shared drives and real-time editing are strong. It lacks the approval and retention rules of a dedicated tool.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Dropbox Business
&lt;/h3&gt;

&lt;p&gt;Standard is USD 15 per user a month from one person, with 3 TB of team storage. Advanced is USD 24 for three people or more, with 15 TB (&lt;a href="https://www.dropbox.com/business/plans-comparison" rel="noopener noreferrer"&gt;Dropbox&lt;/a&gt;). Sync is its strength. It isn't a workflow engine.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Box
&lt;/h3&gt;

&lt;p&gt;Box's pricing page opens at USD 5 per user a month and has a free 10 GB single-user plan (&lt;a href="https://www.box.com/pricing" rel="noopener noreferrer"&gt;Box&lt;/a&gt;). The Business plan is USD 15 per user with a three-user minimum, according to &lt;a href="https://pickmysoft.com/blog/best-document-management-systems" rel="noopener noreferrer"&gt;PickMySoft&lt;/a&gt;. Good for sharing with outside parties. The Governance add-on that carries retention and legal holds is extra (&lt;a href="https://techpresso.co/reviews/best-document-management-software" rel="noopener noreferrer"&gt;Techpresso&lt;/a&gt;).&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Zoho WorkDrive
&lt;/h3&gt;

&lt;p&gt;The cheapest here. From USD 2.50 per user a month billed yearly, with a three-user minimum, according to &lt;a href="https://techpresso.co/reviews/best-document-management-software" rel="noopener noreferrer"&gt;Techpresso&lt;/a&gt;. It makes most sense if you already use Zoho apps.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Egnyte
&lt;/h3&gt;

&lt;p&gt;Business is USD 22 per user a month, Enterprise Lite USD 39 and Elite USD 48, all paid annually (&lt;a href="https://www.egnyte.com/pricing" rel="noopener noreferrer"&gt;Egnyte&lt;/a&gt;). It's aimed at regulated or project-heavy firms (&lt;a href="https://techpresso.co/reviews/best-document-management-software" rel="noopener noreferrer"&gt;Techpresso&lt;/a&gt;). Content lifecycle management and ransomware detection start at Enterprise Lite.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. M-Files
&lt;/h3&gt;

&lt;p&gt;M-Files files by what a document is (client, project, contract type) instead of by folder. Essentials is USD 65 per seat a month. Enterprise is by quote (&lt;a href="https://www.m-files.com/pricing/" rel="noopener noreferrer"&gt;M-Files&lt;/a&gt;). It's the most expensive per head on this list, and the only one where filing logic is the product.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Folderit
&lt;/h3&gt;

&lt;p&gt;Folderit sells packages, not seats. Mini is USD 65 a month (or USD 581 a year) for 5 users and 150 GB, and Medium is USD 1,165 a year for 10 users and 500 GB, with simple approval workflows (&lt;a href="https://www.folderit.com/fi/hinnasto/" rel="noopener noreferrer"&gt;Folderit&lt;/a&gt;). Folderit is the vendor of that page, so read it as a vendor source. A flat package is easy to budget until you need user eleven.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does document storage software for small business cost beyond the headline price?
&lt;/h2&gt;

&lt;p&gt;The price page is rarely the bill. Four costs show up later.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Seat minimums.&lt;/strong&gt; Laserfiche's published tiers need 5 and 25 users, Box 3, Dropbox Advanced 3 (&lt;a href="https://customerexperience.io/blog/document-management-system-pricing-dms-cost-vendors" rel="noopener noreferrer"&gt;Customer Experience&lt;/a&gt;, &lt;a href="https://www.dropbox.com/business/plans-comparison" rel="noopener noreferrer"&gt;Dropbox&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setup.&lt;/strong&gt; Advisors on Software Advice report quotes of USD 50 to 100 per user a month and a one-time setup fee of USD 1,500 to 5,000, with a median of USD 4,000 (&lt;a href="https://www.softwareadvice.com/category/722-document-management/" rel="noopener noreferrer"&gt;Software Advice&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage and AI limits.&lt;/strong&gt; Whether storage is per user or per account, and how much AI processing is included, are among the four things vendors bury below the headline rate (&lt;a href="https://customerexperience.io/blog/document-management-system-pricing-dms-cost-vendors" rel="noopener noreferrer"&gt;Customer Experience&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No price at all.&lt;/strong&gt; DocuWare gives a range of USD 30 to 125 or more per user a month for its cloud and prints no tier prices (&lt;a href="https://customerexperience.io/blog/document-management-system-pricing-dms-cost-vendors" rel="noopener noreferrer"&gt;Customer Experience&lt;/a&gt;). You can't budget what you can't read.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a ten-person team the arithmetic is simple: price times ten times twelve. Using the published list prices above, that's USD 840 a year on Microsoft 365 Business Basic, USD 1,800 on Dropbox Standard, USD 2,640 on Egnyte Business and USD 7,800 on M-Files Essentials, before setup.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fdocument-management-software-for-small-business.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fdocument-management-software-for-small-business.svg" alt="One year of list price for a team of 10. USD per year: 10 users × 12 months, entry plan, before setup. Microsoft 365 Business Basic (includes SharePoint): 840. Dropbox Business Standard: 1,800. Egnyte Business: 2,640. M-Files Essentials: 7,800." width="720" height="454"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source: Microsoft 365 Business Basic via Techpresso, Dropbox, Egnyte and M-Files pricing pages, my multiplication, November 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Is there a free option? Box has a free 10 GB plan for one user (&lt;a href="https://www.box.com/pricing" rel="noopener noreferrer"&gt;Box&lt;/a&gt;). Paperless-ngx is open source with no licence cost, but you run and maintain it yourself (&lt;a href="https://erp-4-business.de/myfactory-erp-blog/beste-dokumentenmanagementsysteme-fur-kmu" rel="noopener noreferrer"&gt;myfactory blog&lt;/a&gt;). Free is worth it for a person. For a team, the time you spend running it is the price.&lt;/p&gt;

&lt;h2&gt;
  
  
  Can staff open folders they should not?
&lt;/h2&gt;

&lt;p&gt;In most of these tools, yes, unless you configure it carefully. Vendors describe roles (admin, editor, viewer). The sensitive cases are the side doors: a search result, a notification email, a shared link or an export that shows a file the folder list hides.&lt;/p&gt;

&lt;p&gt;Before you buy, test it. Create a folder only one colleague may see, then sign in as someone else and try search, direct links, notifications and exports. When I built a tracker for an audit firm, a confidential client leaked through report totals and tag counts long after the client list itself was hidden. That story is in &lt;a href="https://madsalt.tech/blog/time-tracking-for-audit-firms/" rel="noopener noreferrer"&gt;time tracking for audit firms: 4 silent errors&lt;/a&gt;. The same test finds the same holes in a document tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  When is a system of your own cheaper than a subscription?
&lt;/h2&gt;

&lt;p&gt;When you pay per seat for a suite you use a third of, or you need rules no product expresses. For example a document that one role must approve before another sees it, or a contract folder visible to three named people. A custom platform on a managed database has no per-user licence. The running cost is the database plan, and hosting and email often fit in free tiers. The cost moves to the build, so it pays off when your subscription is large and your way of working is stable.&lt;/p&gt;

&lt;p&gt;Buy first if you're under five people, your folders are standard, or you need e-signature with legal weight out of the box. Those are years of vendor work to rebuild. If your documents arrive as scanned PDFs and the real job is getting their data out, see &lt;a href="https://madsalt.tech/blog/pdf-invoice-to-excel/" rel="noopener noreferrer"&gt;turning PDF invoices into Excel&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  My case
&lt;/h2&gt;

&lt;p&gt;A company I built for was paying thousands of dollars a month for an enterprise document product. Its own platform now costs hundreds a month, and it has exactly the features the team uses, so it stopped paying for modules nobody opened.&lt;/p&gt;

&lt;p&gt;The build is in the &lt;a href="https://madsalt.tech/work/construction-document-platform/" rel="noopener noreferrer"&gt;construction document platform case&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Limits of this list
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Prices&lt;/strong&gt; are list prices I read in October and November 2026 from vendor pages and dated comparison sites, per user a month, mostly billed yearly and net of tax. Microsoft's own page blocked my reader, so its price and Google's and Zoho's come from comparison sites. They change often.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Not tested hands-on.&lt;/strong&gt; I compared published plans and scope. I didn't run each tool with a real team.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Eight tools, not the market.&lt;/strong&gt; Several vendors publish no price (DocuWare, ELO, OpenText and others) and are left out of the table.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The ten-person line&lt;/strong&gt; is my multiplication of published list prices, without setup, taxes or add-ons.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/blog/document-management-software-for-small-business/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>software</category>
      <category>tools</category>
    </item>
    <item>
      <title>Supabase "RLS disabled in public": what it means</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Fri, 13 Nov 2026 12:10:47 +0000</pubDate>
      <link>https://dev.to/zaichenko/supabase-rls-disabled-in-public-what-it-means-4cdh</link>
      <guid>https://dev.to/zaichenko/supabase-rls-disabled-in-public-what-it-means-4cdh</guid>
      <description>&lt;p&gt;TL;DR. "RLS Disabled in Public" (lint &lt;code&gt;0013_rls_disabled_in_public&lt;/code&gt;, level ERROR) means a table in an exposed schema has row level security off while &lt;code&gt;anon&lt;/code&gt; or &lt;code&gt;authenticated&lt;/code&gt; can select from it. In my local test the public key read all 3 of 3 rows from such a table and inserted a new one with &lt;code&gt;201 Created&lt;/code&gt;. Enable RLS, add a policy per operation and check the grants, all in one migration.&lt;/p&gt;

&lt;p&gt;I built a free Supabase security checker and this is the finding I see most in apps built with AI tools. Supabase's Security Advisor reports it as an error. Here is what it means and what it allowed when I reproduced it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does "RLS disabled in public" mean?
&lt;/h2&gt;

&lt;p&gt;The Security Advisor runs a lint called &lt;code&gt;rls_disabled_in_public&lt;/code&gt;. Its &lt;a href="https://github.com/supabase/splinter/issues/82" rel="noopener noreferrer"&gt;SQL&lt;/a&gt; flags a table when three things are true at once:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;It's an ordinary table with row level security off.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;anon&lt;/code&gt; or &lt;code&gt;authenticated&lt;/code&gt; has &lt;code&gt;SELECT&lt;/code&gt; on it.&lt;/li&gt;
&lt;li&gt;Its schema is in the Data API's Exposed schemas list, which is &lt;code&gt;public&lt;/code&gt; by default.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The &lt;a href="https://supabase.github.io/splinter/0013_rls_disabled_in_public/" rel="noopener noreferrer"&gt;lint page&lt;/a&gt; rates it ERROR and calls full create, read, update and delete over the internet "a critically unsafe configuration". The "public" in the name is the schema, but the lint covers every exposed schema. That's why an extra schema on that list deserves a look too, and I wrote about it in &lt;a href="https://madsalt.tech/notes/supabase-exposed-schemas/" rel="noopener noreferrer"&gt;Supabase exposed schemas&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can the public key do to such a table?
&lt;/h2&gt;

&lt;p&gt;I created a table &lt;code&gt;orders&lt;/code&gt; with three fake customers on a local Supabase stack (CLI 2.109.1, Postgres 17.6, PostgREST 14.14), with the grants existing projects give new tables, and RLS off. Then I called the Data API with the publishable key, the way a browser does.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-rls-disabled-in-public.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-rls-disabled-in-public.svg" alt="One table, the public key, RLS off and on. Local Supabase, 3 rows of fake orders. RLS off, read: Publishable key → orders, RLS off → 3 of 3 rows. RLS off, insert: Publishable key → orders, RLS off → 201 Created. RLS on, no policy yet: Publishable key → orders, RLS on → 0 rows." width="720" height="454"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;My reproduction on a local Supabase stack, 23 October 2026.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request with the publishable key&lt;/th&gt;
&lt;th&gt;RLS off&lt;/th&gt;
&lt;th&gt;RLS on, no policy&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;GET /rest/v1/orders?select=*&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;200&lt;/code&gt;, all 3 rows with names and emails&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;200&lt;/code&gt;, &lt;code&gt;[]&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;code&gt;POST /rest/v1/orders&lt;/code&gt; with a new row&lt;/td&gt;
&lt;td&gt;&lt;code&gt;201 Created&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;401&lt;/code&gt;, 42501 "new row violates row-level security policy"&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Anyone who opens your app can copy the publishable key from the page. With RLS off, that key is a read and write pass to the table.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do you fix it without breaking the app?
&lt;/h2&gt;

&lt;p&gt;If you only enable RLS, the table returns nothing to the app, because there's no policy yet. That empty screen is the moment when people, and AI tools, add a policy with &lt;code&gt;using (true)&lt;/code&gt;, and that hands every row back to everyone. Write the real policies in the same migration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;alter&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="k"&gt;row&lt;/span&gt; &lt;span class="n"&gt;level&lt;/span&gt; &lt;span class="n"&gt;security&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;revoke&lt;/span&gt; &lt;span class="k"&gt;all&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="s2"&gt;"Customers read their orders"&lt;/span&gt;
&lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;
&lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="s2"&gt;"Customers create their orders"&lt;/span&gt;
&lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;orders&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt;
&lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="k"&gt;check&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a table is meant to be public, like a list of published articles, keep RLS on anyway and write one &lt;code&gt;select&lt;/code&gt; policy for &lt;code&gt;anon&lt;/code&gt;, with no write grants. If you never use the Data API and only talk to Postgres from your server, remove &lt;code&gt;public&lt;/code&gt; from Exposed schemas instead. Supabase's maintainers suggested that in the &lt;a href="https://github.com/supabase/splinter/issues/82" rel="noopener noreferrer"&gt;same issue&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;To make sure new tables never start without RLS, Supabase's &lt;a href="https://supabase.com/docs/guides/database/postgres/event-triggers" rel="noopener noreferrer"&gt;event triggers guide&lt;/a&gt; has a trigger that enables it on every table created in &lt;code&gt;public&lt;/code&gt;. And from 30 October 2026 new tables get no Data API grants by default, so they answer &lt;code&gt;42501&lt;/code&gt; until you grant them. I covered that in &lt;a href="https://madsalt.tech/notes/supabase-42501-permission-denied/" rel="noopener noreferrer"&gt;Supabase 42501 permission denied&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a clean result not prove?
&lt;/h2&gt;

&lt;p&gt;RLS being on says nothing about whether the policies are right. In the same test a policy written as &lt;code&gt;using (true)&lt;/code&gt; gave the public key all 3 rows again, and this lint stays quiet once RLS is on. Policies that allow every row need a separate check. &lt;a href="https://madsalt.tech/blog/how-to-test-supabase-rls/" rel="noopener noreferrer"&gt;How to test Supabase RLS&lt;/a&gt; shows how to prove each policy against real users.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/notes/supabase-rls-disabled-in-public/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>postgres</category>
      <category>security</category>
    </item>
    <item>
      <title>What a WhatsApp AI chatbot costs to run after Meta's October 2026 change</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Wed, 11 Nov 2026 10:00:48 +0000</pubDate>
      <link>https://dev.to/zaichenko/what-a-whatsapp-ai-chatbot-costs-to-run-after-metas-october-2026-change-1jn2</link>
      <guid>https://dev.to/zaichenko/what-a-whatsapp-ai-chatbot-costs-to-run-after-metas-october-2026-change-1jn2</guid>
      <description>&lt;p&gt;TL;DR. Since 1 October 2026, Meta charges for the bot's replies too. The first 1,000 replies per phone number each month are free, then every reply costs the same as a utility message. For a business in Portugal that is USD 0.0171 (EUR 0.0142) per reply. A reply from a small AI model costs about USD 0.0002 in tokens, so on a cheap model Meta's fee is roughly 85 times the AI bill. A bot that sends 3,000 replies a month to Portuguese numbers pays Meta about EUR 28.40.&lt;/p&gt;

&lt;p&gt;I'm Denys, a full-stack and AI engineer. I built an interactive prototype of a WhatsApp and Telegram chatbot on sample chats. It has a visual flow builder, AI answers from the company's own documents, lead scoring and a handoff to staff. Below is how such a bot is put together and what it costs to run, worked out from Meta's rate card and the model vendors' price pages, all read on 15 October 2026.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does a WhatsApp chatbot cost? What Meta charges
&lt;/h2&gt;

&lt;p&gt;Meta's part of the bill is USD 0.0171 (EUR 0.0142) per reply to a Portuguese number once the first 1,000 replies a month are used, and a small AI model adds about USD 0.0002 per reply. Meta charges per message the business delivers, never for messages customers send. The price depends on the message type and on the country code of the customer's phone number, and it doesn't depend on where your business is.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Service messages&lt;/strong&gt; are the bot's free-form replies inside the 24-hour window that opens when a customer writes. Since 1 October 2026 the first 1,000 per phone number each month are free. After that each one costs the utility rate.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Utility templates&lt;/strong&gt; are updates such as booking confirmations and reminders. Since 1 October 2026 they are charged even inside the 24-hour window.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Marketing templates&lt;/strong&gt; are promotions, offers and anything else that isn't a transactional update. They are the expensive category and never get cheaper with volume.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Free entry point.&lt;/strong&gt; When a customer arrives through a Click-to-WhatsApp ad and you reply within 24 hours, messages in that conversation are free for up to 7 days.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Meta's rate card effective 1 October 2026, per delivered message:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Customer's country&lt;/th&gt;
&lt;th&gt;Marketing&lt;/th&gt;
&lt;th&gt;Utility, authentication and service&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Portugal (billed as "Rest of Western Europe")&lt;/td&gt;
&lt;td&gt;USD 0.0592 (EUR 0.049)&lt;/td&gt;
&lt;td&gt;USD 0.0171 (EUR 0.0142)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brazil&lt;/td&gt;
&lt;td&gt;USD 0.0625 (BRL 0.3217)&lt;/td&gt;
&lt;td&gt;USD 0.0068 (BRL 0.035)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spain&lt;/td&gt;
&lt;td&gt;USD 0.0707&lt;/td&gt;
&lt;td&gt;USD 0.0200&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Germany&lt;/td&gt;
&lt;td&gt;USD 0.1365&lt;/td&gt;
&lt;td&gt;USD 0.0550&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;United Kingdom&lt;/td&gt;
&lt;td&gt;USD 0.0635&lt;/td&gt;
&lt;td&gt;USD 0.0220&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;United States and Canada&lt;/td&gt;
&lt;td&gt;USD 0.0250&lt;/td&gt;
&lt;td&gt;USD 0.0034&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Meta changes these rates only on the first day of a quarter. Check the &lt;a href="https://developers.facebook.com/documentation/business-messaging/whatsapp/pricing" rel="noopener noreferrer"&gt;official pricing page&lt;/a&gt; before you plan, because several popular guides still describe the old rules, where replies inside the window were free.&lt;/p&gt;

&lt;h2&gt;
  
  
  How much does each AI reply cost?
&lt;/h2&gt;

&lt;p&gt;The model is billed in tokens. That's the text you send in (instructions, document passages, recent messages) and the text it writes back. A useful working assumption is about 1,600 tokens in and 80 tokens out per reply. One chatbot vendor reports that average from its own logs. Your bot will differ, so measure it once it runs.&lt;/p&gt;

&lt;p&gt;Every business picks a different model, so here is the same reply priced on several. Prices are OpenRouter's list on 15 October 2026, which matches the vendors' own price pages:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Price per million tokens, in / out&lt;/th&gt;
&lt;th&gt;One reply (calculated)&lt;/th&gt;
&lt;th&gt;3,000 replies a month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DeepSeek V4.1 Flash&lt;/td&gt;
&lt;td&gt;USD 0.024 / 0.72&lt;/td&gt;
&lt;td&gt;about USD 0.0001&lt;/td&gt;
&lt;td&gt;USD 0.29&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Haiku 5.5, GPT-6 Luna&lt;/td&gt;
&lt;td&gt;USD 0.10 / 0.50&lt;/td&gt;
&lt;td&gt;about USD 0.0002&lt;/td&gt;
&lt;td&gt;USD 0.60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Qwen3.8 Flash&lt;/td&gt;
&lt;td&gt;USD 0.15 / 0.47&lt;/td&gt;
&lt;td&gt;about USD 0.0003&lt;/td&gt;
&lt;td&gt;USD 0.83&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mistral Small 4&lt;/td&gt;
&lt;td&gt;USD 0.15 / 0.60&lt;/td&gt;
&lt;td&gt;about USD 0.0003&lt;/td&gt;
&lt;td&gt;USD 0.86&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3.5 Flash Lite&lt;/td&gt;
&lt;td&gt;USD 0.30 / 2.50&lt;/td&gt;
&lt;td&gt;about USD 0.0007&lt;/td&gt;
&lt;td&gt;USD 2.04&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Gemini 3.8 Flash&lt;/td&gt;
&lt;td&gt;USD 0.75 / 3.75&lt;/td&gt;
&lt;td&gt;about USD 0.0015&lt;/td&gt;
&lt;td&gt;USD 4.50&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Sonnet 5.5, GPT-6.1 Sol&lt;/td&gt;
&lt;td&gt;USD 2 / 10&lt;/td&gt;
&lt;td&gt;about USD 0.004&lt;/td&gt;
&lt;td&gt;USD 12&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Claude Opus 5.5&lt;/td&gt;
&lt;td&gt;USD 4 / 20&lt;/td&gt;
&lt;td&gt;about USD 0.008&lt;/td&gt;
&lt;td&gt;USD 24&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fwhatsapp-ai-chatbot-for-business.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fwhatsapp-ai-chatbot-for-business.svg" alt="3,000 bot replies a month in Portugal. USD per month. Meta: first 1,000 replies free, 2,000 paid. Meta's fee: USD 34.20, AI on Claude Opus 5.5: USD 24, AI on Claude Sonnet 5.5: USD 12, AI on a small model (Claude Haiku 5.5): USD 0.60." width="720" height="428"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Sources: Meta rate card from 1 October 2026, OpenRouter list prices, 15 October 2026.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So the choice of model moves the AI bill about 80 times, from USD 0.29 to USD 24 for the same 3,000 replies. Even on Claude Opus 5.5 that is less than Meta's USD 34.20 for those replies in Portugal. On a small model, Meta's fee is the bigger line by far. A small model is often enough for answering questions from your own documents, and you can send only the hard cases to a larger one.&lt;/p&gt;

&lt;p&gt;What an agent costs beyond its replies, from the build to hosting, is in &lt;a href="https://madsalt.tech/blog/how-much-does-an-ai-agent-cost/" rel="noopener noreferrer"&gt;how much an AI agent costs to run&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does one bot cost per month in different countries?
&lt;/h2&gt;

&lt;p&gt;Take one bot on one phone number that sends 3,000 replies a month, all inside the 24-hour window, on a small model. These are calculations from the prices above and not an invoice:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Customers in&lt;/th&gt;
&lt;th&gt;Meta: 2,000 paid replies&lt;/th&gt;
&lt;th&gt;AI: 3,000 replies on a small model&lt;/th&gt;
&lt;th&gt;Total per month&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Portugal&lt;/td&gt;
&lt;td&gt;USD 34.20 (EUR 28.40)&lt;/td&gt;
&lt;td&gt;about USD 0.60&lt;/td&gt;
&lt;td&gt;about USD 35&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Brazil&lt;/td&gt;
&lt;td&gt;USD 13.60 (BRL 70)&lt;/td&gt;
&lt;td&gt;about USD 0.60&lt;/td&gt;
&lt;td&gt;about USD 14&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Spain&lt;/td&gt;
&lt;td&gt;USD 40.00&lt;/td&gt;
&lt;td&gt;about USD 0.60&lt;/td&gt;
&lt;td&gt;about USD 41&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Germany&lt;/td&gt;
&lt;td&gt;USD 110.00&lt;/td&gt;
&lt;td&gt;about USD 0.60&lt;/td&gt;
&lt;td&gt;about USD 111&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;United Kingdom&lt;/td&gt;
&lt;td&gt;USD 44.00&lt;/td&gt;
&lt;td&gt;about USD 0.60&lt;/td&gt;
&lt;td&gt;about USD 45&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;United States&lt;/td&gt;
&lt;td&gt;USD 6.80&lt;/td&gt;
&lt;td&gt;about USD 0.60&lt;/td&gt;
&lt;td&gt;about USD 7&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Add hosting for the webhook and the knowledge base, and any partner fee if you connect through a WhatsApp solution provider instead of Meta's Cloud API directly. Meta itself charges no extra fee for using the platform directly. Partners set their own markup.&lt;/p&gt;

&lt;p&gt;The same bot sending 1,000 marketing messages a month would add USD 59.20 in Portugal and USD 136.50 in Germany. Promotions are where WhatsApp gets expensive, and answers aren't.&lt;/p&gt;

&lt;h2&gt;
  
  
  How is a WhatsApp AI chatbot built?
&lt;/h2&gt;

&lt;p&gt;Five parts, in the order a message travels:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;The channel.&lt;/strong&gt; WhatsApp messages arrive through Meta's WhatsApp Business Platform as webhook calls to your server. The same bot can serve Telegram and a website chat widget. The prototype handles all three in one inbox.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The flow.&lt;/strong&gt; A visual flow builder decides how a conversation goes. The prototype has nine kinds of steps: start, message, question, AI response, condition, action, delay, handoff and end. Fixed steps handle the greeting, the qualifying questions and the handoff, and the AI fills only the open parts.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The knowledge base.&lt;/strong&gt; The bot answers from documents the company uploads and not from whatever the model remembers. Every AI reply carries the source it used, so staff can check it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The handoff.&lt;/strong&gt; When the bot is unsure, it hands the chat to a person instead of guessing. Below a confidence line, a human takes over in the shared inbox.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The lead record.&lt;/strong&gt; Each contact is marked cold, warm, hot or customer, gets a short summary, and hot leads go to the CRM.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why should the bot answer only from your documents?
&lt;/h2&gt;

&lt;p&gt;A model left to answer freely sounds sure even when it's wrong, and nobody can check where an answer came from. In the prototype I chose answers from uploaded documents, with a handoff below a confidence line. The cost of that choice is that someone has to keep the documents current, or the bot will confidently repeat last year's prices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who should control how a conversation goes?
&lt;/h2&gt;

&lt;p&gt;The team should, and the model shouldn't. When the model leads every chat, conversations drift and a lead can leave without being asked the questions that matter: what they need, when, and how to reach them. A flow builder keeps those steps fixed and lets the AI handle what customers actually type in between. The cost is that every flow needs an owner who updates it when the offer changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What can go wrong with the bill?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No payment method on file.&lt;/strong&gt; Without one, Meta still delivers the first 1,000 free replies each month, then stops delivering replies until you add one.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reminders sent as the wrong type.&lt;/strong&gt; A message Meta treats as marketing costs about 3.5 times a utility message in Portugal and 9 times in Brazil. Keep reminders and confirmations strictly informational.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompts that grow.&lt;/strong&gt; Sending the whole chat history and every document with each reply multiplies the token bill quietly. Send the last few messages and the few passages that match the question.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Old guides.&lt;/strong&gt; Many pricing pages written before 1 October 2026 still say replies inside the window are free. For a bot that mostly answers, that's the line that changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Platform subscription or a custom bot? What providers charge
&lt;/h2&gt;

&lt;p&gt;Meta's fee and the AI bill are only part of the price. A provider that builds or hosts the bot charges for that on top. These are the entry prices the providers publish, copied as shown on the source pages and read on 22 October 2026. Currencies differ because each provider lists its own.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Provider&lt;/th&gt;
&lt;th&gt;Entry plan&lt;/th&gt;
&lt;th&gt;Includes&lt;/th&gt;
&lt;th&gt;Checked&lt;/th&gt;
&lt;th&gt;Source&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SoyAgentia&lt;/td&gt;
&lt;td&gt;USD 59 a month (Basico), USD 99 (Plus), USD 199 (Enterprise)&lt;/td&gt;
&lt;td&gt;1,200, 3,500 or 7,500 AI replies a month, USD 15 per extra user&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.soyagentia.com/cuanto-cuesta-un-chatbot-whatsapp/" rel="noopener noreferrer"&gt;SoyAgentia&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Wati&lt;/td&gt;
&lt;td&gt;USD 69 a month (Growth, monthly billing, US page)&lt;/td&gt;
&lt;td&gt;3 users, 500 active contacts a month&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.soyagentia.com/cuanto-cuesta-un-chatbot-whatsapp/" rel="noopener noreferrer"&gt;SoyAgentia comparison&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ManyChat&lt;/td&gt;
&lt;td&gt;USD 39 a month (Pro, or USD 29 billed yearly)&lt;/td&gt;
&lt;td&gt;2,500 active contacts, USD 0.05 per extra contact on monthly billing&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://www.soyagentia.com/cuanto-cuesta-un-chatbot-whatsapp/" rel="noopener noreferrer"&gt;SoyAgentia comparison&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Chately&lt;/td&gt;
&lt;td&gt;USD 39 a month (Esencial), USD 89 (Crecimiento), USD 159 (Empresarial)&lt;/td&gt;
&lt;td&gt;Flows, AI agents with monthly AI credits, shared inbox, CRM&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://chately.co/blog/chatbot-whatsapp-empresas" rel="noopener noreferrer"&gt;Chately&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subscription platforms in Spain&lt;/td&gt;
&lt;td&gt;EUR 50 to 300 a month&lt;/td&gt;
&lt;td&gt;Visual flow editor, and some add their own fee on top of Meta's&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://novachatia.com/blog/cuanto-cuesta-chatbot-whatsapp-empresa-2026/" rel="noopener noreferrer"&gt;NovaChat IA&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Custom-built bot&lt;/td&gt;
&lt;td&gt;EUR 1,500 to 3,500 once, then from EUR 150 a month&lt;/td&gt;
&lt;td&gt;Flow design, knowledge base, integrations, maintenance&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://novachatia.com/blog/cuanto-cuesta-chatbot-whatsapp-empresa-2026/" rel="noopener noreferrer"&gt;NovaChat IA&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Local setup package (Malaga)&lt;/td&gt;
&lt;td&gt;From EUR 290, 490 or 790 once, then EUR 25 to 80 a month&lt;/td&gt;
&lt;td&gt;FAQ bot, bot with booking, bot with CRM, hosting and upkeep&lt;/td&gt;
&lt;td&gt;2026-10-22&lt;/td&gt;
&lt;td&gt;&lt;a href="https://potenciaredes.com/blog/cuanto-cuesta-chatbot-whatsapp-empresas-malaga-2026/" rel="noopener noreferrer"&gt;Potencia Redes&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Every provider above sells its own product, and most of these pages are written by the vendors themselves, so read them as list prices and not as a neutral survey. The subscription doesn't include Meta's per-message fees or, on most plans, AI usage beyond the replies it counts. Both are explained earlier in this article. A custom bot is worth its setup cost when the flow has to connect to your own booking system or CRM, or when per-contact subscription pricing would grow faster than your traffic.&lt;/p&gt;

&lt;h2&gt;
  
  
  When is a chatbot the wrong choice?
&lt;/h2&gt;

&lt;p&gt;When most of your customers write once a month with a question only a person can answer, a shared inbox with saved replies may do the job for less. A bot pays off when the same questions arrive every day, at hours when nobody is there to answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  What these numbers do not tell you
&lt;/h2&gt;

&lt;p&gt;The monthly figures are calculations from list prices and not an invoice. The prototype runs on sample chats. Token counts depend on your prompts and documents, so measure them in your first week. Prices are in USD as Meta and the model vendors list them, before VAT, and they change. Meta's change on the first day of a quarter, and the model vendors' change whenever they announce it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Meta, &lt;a href="https://developers.facebook.com/documentation/business-messaging/whatsapp/pricing" rel="noopener noreferrer"&gt;WhatsApp Business Platform pricing&lt;/a&gt; and its rate cards effective 1 October 2026 (USD, EUR, BRL), read 15 October 2026.&lt;/li&gt;
&lt;li&gt;OpenRouter, &lt;a href="https://openrouter.ai/models" rel="noopener noreferrer"&gt;model list prices&lt;/a&gt;. Anthropic, &lt;a href="https://platform.claude.com/docs/en/about-claude/pricing" rel="noopener noreferrer"&gt;Claude pricing&lt;/a&gt;. OpenAI, &lt;a href="https://developers.openai.com/api/docs/pricing" rel="noopener noreferrer"&gt;API pricing&lt;/a&gt;. Google, &lt;a href="https://ai.google.dev/gemini-api/docs/pricing" rel="noopener noreferrer"&gt;Gemini API pricing&lt;/a&gt;. All read 15 October 2026.&lt;/li&gt;
&lt;li&gt;Provider entry prices, read 22 October 2026: &lt;a href="https://www.soyagentia.com/cuanto-cuesta-un-chatbot-whatsapp/" rel="noopener noreferrer"&gt;SoyAgentia&lt;/a&gt; (also the source for the Wati and ManyChat rows), &lt;a href="https://chately.co/blog/chatbot-whatsapp-empresas" rel="noopener noreferrer"&gt;Chately&lt;/a&gt;, &lt;a href="https://novachatia.com/blog/cuanto-cuesta-chatbot-whatsapp-empresa-2026/" rel="noopener noreferrer"&gt;NovaChat IA&lt;/a&gt; and &lt;a href="https://potenciaredes.com/blog/cuanto-cuesta-chatbot-whatsapp-empresas-malaga-2026/" rel="noopener noreferrer"&gt;Potencia Redes&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Average tokens per reply: ReplyKit, &lt;a href="https://replykit.app/blog/how-much-does-a-whatsapp-ai-agent-cost" rel="noopener noreferrer"&gt;How much does a WhatsApp AI agent cost&lt;/a&gt;, 5 September 2026.&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/blog/whatsapp-ai-chatbot-for-business/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>llm</category>
      <category>software</category>
    </item>
    <item>
      <title>Supabase leaked password protection: what it blocks and what it does not</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Mon, 09 Nov 2026 14:00:48 +0000</pubDate>
      <link>https://dev.to/zaichenko/supabase-leaked-password-protection-what-it-blocks-and-what-it-does-not-1poj</link>
      <guid>https://dev.to/zaichenko/supabase-leaked-password-protection-what-it-blocks-and-what-it-does-not-1poj</guid>
      <description>&lt;p&gt;TL;DR. Leaked password protection makes Supabase Auth reject passwords that appear in the Have I Been Pwned breach corpus. It is available on the Pro plan and above. On 23 October 2026 that corpus held &lt;code&gt;password123&lt;/code&gt; 2,266,543 times, and my local Supabase Auth, with default settings, accepted it at sign-up. It doesn't judge strength, and &lt;code&gt;Lovable2026!&lt;/code&gt; appeared 0 times. Turn it on where you can, and set a longer minimum length either way.&lt;/p&gt;

&lt;p&gt;I built a free &lt;a href="https://madsalt.tech/tools/supabase-security-check/" rel="noopener noreferrer"&gt;Supabase security checker&lt;/a&gt; that reads a project's Auth settings, and "Leaked password protection off" is one of its rules. This note explains what the setting actually checks, with numbers I pulled from the same service it uses.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is leaked password protection in Supabase?
&lt;/h2&gt;

&lt;p&gt;It's one of the password settings in your project's Auth settings in the Dashboard. When it's on, Supabase Auth checks each new password against the &lt;a href="https://haveibeenpwned.com/Passwords" rel="noopener noreferrer"&gt;Pwned Passwords&lt;/a&gt; service from Have I Been Pwned and rejects the ones found there. Supabase's &lt;a href="https://supabase.com/docs/guides/auth/password-security" rel="noopener noreferrer"&gt;password security guide&lt;/a&gt; lists it with minimum length and required characters, and notes that it is available on the Pro plan and above.&lt;/p&gt;

&lt;p&gt;The check never sends the password. Pwned Passwords uses a k-anonymity range query. The client hashes the password with SHA-1, sends only the first 5 characters of the hash, and compares the returned suffixes locally.&lt;/p&gt;

&lt;h2&gt;
  
  
  How often do common passwords appear in breaches?
&lt;/h2&gt;

&lt;p&gt;I ran that same range query myself on 23 October 2026, for a few passwords I see in test accounts and AI-generated seed data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-leaked-password-protection.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-leaked-password-protection.svg" alt="How often each password appears in known breaches. Pwned Passwords range API, 23 October 2026. qwerty123: 13,871,714, password123: 2,266,543, Password1!: 584,516, Welcome1!: 239,099, Summer2026!: 45, supabase123: 7, Lovable2026!: 0." width="720" height="668"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Source: Have I Been Pwned Pwned Passwords range API, queried 23 October 2026.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Password&lt;/th&gt;
&lt;th&gt;Times seen in breaches&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;123456&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;210,461,208&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;qwerty123&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;13,871,714&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;password123&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;2,266,543&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Password1!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;584,516&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Welcome1!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;239,099&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Summer2026!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;supabase123&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;Lovable2026!&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;code&gt;123456&lt;/code&gt; is left out of the chart because it would flatten every other bar. The last three rows are the point. A password can be absent from every breach and still be easy to guess. Leaked password protection stops credential stuffing with known passwords. It doesn't measure strength.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens without it?
&lt;/h2&gt;

&lt;p&gt;On a local Supabase stack (CLI 2.109.1, Auth v2.192.0) with default settings, I signed up a test user with &lt;code&gt;password123&lt;/code&gt;. Auth answered &lt;code&gt;200&lt;/code&gt; and created the user. The only thing it refused was a 5-character password, with &lt;code&gt;422 weak_password&lt;/code&gt; and the reason &lt;code&gt;length&lt;/code&gt;, because the local default minimum is 6 characters.&lt;/p&gt;

&lt;p&gt;So without the setting, nothing stands between a user and a password that has leaked millions of times, apart from the length rule.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should you set?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;On Pro and above:&lt;/strong&gt; turn on leaked password protection. Existing users keep signing in, and the guide says those whose password falls short of new requirements get a &lt;code&gt;WeakPasswordError&lt;/code&gt; that explains why, so you can prompt them to change it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On every plan:&lt;/strong&gt; raise the minimum length. The guide calls anything under 8 characters not recommended, and my checker's rule suggests 12 or more.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Require character classes&lt;/strong&gt; only if your users can live with it. Length does more than a required symbol.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Add MFA&lt;/strong&gt; for accounts that matter, and require the current password or a reauthentication nonce to change a password. Both are in the same guide.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Leaked password protection is one of several Auth settings that only exist in the hosted project's config and not in your repo. What Supabase covers versus what is yours is in &lt;a href="https://madsalt.tech/blog/is-supabase-secure/" rel="noopener noreferrer"&gt;is Supabase secure&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/notes/supabase-leaked-password-protection/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>backend</category>
      <category>saas</category>
      <category>security</category>
    </item>
    <item>
      <title>Supabase raw_user_meta_data: how a sign-up became Owner</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Fri, 06 Nov 2026 11:00:52 +0000</pubDate>
      <link>https://dev.to/zaichenko/supabase-rawusermetadata-how-a-sign-up-became-owner-4l79</link>
      <guid>https://dev.to/zaichenko/supabase-rawusermetadata-how-a-sign-up-became-owner-4l79</guid>
      <description>&lt;p&gt;TL;DR. &lt;code&gt;raw_user_meta_data&lt;/code&gt; holds whatever the browser passed to &lt;code&gt;supabase.auth.signUp()&lt;/code&gt;. On one production app the &lt;code&gt;handle_new_user&lt;/code&gt; trigger read the new user's role from it, so anyone could sign up with the Owner role id and own the account. The fix is to take the role from a table that only the server writes, filled before the invite is sent.&lt;/p&gt;

&lt;p&gt;This happened on the audit firm time tracker, a Supabase app where every access rule lives in the database. The bug sat in the trigger that creates a profile for each new user.&lt;/p&gt;

&lt;h2&gt;
  
  
  What did the trigger do?
&lt;/h2&gt;

&lt;p&gt;Simplified, it looked like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="k"&gt;function&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;handle_new_user&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;returns&lt;/span&gt; &lt;span class="k"&gt;trigger&lt;/span&gt;
&lt;span class="k"&gt;language&lt;/span&gt; &lt;span class="n"&gt;plpgsql&lt;/span&gt;
&lt;span class="k"&gt;security&lt;/span&gt; &lt;span class="k"&gt;definer&lt;/span&gt; &lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;search_path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;''&lt;/span&gt;
&lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="err"&gt;$$&lt;/span&gt;
&lt;span class="k"&gt;declare&lt;/span&gt;
  &lt;span class="n"&gt;_role_id&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;raw_user_meta_data&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'role_id'&lt;/span&gt;&lt;span class="p"&gt;)::&lt;/span&gt;&lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;begin&lt;/span&gt;
  &lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;profiles&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;full_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;role_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;values&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;raw_user_meta_data&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="s1"&gt;'full_name'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_role_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="err"&gt;$$&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The invite flow put the right &lt;code&gt;role_id&lt;/code&gt; there, so in normal use it worked. But &lt;code&gt;raw_user_meta_data&lt;/code&gt; is the &lt;code&gt;options.data&lt;/code&gt; of a sign-up, and the browser decides what goes in it:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;supabase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;signUp&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;email&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;me@example.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;...&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;options&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;role_id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;&amp;lt;owner role uuid&amp;gt;&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The permission check returned true for owners before it looked at anything else, so that one field gave full control of the account. Supabase's own &lt;a href="https://supabase.com/docs/guides/auth/users" rel="noopener noreferrer"&gt;Users guide&lt;/a&gt; says user metadata must not be used in RLS policies or authorization logic, because the user can edit it without any checks.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-raw-user-meta-data-role.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-raw-user-meta-data-role.svg" alt="Where a new user's role came from. The handle_new_user trigger before and after the fix. Before: anyone who signs up: signUp options.data → raw_user_meta_data → handle_new_user → Owner role. After: only people who were invited: Invite function → pending_invites → handle_new_user → Invited role." width="720" height="350"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;From the sign-up trigger of a production Supabase app, June 2026.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  What fixed it?
&lt;/h2&gt;

&lt;p&gt;The role now comes from a private table the client can't touch:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;private&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pending_invites&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;email&lt;/span&gt; &lt;span class="nb"&gt;text&lt;/span&gt; &lt;span class="k"&gt;primary&lt;/span&gt; &lt;span class="k"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;role_id&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;invited_by&lt;/span&gt; &lt;span class="n"&gt;uuid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="n"&gt;timestamptz&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="n"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;revoke&lt;/span&gt; &lt;span class="k"&gt;all&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="n"&gt;private&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pending_invites&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The invite function runs on the server, and the inviter's permission is checked there. It writes the pending invite first and only then creates the invite link. The trigger looks the role up by email and deletes the row. The name still comes from metadata, and that's fine, because it's display data.&lt;/p&gt;

&lt;p&gt;The order matters. An invite creates the user straight away, and Supabase's &lt;a href="https://supabase.com/docs/guides/auth/users" rel="noopener noreferrer"&gt;Users guide&lt;/a&gt; notes that inviting a new email creates an unconfirmed user. The trigger fires at that moment, so the pending row has to exist already.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you check your own app?
&lt;/h2&gt;

&lt;p&gt;Open your &lt;code&gt;handle_new_user&lt;/code&gt; function, or any trigger on &lt;code&gt;auth.users&lt;/code&gt;, and search for &lt;code&gt;raw_user_meta_data&lt;/code&gt;. Name and avatar from there are fine. Role, company, plan, tenant or anything else that grants access must come from a table or from &lt;code&gt;raw_app_meta_data&lt;/code&gt;, which the user can't change.&lt;/p&gt;

&lt;p&gt;Then try it. Sign up through the API with &lt;code&gt;role_id&lt;/code&gt; or &lt;code&gt;role: 'admin'&lt;/code&gt; in &lt;code&gt;options.data&lt;/code&gt;. The new account should get nothing extra.&lt;/p&gt;

&lt;p&gt;This kind of check is the first step of my &lt;a href="https://madsalt.tech/blog/how-to-test-supabase-rls/" rel="noopener noreferrer"&gt;RLS test method&lt;/a&gt;. For multi-tenant apps, also see &lt;a href="https://madsalt.tech/notes/supabase-rls-user-in-two-organizations/" rel="noopener noreferrer"&gt;what RLS misses for a user in two orgs&lt;/a&gt;. The first thing I look at in the dashboard is &lt;a href="https://madsalt.tech/notes/supabase-exposed-schemas/" rel="noopener noreferrer"&gt;which schemas the Data API exposes&lt;/a&gt;. Automated checkers of roles, grants and policies, including the free one I built, don't see what a trigger copies from sign-up metadata, so this one stays a manual check.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/notes/supabase-raw-user-meta-data-role/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>authentication</category>
      <category>backend</category>
      <category>database</category>
      <category>security</category>
    </item>
    <item>
      <title>Is Supabase secure? What it covers and what you have to cover</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Wed, 04 Nov 2026 09:00:55 +0000</pubDate>
      <link>https://dev.to/zaichenko/is-supabase-secure-what-it-covers-and-what-you-have-to-cover-emn</link>
      <guid>https://dev.to/zaichenko/is-supabase-secure-what-it-covers-and-what-you-have-to-cover-emn</guid>
      <description>&lt;p&gt;TL;DR. Yes, the platform is secure. Supabase is SOC 2 Type 2 and ISO 27001 certified, encrypts data at rest with AES-256 and in transit with TLS, and signs HIPAA agreements on the Team plan and above. Your project is a different question. Under Supabase's shared responsibility model, access to tables, API keys and auth settings are yours, and the platform does exactly what those settings say. On my local test table, one setting decided whether a public key got 0 rows or all 3.&lt;/p&gt;

&lt;p&gt;I'm Denys, a full-stack and AI engineer, and most apps I build or fix run on Supabase. People ask "is Supabase secure?" when they mean "is my data safe?". Those have different answers, so this article takes them one at a time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is the Supabase platform secure?
&lt;/h2&gt;

&lt;p&gt;The platform side is audited by third parties. This is from Supabase's &lt;a href="https://supabase.com/security" rel="noopener noreferrer"&gt;security page&lt;/a&gt; and &lt;a href="https://supabase.com/docs/guides/security" rel="noopener noreferrer"&gt;security docs&lt;/a&gt;, read on 23 October 2026.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Control&lt;/th&gt;
&lt;th&gt;What Supabase states&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SOC 2 Type 2&lt;/td&gt;
&lt;td&gt;Audited yearly. The report is available to Team and Enterprise customers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;ISO 27001&lt;/td&gt;
&lt;td&gt;Certified. The certificate is available to Team and Enterprise customers&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;HIPAA&lt;/td&gt;
&lt;td&gt;Supported with a signed Business Associate Agreement and the HIPAA add-on, Team plan and above&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Encryption&lt;/td&gt;
&lt;td&gt;AES-256 at rest, TLS in transit. Access tokens and keys are also encrypted at the application level&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Backups&lt;/td&gt;
&lt;td&gt;Daily for paid projects. Point in Time Recovery as an add-on from the Pro plan&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data residency&lt;/td&gt;
&lt;td&gt;Database, Auth and Storage stay in the AWS region you pick&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;None of this protects a table you left open. The &lt;a href="https://supabase.com/docs/guides/security/soc-2-compliance" rel="noopener noreferrer"&gt;SOC 2 guide&lt;/a&gt; says it plainly. Supabase's compliance doesn't transfer to anything outside its control.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is your part?
&lt;/h2&gt;

&lt;p&gt;Supabase's &lt;a href="https://supabase.com/docs/guides/deployment/shared-responsibility-model" rel="noopener noreferrer"&gt;shared responsibility model&lt;/a&gt; lists what is always yours. That's your account, access management for the database and its tables, your data, and applying security controls, including the warnings Security Advisor raises. In practice that means four layers of settings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fis-supabase-secure.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fis-supabase-secure.svg" alt="Who guards each step of a request. Supabase runs the transport and the keys. Grants and policies are yours. From a browser: Browser → TLS, key · Supabase → Grant · you → RLS · you. From your server: Server → TLS · Supabase → Secret key · you → RLS skipped." width="720" height="376"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1. Based on Supabase's shared responsibility model and API keys guide, October 2026.&lt;/em&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Who can touch a table.&lt;/strong&gt; Grants decide whether &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;authenticated&lt;/code&gt; reach a table at all. RLS policies decide which rows.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which key goes where.&lt;/strong&gt; The publishable key is public by design and the secret key bypasses RLS. I compared them in &lt;a href="https://madsalt.tech/blog/supabase-anon-key-vs-service-role-key/" rel="noopener noreferrer"&gt;Supabase anon key vs service role key&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth settings.&lt;/strong&gt; Email confirmation, leaked password protection (Pro plan and above), minimum password length, MFA, redirect URLs, CAPTCHA.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Everything around the database.&lt;/strong&gt; Storage buckets and their policies, &lt;code&gt;SECURITY DEFINER&lt;/code&gt; functions, Edge Functions that use the secret key, and which schemas the Data API exposes.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How much does one setting change?
&lt;/h2&gt;

&lt;p&gt;I ran the same request against one table of three fake orders on a local Supabase stack (CLI 2.109.1, Postgres 17.6, PostgREST 14.14), with the publishable key, as a browser would.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting on the table&lt;/th&gt;
&lt;th&gt;What the public key got&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RLS off&lt;/td&gt;
&lt;td&gt;All 3 rows, and an insert returned &lt;code&gt;201 Created&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RLS on, no policy&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RLS on, policy &lt;code&gt;using (true)&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;All 3 rows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No grant for &lt;code&gt;anon&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;&lt;code&gt;42501 permission denied&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Same platform, same encryption, same certifications. The difference is a line of SQL. This is why a "secure platform" and a leaking app aren't a contradiction. &lt;a href="https://mattpalmer.io/posts/2025/05/statement-on-CVE-2025-48757/" rel="noopener noreferrer"&gt;CVE-2025-48757&lt;/a&gt; found 170 of 1,645 Lovable showcase apps serving data to the public key, all on the same audited platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Is Supabase getting safer by default?
&lt;/h2&gt;

&lt;p&gt;Yes, in steps. Supabase's &lt;a href="https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically" rel="noopener noreferrer"&gt;changelog of 28 April 2026&lt;/a&gt; lists an RLS-on-by-default toggle, a Data API exposure badge, granular per-table grants and a restriction on schema enumeration. The biggest one lands on 30 October 2026. New tables in existing projects stop getting Data API grants automatically, so a forgotten table returns &lt;code&gt;42501&lt;/code&gt; instead of its rows. Existing tables keep their grants, so this doesn't fix anything already open. The legacy &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;service_role&lt;/code&gt; keys are also being deprecated by the end of 2026 in favour of publishable and secret keys. The new secret key refuses requests from a browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  How do you check your own project?
&lt;/h2&gt;

&lt;p&gt;Start with Supabase's own Security Advisor and fix every warning. Then check what it doesn't cover.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I built a free Supabase security check that connects read-only and grades a project against 46 rules mapped to OWASP Top 10:2025. They cover RLS, policies, views, functions, grants, storage and auth settings.&lt;/li&gt;
&lt;li&gt;Test with two users in two companies. No scanner knows which rows belong to whom. The test is in my &lt;a href="https://madsalt.tech/blog/lovable-app-security-checklist/" rel="noopener noreferrer"&gt;Lovable app security checklist&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If your app has roles and a permission screen, prove each permission box does what it says, as in &lt;a href="https://madsalt.tech/blog/how-to-test-supabase-rls/" rel="noopener noreferrer"&gt;how to test Supabase RLS&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Supabase is a secure place to keep data, and it gives you the tools to keep it private. Whether it stays private is decided in your schema and your settings.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/blog/is-supabase-secure/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Supabase anon key vs service role key: what each one opens</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Mon, 02 Nov 2026 16:00:49 +0000</pubDate>
      <link>https://dev.to/zaichenko/supabase-anon-key-vs-service-role-key-what-each-one-opens-42gc</link>
      <guid>https://dev.to/zaichenko/supabase-anon-key-vs-service-role-key-what-each-one-opens-42gc</guid>
      <description>&lt;p&gt;TL;DR. The anon key, now called the publishable key, is meant to be public. It maps to the &lt;code&gt;anon&lt;/code&gt; or &lt;code&gt;authenticated&lt;/code&gt; role, and your RLS policies decide what it sees. The service role key, now the secret key, maps to &lt;code&gt;service_role&lt;/code&gt;, which bypasses RLS entirely. On my local test table with RLS on and no policy, the public key got 0 rows and the secret key got all 3. Put the publishable key in the browser, keep the secret key on a server, and rotate it if it ever shipped.&lt;/p&gt;

&lt;p&gt;I'm Denys, a full-stack and AI engineer. A leaked secret key is the first thing I look for when I take over a Supabase app, because with it every other protection is decoration. This article explains what each key opens, with the requests I ran to check it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Supabase anon key?
&lt;/h2&gt;

&lt;p&gt;The anon key identifies your app and not your user. Every request from a browser or a mobile app carries it, so it has to be public, and anyone can read it from the page source. A request with only this key runs as the Postgres role &lt;code&gt;anon&lt;/code&gt;. When a user signs in through Supabase Auth, the same key travels with the user's token and the request runs as &lt;code&gt;authenticated&lt;/code&gt;. Your RLS policies are written for those two roles.&lt;/p&gt;

&lt;p&gt;Supabase is renaming the keys. The &lt;a href="https://supabase.com/docs/guides/api/api-keys" rel="noopener noreferrer"&gt;API keys guide&lt;/a&gt; calls the new ones publishable (&lt;code&gt;sb_publishable_…&lt;/code&gt;) and secret (&lt;code&gt;sb_secret_…&lt;/code&gt;), and deprecates the legacy JWT-based &lt;code&gt;anon&lt;/code&gt; and &lt;code&gt;service_role&lt;/code&gt; keys by the end of 2026. The roles behind them stay the same.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Key&lt;/th&gt;
&lt;th&gt;Legacy name&lt;/th&gt;
&lt;th&gt;Postgres role&lt;/th&gt;
&lt;th&gt;RLS applies?&lt;/th&gt;
&lt;th&gt;Where it goes&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Publishable &lt;code&gt;sb_publishable_…&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;anon&lt;/code&gt; key&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;anon&lt;/code&gt;, or &lt;code&gt;authenticated&lt;/code&gt; with a user token&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Browser, mobile app, anything you ship&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret &lt;code&gt;sb_secret_…&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;service_role&lt;/code&gt; key&lt;/td&gt;
&lt;td&gt;&lt;code&gt;service_role&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;No, the role has &lt;code&gt;BYPASSRLS&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Server, Edge Function, cron job only&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Is it safe to expose the Supabase anon key?
&lt;/h2&gt;

&lt;p&gt;Yes, if every table, view and function it can reach is protected. The key itself grants nothing special, and the grants and policies on your schema decide everything. I checked this on a local Supabase stack (CLI 2.109.1, Postgres 17.6) with one table of three fake orders.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-anon-key-vs-service-role-key.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-anon-key-vs-service-role-key.svg" alt="Which Postgres role each key becomes. And whether your RLS policies see the request. Publishable key, signed out: Publishable key → role anon → RLS policies apply, Publishable key, signed in: Publishable key + user token → role authenticated → RLS policies apply, Secret key: Secret key → role service_role → RLS skipped." width="720" height="454"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Figure 1. From the Supabase API keys guide, checked on a local stack, 23 October 2026.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Table state&lt;/th&gt;
&lt;th&gt;Publishable key&lt;/th&gt;
&lt;th&gt;Secret key&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;RLS off&lt;/td&gt;
&lt;td&gt;All 3 rows, and an insert returned &lt;code&gt;201 Created&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;All 3 rows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RLS on, no policy&lt;/td&gt;
&lt;td&gt;&lt;code&gt;[]&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;All 3 rows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RLS on, policy &lt;code&gt;using (true)&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;All 3 rows&lt;/td&gt;
&lt;td&gt;All 3 rows&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;No grant for &lt;code&gt;anon&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;42501 permission denied&lt;/code&gt;, with a hint naming the missing &lt;code&gt;GRANT&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;All 3 rows&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;So the publishable key is exactly as safe as your weakest table. A table without RLS, or with a policy that allows every row, is readable by anyone who opens DevTools. That's the hole behind &lt;a href="https://mattpalmer.io/posts/2025/05/statement-on-CVE-2025-48757/" rel="noopener noreferrer"&gt;CVE-2025-48757&lt;/a&gt;, where 170 of 1,645 Lovable showcase apps served data to the public key.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the service role key, and why is it dangerous?
&lt;/h2&gt;

&lt;p&gt;The secret key is the master key. It runs as &lt;code&gt;service_role&lt;/code&gt;, which has the &lt;code&gt;BYPASSRLS&lt;/code&gt; attribute, so no policy you write ever applies to it. In the last column of the table above, it read all three rows in every state. Supabase's guide lists where it belongs: servers that run their own authorization checks, Edge Functions, background jobs and admin tools. Two details from the guide matter in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The new secret key refuses browser requests. Supabase matches the &lt;code&gt;User-Agent&lt;/code&gt; and returns &lt;code&gt;401&lt;/code&gt;. The legacy &lt;code&gt;service_role&lt;/code&gt; JWT has no such check, so a leaked legacy key works from anywhere. My local stack, which has no such gateway check, answered a script with the secret key with all 3 rows.&lt;/li&gt;
&lt;li&gt;A secret key bypasses RLS only when the request carries no user token. With a signed-in user's token, the request runs under that user's policies.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An Edge Function that uses the secret key has to check who is calling and filter by owner or company itself, because nothing below it will.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where do you find the keys?
&lt;/h2&gt;

&lt;p&gt;In the Dashboard, open your project's Connect dialog for the URL and publishable key, or Settings → API Keys for every key, legacy ones included. Locally, &lt;code&gt;supabase start&lt;/code&gt; and &lt;code&gt;supabase status&lt;/code&gt; print a publishable key and a secret key. Keep them in environment variables. In Next.js, only the publishable key may carry the &lt;code&gt;NEXT_PUBLIC_&lt;/code&gt; prefix, because the bundler ships anything with that prefix to the browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  What do you do if the service role key leaked?
&lt;/h2&gt;

&lt;p&gt;Treat it as compromised, because every row in every table was readable and writable by whoever found it.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a new secret key, move your servers to it, then delete the leaked one. If the leak was a legacy &lt;code&gt;service_role&lt;/code&gt; key, the way out is the move to the new keys. Create a publishable and a secret key, switch the app, then disable the legacy keys in Settings → API Keys, where they otherwise stay valid.&lt;/li&gt;
&lt;li&gt;Search the built JavaScript and the Git history for &lt;code&gt;sb_secret_&lt;/code&gt; and &lt;code&gt;service_role&lt;/code&gt;. Escape's scan of 5,600 vibe-coded apps found &lt;a href="https://escape.tech/blog/methodology-how-we-discovered-vulnerabilities-apps-built-with-vibe-coding/" rel="noopener noreferrer"&gt;400+ exposed secrets&lt;/a&gt;, most of them in frontend bundles.&lt;/li&gt;
&lt;li&gt;Review what changed while it was out: new users, role changes, deleted rows.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A scanner on the database side can catch the same problem from the other direction: roles that bypass RLS, tables with RLS off, policies that allow every row and columns that look sensitive and are readable by anonymous visitors. To check what your public key reaches in practice, the steps are in &lt;a href="https://madsalt.tech/blog/vibe-coding-security-risks/" rel="noopener noreferrer"&gt;vibe coding security risks&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/blog/supabase-anon-key-vs-service-role-key/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>postgres</category>
      <category>security</category>
    </item>
    <item>
      <title>Supabase exposed schemas: what the list opens up</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Wed, 28 Oct 2026 14:00:50 +0000</pubDate>
      <link>https://dev.to/zaichenko/supabase-exposed-schemas-what-the-list-opens-up-472o</link>
      <guid>https://dev.to/zaichenko/supabase-exposed-schemas-what-the-list-opens-up-472o</guid>
      <description>&lt;p&gt;TL;DR. The Exposed schemas list in Supabase decides which schemas the Data API serves to anyone holding your public key. The default is &lt;code&gt;public&lt;/code&gt; and &lt;code&gt;graphql_public&lt;/code&gt;. Every table, view and function in a schema on that list needs its own grants and RLS, so each extra schema is more surface to defend. Keep the list short and check it first.&lt;/p&gt;

&lt;p&gt;I built a free &lt;a href="https://madsalt.tech/tools/supabase-security-check/" rel="noopener noreferrer"&gt;Supabase security checker&lt;/a&gt; and the Exposed schemas list is one of the first things it reads. When someone asks me how secure their Supabase project is, this setting is where I start.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does "exposed" mean in Supabase?
&lt;/h2&gt;

&lt;p&gt;Supabase serves your database over REST with PostgREST. PostgREST only answers for the schemas in its &lt;code&gt;db_schema&lt;/code&gt; list. You edit it in the Dashboard under Project Settings → Data API → Exposed schemas. On the project config I looked at, the value was &lt;code&gt;public,graphql_public&lt;/code&gt;, and the Supabase &lt;a href="https://supabase.com/docs/guides/api/using-custom-schemas" rel="noopener noreferrer"&gt;custom schemas guide&lt;/a&gt; says &lt;code&gt;public&lt;/code&gt; is exposed by default. A request for a schema outside the list gets refused. &lt;a href="https://docs.postgrest.org/en/stable/references/api/schemas.html" rel="noopener noreferrer"&gt;PostgREST&lt;/a&gt; also never allows &lt;code&gt;pg_catalog&lt;/code&gt; or &lt;code&gt;information_schema&lt;/code&gt; in it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does the list matter?
&lt;/h2&gt;

&lt;p&gt;Everything inside an exposed schema can be reached with the public key. Tables, views and functions. Supabase's &lt;a href="https://supabase.com/docs/guides/database/postgres/row-level-security" rel="noopener noreferrer"&gt;RLS guide&lt;/a&gt; is blunt about it. A table in an exposed schema without RLS can be read and written by any role that has a grant on it. A schema that's not on the list can't be reached through the API at all.&lt;/p&gt;

&lt;p&gt;So an extra schema is not a neutral change. Add &lt;code&gt;storage&lt;/code&gt; or &lt;code&gt;vault&lt;/code&gt; to the list and you've put internal tables within reach of the Data API. Add your own schema and every table in it needs the same care as &lt;code&gt;public&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-exposed-schemas.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-exposed-schemas.svg" alt="What an extra exposed schema opens. One anon request, before and after trimming the list. Before: an extra schema is exposed: anon request → Data API → extra schema → no-RLS table readable. After: only public and graphql_public: anon request → Data API → default schemas only → RLS on all tables." width="720" height="350"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;From my Supabase security rules and the Supabase Data API docs, 22 October 2026.&lt;/em&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Which extra schemas are the worst?
&lt;/h2&gt;

&lt;p&gt;An internal Supabase schema in the list (&lt;code&gt;auth&lt;/code&gt;, &lt;code&gt;storage&lt;/code&gt;, &lt;code&gt;realtime&lt;/code&gt;, &lt;code&gt;vault&lt;/code&gt;, &lt;code&gt;extensions&lt;/code&gt; and similar) is a high severity problem when I review a project. A custom schema like &lt;code&gt;api&lt;/code&gt; is a medium one, a warning. The same list also decides where other problems count: tables with RLS off, anon write grants, always-true policies, views without &lt;code&gt;security_invoker&lt;/code&gt; and &lt;code&gt;SECURITY DEFINER&lt;/code&gt; functions that anon can call only matter in exposed schemas, because that's where the public key reaches them.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do you use a custom schema safely?
&lt;/h2&gt;

&lt;p&gt;A custom schema is a legitimate pattern. Supabase's &lt;a href="https://supabase.com/docs/guides/api/securing-your-api" rel="noopener noreferrer"&gt;Securing your API&lt;/a&gt; guide describes a dedicated schema such as &lt;code&gt;api&lt;/code&gt; as a way to make the exposed surface easier to identify and audit, with internal tables kept in schemas that aren't exposed. Two steps make it work, and the &lt;a href="https://supabase.com/docs/guides/api/using-custom-schemas" rel="noopener noreferrer"&gt;custom schemas guide&lt;/a&gt; gives both. Add the schema to Exposed schemas, then grant &lt;code&gt;usage&lt;/code&gt; on it to &lt;code&gt;anon&lt;/code&gt;, &lt;code&gt;authenticated&lt;/code&gt; and &lt;code&gt;service_role&lt;/code&gt;, plus privileges on its objects.&lt;/p&gt;

&lt;p&gt;The guide's example grants &lt;code&gt;ALL&lt;/code&gt; on every table. I wouldn't copy that line as it stands. The Securing your API guide says to give each role the minimum it needs, and to enable RLS on every table you expose. Grants decide if a role can touch a table at all, and policies decide which rows.&lt;/p&gt;

&lt;p&gt;There's one separate change. Supabase &lt;a href="https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically" rel="noopener noreferrer"&gt;stops granting new &lt;code&gt;public&lt;/code&gt; tables to the Data API automatically&lt;/a&gt;. It became the default for new projects from 30 May 2026 and will be applied to existing projects on 30 October 2026, and existing tables keep their grants. That is the grants layer. It doesn't change which schemas are on the list.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do you check your own project?
&lt;/h2&gt;

&lt;p&gt;Open Project Settings → Data API and read Exposed schemas. If it's more than &lt;code&gt;public&lt;/code&gt; and &lt;code&gt;graphql_public&lt;/code&gt;, ask what each extra schema is for.&lt;/p&gt;

&lt;p&gt;Then list the tables in those schemas that have RLS off, and see if &lt;code&gt;anon&lt;/code&gt; can already read them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nspname&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="k"&gt;schema&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relname&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="nv"&gt;"table"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;has_table_privilege&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'anon'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'select'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;anon_can_select&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;pg_class&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;
&lt;span class="k"&gt;join&lt;/span&gt; &lt;span class="n"&gt;pg_namespace&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;oid&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relnamespace&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;nspname&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'public'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'api'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;-- your Exposed schemas&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relkind&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'r'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'p'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;and&lt;/span&gt; &lt;span class="k"&gt;not&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;relrowsecurity&lt;/span&gt;
&lt;span class="k"&gt;order&lt;/span&gt; &lt;span class="k"&gt;by&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I ran it on a throwaway Postgres 17 with an &lt;code&gt;api&lt;/code&gt; schema holding one table with RLS and one without, plus a &lt;code&gt;public&lt;/code&gt; table without RLS. It returned only the two without:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; schema | table  | anon_can_select
--------+--------+-----------------
 api    | orders | t
 public | logs   | t
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every row with &lt;code&gt;anon_can_select&lt;/code&gt; true is a table anyone with your public key can read, until you enable RLS or revoke the grant. The query covers tables only. Views and functions need their own look, and my &lt;a href="https://madsalt.tech/blog/lovable-app-security-checklist/" rel="noopener noreferrer"&gt;Lovable app security checklist&lt;/a&gt; walks through them. &lt;a href="https://madsalt.tech/blog/how-to-test-supabase-rls/" rel="noopener noreferrer"&gt;How I test Supabase RLS&lt;/a&gt; shows how to prove the policies work.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/notes/supabase-exposed-schemas/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>postgres</category>
      <category>security</category>
    </item>
    <item>
      <title>Supabase 42501 permission denied is a grant problem, not RLS</title>
      <dc:creator>Denys Zaichenko</dc:creator>
      <pubDate>Mon, 26 Oct 2026 12:08:12 +0000</pubDate>
      <link>https://dev.to/zaichenko/supabase-42501-permission-denied-is-a-grant-problem-not-rls-5h8m</link>
      <guid>https://dev.to/zaichenko/supabase-42501-permission-denied-is-a-grant-problem-not-rls-5h8m</guid>
      <description>&lt;p&gt;TL;DR. &lt;code&gt;42501 permission denied for table …&lt;/code&gt; means the role has no grant on the table. Postgres stops the request before any RLS policy even runs. From 30 October 2026 Supabase stops granting new tables in &lt;code&gt;public&lt;/code&gt; automatically on existing projects, so every table you create after that answers 42501 until you grant it. The fix is three statements together - a grant, &lt;code&gt;enable row level security&lt;/code&gt; and a policy. Grant alone without RLS and the table is open to everyone.&lt;/p&gt;

&lt;p&gt;I built a free &lt;a href="https://madsalt.tech/tools/supabase-security-check/" rel="noopener noreferrer"&gt;Supabase security checker&lt;/a&gt; that reads the grants on every exposed table. Most projects have too many grants. 42501 is the other side, too few. So I reproduced it locally to see what really happens.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does 42501 mean?
&lt;/h2&gt;

&lt;p&gt;It's the Postgres code for insufficient privilege. Before a client touches a table Postgres checks two layers. Grants decide if the role can run the operation at all. RLS policies decide which rows it sees. A missing grant fails first and loud, as an error. A policy that matches nothing fails quietly, you just get an empty list. So if you see 42501, look at grants and leave your policies alone for now.&lt;/p&gt;

&lt;p&gt;PostgREST (the Data API behind &lt;code&gt;supabase-js&lt;/code&gt;) passes the error through with a hint. On my local stack (Supabase CLI 2.109.1, Postgres 17.6, PostgREST 14.14) a request with the publishable key to a table with no grant for &lt;code&gt;anon&lt;/code&gt; came back as HTTP 401 with this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"42501"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"details"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"hint"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Grant the required privileges to the current role with: GRANT SELECT ON public.orders TO anon;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"permission denied for table orders"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Why do new tables throw 42501 after 30 October 2026?
&lt;/h2&gt;

&lt;p&gt;Until now every new table in &lt;code&gt;public&lt;/code&gt; got &lt;code&gt;select&lt;/code&gt;, &lt;code&gt;insert&lt;/code&gt;, &lt;code&gt;update&lt;/code&gt; and &lt;code&gt;delete&lt;/code&gt; for &lt;code&gt;anon&lt;/code&gt;, &lt;code&gt;authenticated&lt;/code&gt; and &lt;code&gt;service_role&lt;/code&gt; through default privileges. So it was reachable over the Data API the second you created it, protected or not. Supabase &lt;a href="https://supabase.com/changelog/45329-breaking-change-tables-not-exposed-to-data-and-graphql-api-automatically" rel="noopener noreferrer"&gt;removes those defaults&lt;/a&gt;. Optional from 28 April 2026, default for new projects from 30 May 2026, and on 30 October 2026 it hits all existing projects. Tables you already have keep their grants.&lt;/p&gt;

&lt;p&gt;I ran the same two &lt;code&gt;alter default privileges … revoke&lt;/code&gt; statements from the changelog on my local project and then created a new table &lt;code&gt;invoices&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-42501-permission-denied.svg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmadsalt.tech%2Fcharts%2Fen%2Fsupabase-42501-permission-denied.svg" alt="What a new table answers after 30 October 2026. Publishable key, no grant: 42501, HTTP 401. Secret key, no grant: 42501, HTTP 403. After grant select and enable RLS: 0 rows, HTTP 200." width="720" height="516"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;My reproduction on a local Supabase stack with the default privileges from the Supabase changelog, 23 October 2026.&lt;/em&gt;&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Request to the new table&lt;/th&gt;
&lt;th&gt;Result&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Publishable key, no grant&lt;/td&gt;
&lt;td&gt;HTTP 401, 42501, hint &lt;code&gt;GRANT SELECT ON public.invoices TO anon;&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Secret key, no grant&lt;/td&gt;
&lt;td&gt;HTTP 403, 42501, hint &lt;code&gt;… TO service_role;&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Publishable key, after &lt;code&gt;grant select&lt;/code&gt; and &lt;code&gt;enable row level security&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;HTTP 200, &lt;code&gt;[]&lt;/code&gt; until a policy allows rows&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Two things surprised me. The secret key gets refused too. &lt;code&gt;service_role&lt;/code&gt; skips RLS but it still needs a grant, so an Edge Function or a server job writing to a new table breaks exactly the same way. And the revoke only takes back those four operations. The new table still came with &lt;code&gt;REFERENCES&lt;/code&gt;, &lt;code&gt;TRIGGER&lt;/code&gt; and &lt;code&gt;TRUNCATE&lt;/code&gt; for &lt;code&gt;anon&lt;/code&gt;, &lt;code&gt;authenticated&lt;/code&gt; and &lt;code&gt;service_role&lt;/code&gt;. No policy applies to &lt;code&gt;TRUNCATE&lt;/code&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  How do you fix it without opening the table?
&lt;/h2&gt;

&lt;p&gt;Grant, RLS and policy are one change. Put them in one migration and give each role only what it needs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;revoke&lt;/span&gt; &lt;span class="k"&gt;all&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;anon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;grant&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;insert&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;update&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;service_role&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;alter&lt;/span&gt; &lt;span class="k"&gt;table&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="n"&gt;enable&lt;/span&gt; &lt;span class="k"&gt;row&lt;/span&gt; &lt;span class="k"&gt;level&lt;/span&gt; &lt;span class="k"&gt;security&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;create&lt;/span&gt; &lt;span class="n"&gt;policy&lt;/span&gt; &lt;span class="nv"&gt;"Owners read their invoices"&lt;/span&gt;
&lt;span class="k"&gt;on&lt;/span&gt; &lt;span class="k"&gt;public&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;invoices&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;select&lt;/span&gt;
&lt;span class="k"&gt;to&lt;/span&gt; &lt;span class="n"&gt;authenticated&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="k"&gt;select&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;uid&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;user_id&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;revoke all&lt;/code&gt; at the top clears the &lt;code&gt;TRUNCATE&lt;/code&gt;, &lt;code&gt;TRIGGER&lt;/code&gt; and &lt;code&gt;REFERENCES&lt;/code&gt; that came with the table. Please don't answer 42501 with &lt;code&gt;grant all on all tables in schema public to anon&lt;/code&gt;. That brings the old default back for every table at once, and any table without RLS becomes readable by anyone who has your public key.&lt;/p&gt;

&lt;p&gt;If an AI tool creates your tables, tell it to write grants, RLS and policies in the same migration. The hint in the error is written so an agent can fix the grant by itself, but it only names the grant. It says nothing about the RLS that should come with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to check in your own project
&lt;/h2&gt;

&lt;p&gt;Look for three things in the grants layer. Default privileges that still grant new tables to the API automatically. Write grants for &lt;code&gt;anon&lt;/code&gt; that no policy uses. And &lt;code&gt;TRUNCATE&lt;/code&gt;, &lt;code&gt;TRIGGER&lt;/code&gt; and &lt;code&gt;REFERENCES&lt;/code&gt; on tables for &lt;code&gt;authenticated&lt;/code&gt;, like the ones above. Why RLS still matters after the grant is in &lt;a href="https://madsalt.tech/blog/how-to-test-supabase-rls/" rel="noopener noreferrer"&gt;how to test Supabase RLS&lt;/a&gt;, and how grants and policies look across a whole app is in my &lt;a href="https://madsalt.tech/blog/lovable-app-security-checklist/" rel="noopener noreferrer"&gt;Lovable app security checklist&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://madsalt.tech/notes/supabase-42501-permission-denied/" rel="noopener noreferrer"&gt;madsalt.tech&lt;/a&gt;. Written with AI assistance, checked by me.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>postgres</category>
      <category>security</category>
      <category>sql</category>
    </item>
  </channel>
</rss>
