A secure authentication and authorization system is a lot of work to build from scratch: OAuth flows, password hashing, permission checks, role management, session handling. Every application needs this work, and it is the same in each of them.

Ulabase provides user management and permissions on every service, working from the first day.

Security by Default

Your APIs are protected by default, with no configuration. You write and maintain no authentication code.

Ulabase stores passwords hashed, integrates OAuth login with Google, and applies role-based access control. Fine-grained permissions work at the resource level, and session management and token handling are built in.

Users

Almost every application has users, and Ulabase manages them for you.

Email Authentication lets users register and log in with email and password. The system handles email validation, password hashing, password reset flows, and account verification.

OAuth Integration enables social login through configuration. Login with Google is supported, and you write no redirect handling.

You can store custom user data alongside authentication. User profiles, preferences, and any application-specific data live in your user documents:

{
  "_id": "user@example.com",
  "roles": ["user", "editor"],
  "profile": {
    "name": "Jane Developer",
    "preferences": { ... }
  }
}

Permissions: Fine-Grained Control

The permission system defines who can access what, from a whole collection down to a single field.

Role-Based Access Control lets you assign roles to users and define permissions by role. The system supports read and write filters based on user identity, dynamic permissions using MongoDB queries, and conditional access based on data content:

{
  "_id": "editorsPosts",
  "roles": ["editor"],
  "predicate": "path-prefix('/posts')",
  "priority": 100,
  "mongo": {
    "readFilter": { "status": "published" },
    "writeFilter": { "author": "@user._id" }
  }
}

Resource-Level Permissions give you control at the collection, document, or field level, so the access rules can follow the structure of your application.

Example: Multi-Tenant Application

In a SaaS, users should only see the data of their own tenant. With teams, the tenant is the user's active team, @team._id. Define the permission once:

{
  "_id": "usersOwnTenant",
  "roles": ["user"],
  "predicate": "path-prefix('/projects')",
  "priority": 100,
  "mongo": {
    "readFilter": { "tenant": "@team._id" },
    "writeFilter": { "tenant": "@team._id" }
  }
}

From then on every query is filtered by tenant on the server. You write no middleware and change no query in the client.

Secure by Design

The platform follows a default deny approach. Unless explicitly permitted, access is denied. This prevents accidental exposure of data.

Permissions have access to the full request context: user identity and roles, request method and path, query parameters, and request body content. A permission rule can depend on any of these.

An audit trail logs all access for security monitoring and compliance. You know who accessed what and when.

Start Building Secure Apps Immediately

With users and permissions ready to use, the first steps of a project are short. Users can register, log in, and access their data on the first day. Multi-tenant isolation is one permission. Role-based features for admins and editors are permissions too, and you refine them for your workflows as the application grows.

You write no authentication code, so you have none to harden and none to keep free of vulnerabilities.

Real-World Examples

Collaborative Editing App - Editors can modify their team's documents, but only unlocked ones:

{
  "_id": "editorsTeamDocs",
  "roles": ["editor"],
  "predicate": "path-prefix('/docs')",
  "priority": 100,
  "mongo": {
    "readFilter": { "team": "@team._id" },
    "writeFilter": { "team": "@team._id", "locked": false }
  }
}

Content Management System - Authors can edit their own drafts but see all published content:

{
  "_id": "authorsArticles",
  "roles": ["author"],
  "predicate": "path-prefix('/articles')",
  "priority": 100,
  "mongo": {
    "readFilter": { "$or": [{ "status": "published" }, { "author": "@user._id" }] },
    "writeFilter": { "author": "@user._id", "status": "draft" }
  }
}

Admin Dashboard - Admins see everything, users see only their own data:

{
  "_id": "adminsEverything",
  "roles": ["admin"],
  "predicate": "path-prefix('/')",
  "priority": 100
}

The Time You Save

The hours you do not spend on authentication infrastructure go to your features, your user experience and the business logic of your product.

Learn More

For the complete documentation and more advanced patterns, visit:

Users and Permissions Documentation

Ready to Build?

Create a free Ulabase service and start building secure applications. No credit card required.

Try Ulabase for free →

Build your app on Ulabase

Your backend is ready in minutes, and you spend your time on your app. The Free plan needs no credit card.