Your local prototype works. You can create a proposal and change its stage. It would be tempting to add login, hit “publish,” and start accepting users.
But there is a crucial difference between an application that runs and a service that can responsibly accept other people’s data.
The previous lesson provides a local-only lab. It must not be placed on the public internet as-is: it has no authentication or authorization, and all records share one local database.
In brief: authentication identifies the person; authorization determines what that person may do and which records they can access. Production SaaS needs a consistent data boundary, protected secrets, recovery, monitoring and safe billing/cancellation processes.
Advertisement
Being signed in doesn’t mean access to everything
Imagine two fictional organizations using our proposal tracker:
Horizon Studio creates a website proposal.
Sunrise Design creates a branding proposal.
Both have authenticated users. Someone from the first organization guesses the second organization’s proposal identifier and requests it.
If the backend merely checks “this user is logged in” and reveals the proposal, authorization is broken. Identity was checked; permission to access that object was not.
OWASP recommends tenant isolation: organization context must follow a server-verified identity and membership, and object access must respect authorization. A tenant identifier supplied by the browser is not permission by itself.
A small architecture with a clear boundary
This flow describes a production control to implement and test, not protection already present in the unauthenticated local lab.
The boundary between identity and data access
Authentication alone is insufficient: the server verifies organization membership and permission to access the requested object.
Diagram source in Mermaid. Illustrative; the text defines the actual rules.
The safe logical path:
Authenticated person → server-verified organization membership → allowed action → query scoped to that organization → response.
The dangerous path:
Authenticated person → browser supplies arbitrary organization → backend trusts it → another customer’s data is returned.
The difference deserves a real security test. Change the organization and object identifier in a test request: the server should not reveal or modify records belonging to another organization.
You can enforce this with explicit backend checks, database policies such as Row Level Security (RLS), or both. The right approach depends on architecture. Supabase documents RLS, but merely enabling it without tested policies is insufficient.
Advertisement
A publication checklist by responsibility
Layer
Question
Practical check
Identity
How do users sign in and recover accounts?
Expired sessions and recovery paths
Authorization
Can a user access another organization’s data?
Cross-tenant tests with fictional accounts
Credentials
Are secret keys in the repository or browser?
Config and permission review
Database
Where are records and backups?
Practice a restore
Operations
What happens during outages?
Minimal safe logs and alerts
Privacy
Which data is truly necessary?
Inventory, access, retention and deletion
Billing
How are payments and cancellations verified?
Sandbox transactions and event handling
Releases
Can a faulty deployment be rolled back?
Rollback and migration plan
This is an acceptance boundary, not a certification of legal compliance. Contract, tax and data-protection obligations vary by context and require additional verification.
A test that catches serious mistakes
Create two accounts and two fictional organizations in an isolated environment, with one proposal belonging to each.
Sign in as organization A and open A’s own proposal.
Attempt to access B’s proposal using the known test identifier.
Attempt to update or delete B’s proposal.
Try changing tenant identifiers in request body, path or headers.
Verify the backend does not reveal or alter B’s data.
Repeat for different roles, expired sessions and administrative operations.
Hiding interface buttons is insufficient. The protected operation itself must enforce authorization.
Never probe other people’s real services or customer data. This is a test of systems you own and control with fictional fixtures.
Database rules require careful implementation
A field named organization_id provides no protection on its own. The backend must associate the tenant with a verified identity and consistently enforce authorization.
If you use RLS, inspect the database role, who can set the tenant context, which roles bypass policies, and how read/update/delete operations are tested.
Consider four incidents: a database migration fails, someone deletes records, an identity provider becomes unavailable, or a billing notification arrives twice.
Before inviting real customers, decide who investigates, how logs avoid leaking private data, how backups are restored, what time window recovery covers and how affected users are informed.
An untested backup is a hope, not a recovery procedure.
Deployment tools distribute software. They do not automatically own your operational responsibilities.
Payments: test mode is not live mode
Use your payment provider’s sandbox. Configure and validate event handling, confirm subscription status on the backend and implement safe retry behavior when the same webhook arrives twice.
Never grant access just because the browser reached a “success” page. Commercial confirmation must come from a trusted, validated event, with handling for cancellation, failure and refunds.
The local lab intentionally includes no billing. Do not use real customer cards to test it.
AI in operations
Coding agents can help review code, write tests and inspect sanitized logs. That does not authorize them to read all customers’ records or perform destructive migrations unattended.
Restrict tool access, protect secrets and require approval for actions with external effects. Faster coding does not reduce responsibility for customer safety.
Workshop: a publication gate
Write a one-page record containing evidence of five checks: cross-tenant authorization, backup restore, secrets review, deployment rollback and sandbox billing.
For each, record what was tested, how, the result and which failure would still block production.