Security Guide

Translato is built with a "security-first" mindset, employing multi-layered protection for your translation data and user accounts.

1. Authentication Methods

MethodUsed ByMechanism
Cookie AuthWeb dashboardhttpOnly access_token (15min) + refresh_token (7d)
API KeyCLI, SDKs, CI/CDX-API-Key header, SHA-256 hashed in DB
CSRF TokenWeb mutationsX-CSRF-Token header, HMAC-signed per session
Webhook HMACVCS providersX-Hub-Signature-256 (GitHub), X-Gitlab-Token, URL secret

2. Authorization (RBAC)

Translato uses a 5-tier Role-Based Access Control system:

  1. Platform Admin (UserRole.ADMIN): Full access to everything.
  2. Organization Owner/Admin: Full access to all projects within the organization.
  3. Team Access (TeamProjectAccess): Access to assigned projects with optional language restrictions.
  4. Direct Project Member: Role-based (OWNER/TRANSLATOR) with optional language restrictions.
  5. Project Owner: Full control of their own projects.

3. Data Protection & Posture

AreaImplementation
Password Hashingbcrypt (12 rounds)
JWT AlgorithmHS512 with separate access/refresh secrets
Token RotationFamily tracking and theft detection
CSRF ProtectionValidated on all state-changing mutations
Encryption at RestVCS tokens encrypted via AES-256-GCM
SanitizationFull XSS prevention for translation values
API Key StorageSHA-256 hashed (never plaintext)
Rate LimitingTiered (Auth/API/Read/Write) via Redis

4. Production Security Hardening

When deploying to production, the following must be set:

  • NODE_ENV=production
  • COOKIE_SECURE=true (requires HTTPS)
  • Unique, high-entropy secrets for all JWT and encryption keys.
  • ALLOWED_ORIGINS strictly limited to your production domain.

The Translato API server will refuse to start in production mode if it detects weak or default secrets.