Skip to content

Stop choosing. SurrealDB launch week, 12-16 October

See what's coming

AUTH

Auth built into the database

Sign in. Who can sign in, defined in SurrealQL.
Scope. What each user sees, down to the row and the field.
One place. Auth lives beside the data it guards.

ACCESS CONTROL

Identity and permissions, in the query language

Sign-in logic, token verification and per-row rules live in the schema, versioned with the data and enforced by the engine.

RECORD ACCESS

Users authenticate against your own tables

DEFINE ACCESS account ON DATABASE
TYPE RECORD
SIGNUP (
CREATE user SET
email = $email,
pass = crypto::argon2::generate($pass)
)
SIGNIN (
SELECT * FROM user WHERE
email = $email AND
crypto::argon2::compare(pass, $pass)
);
ROW-LEVEL PERMISSIONS

Rules travel with the data

DEFINE TABLE order PERMISSIONS
FOR select WHERE user = $auth.id
FOR create WHERE $auth.id != NONE;

DEFINE TABLE post SCHEMALESS PERMISSIONS
FOR select WHERE published = true OR user = $auth.id
FOR create, update WHERE user = $auth.id
FOR delete WHERE user = $auth.id OR $auth.admin = true;
FIELD-LEVEL CONTROL

Validate every field

DEFINE FIELD email ON TABLE user
TYPE string
ASSERT string::is_email($value);

DEFINE INDEX email ON TABLE user
FIELDS email UNIQUE;

Auth evaluated where the data lives

One source of truth

Access rules live in the schema beside the data they protect, versioned together.

Enforced in the transaction

The engine checks permissions on every query, live subscription and API call.

One operation

The check and the query are the same operation, with no auth server in between.

THE PLATFORM

Everything an application and its agents know. Five surfaces, one engine.

IN PRODUCTION

Trusted at scale. Samsung, Nvidia, Verizon, Tencent, and Walmart run on SurrealDB.

14,000+

Developers building on SurrealDB Cloud

4M+

Developers building on SurrealDB worldwide

FROM THE TEAMS

SurrealDB gives us a foundation where we can unify semantic search, knowledge graphs, and AI-driven decision making without stitching together multiple systems. Collapsing responsibility into SurrealDB has become our default engineering posture.
Justin Foley

VP of Engineering, Later

GET STARTED

Build auth into your data. Access, permissions and validation in SurrealQL, enforced on every request.

SurrealDB

The context and memory layer for AI agents

Database. Graphs, vectors, documents and relational data in one engine, in a single ACID transaction.
Agent Memory. Connects and retrieves context wherever your data lives, every fact carrying its source.
Cloud. Fully managed, in the cloud provider and region you choose.

Explore with AI

Copyright © 2026 SurrealDB Ltd. Registered in England and Wales. Company no. 13615201

Registered address: 3rd Floor 1 Ashley Road, Altrincham, Cheshire, WA14 2DT, United Kingdom

Trading address: Huckletree Oxford Circus, 213 Oxford Street, London, W1D 2LG, United Kingdom