Skip to Content
Baseera Docs

Security

How Baseera protects your customers' data, your keys and your users, in one page, with a map of the details.

This section describes what Baseera enforces and where. It is written for developers and reviewers. Each claim here comes from the platform's code, its database tests or its recorded design decisions.

The model in one page

Your data is separated by organization and by tenant, in the database. Every table has row-level security, and a test fails the build when one does not. Signed-in users read their organization's rows and write nothing directly. Writes go through reviewed database functions that check the caller's role. See Data isolation.

Search filters inside SQL. Retrieval is one database function. It filters by organization, knowledge base, tenant and document access rules before ranking and before the result limit, so a restricted passage never reaches the model, an answer or a citation of a user who may not see it.

Provider keys have one reader. Your model key is checked with the provider, stored encrypted, shown only as its last four characters, and readable only by the runtime's gateway. It is never logged. See Provider keys.

Tokens are signed with keys the database cannot forge. Secret keys are Ed25519 seeds shown once. The database stores a hash and the public key. User tokens are short-lived EdDSA JWTs, and other algorithms are refused. See User tokens and publishable keys.

The assistant cannot reach your app on its own. Tools run in your app. Draft and write tools wait for the user's approval. The runtime streams tool calls and waits.

Outbound requests are guarded. Crawling, url items, webhooks and model calls go through fetchers that allow only public https addresses or each provider's own endpoint. See Network and fetching.

Changes leave a record nobody can edit. Security-relevant changes are written to an append-only audit log in the same transaction as the change. See Audit log.

Spend is capped in the database. Rate limits and monthly spending limits are enforced before any model call. See Spend and abuse limits.

What the guardrails look like

supabase/tests/security_invariants.test.sql reads the system catalogs and fails when:

  • a table lacks row-level security;
  • anon gets a privilege, or signed-in users get a write;
  • a security definer function does not pin search_path;
  • the list of definer functions callable by signed-in users, or by the service role only, changes without review;
  • Vault becomes reachable.

Because it reads the catalogs, a new table or function is covered without editing the test. The rule is to never loosen the test to make a migration pass.

CI also fails on any known advisory in production dependencies and on a committed secret, and its actions are pinned to commit SHAs.

Map

On this page