Skip to content

Security Overview

EaseLab is a multi-tenant SaaS platform. Security is built into authentication, authorization, tenant isolation, and operational controls at every layer.

Security pillars

PillarDescriptionLearn more
AuthenticationJWT access tokens, HTTP-only refresh cookies, email verificationLogin & Registration
Two-factor authTOTP and recovery codes for staff accounts2FA
RBACTenant roles, platform admin roles, fine-grained permissionsRBAC
Data isolationSeparate PostgreSQL database per tenantData Isolation

Who protects what?

mermaid
flowchart TB
  subgraph Platform
    PA[Platform Admin Portal]
    PDB[(Platform DB)]
  end
  subgraph Tenant
    TP[Tenant Portal]
    TDB[(Tenant DB)]
  end
  PA --> PDB
  TP --> TDB
  PDB -. tenant metadata .-> TDB
  • Platform operators manage tenants, billing, backups, and CRM through the admin portal with platform-scoped permissions.
  • Lab staff access only their tenant's data through the tenant portal, governed by roles and permissions.
  • Patients use anonymous public endpoints with rate limiting and access codes — no login required.

Transport and session security

ControlBehavior
HTTPSRequired in production; refresh cookies use Secure flag
Access token lifetime15 minutes (configurable via Jwt:AccessTokenMinutes)
Refresh token7-day HTTP-only cookie; rotated on each refresh
Rate limitingApplied to login, registration, password reset, and public report lookup
CORSRestricted to configured frontend origins

Account lifecycle controls

  • Email verification — required before first sign-in for self-registered labs (unless platform admin).
  • Tenant lock — unpaid or expired subscriptions enter read-only mode; mutations return 403 with TENANT_READONLY.
  • Suspended tenants — login and refresh are blocked with a clear message.
  • Impersonation — platform admins can sign in as a tenant owner via short-lived codes; see Impersonation.

Sensitive operations

OperationWho can perform it
Restore platform backupPlatform admin with platform.backups.manage
Restore tenant backupTenant owner only
Change payment accountPlatform admin with billing permission
Manage staff rolesTenant admin or user with roles.* permissions

Reporting security issues

If you discover a vulnerability, contact your platform operator or EaseLab support directly. Do not disclose publicly until a fix is available.

Ease Lab — Cloud Pathology Lab Management