Security engineering
Security architecture for Mainbase
How Mainbase approaches identity, tenant isolation, encryption, and operational monitoring. This page describes product security engineering — not a substitute for a customer security questionnaire or an audit report.
Defense-in-depth security engineering
Eight layers of controls, from identity to storage.
Comprehensive security infrastructure
Automated testing, threat modeling, type-safe queries.
Standards and compliance posture
Standards we design toward (SOC 2, Quebec Law 25, ISO), with honest status for each.
Advanced security implementation
Six subsystems, and the exact controls behind each one.
Security standards
Security engineering practices
Controls we implement in product development and operations. Scope and maturity vary by deployment and customer agreement.
- Uptime target
- 99.9%
- Availability objective for the hosted service; actual SLAs are defined in customer agreements.
- Encryption
- AES-256
- AES-256 class encryption for applicable data at rest and TLS in transit, as configured for the deployment.
- Security response
- < 1000ms
- Fast security response times with optimized authentication
- Security events
- Tracked
- Security events are tracked and reviewed through operational processes
Security architecture
Defense-in-depth security engineering
Our security framework implements comprehensive protection across all application layers, from authentication to data protection, following established security principles and industry standards.
Identity & access management
Enterprise-grade authentication pipeline with behavioral analysis and adaptive security controls.
- bcrypt adaptive hashing (10+ salt rounds)
- Common password detection (19+ patterns)
- Sequential pattern validation
- Progressive account lockout (5 attempts/30min)
- IP + User-Agent fingerprinting
- Session regeneration on privilege escalation
- HttpOnly + Secure + SameSite cookie enforcement
Multi-tenant authorization
Zero-trust authorization with database-level tenant isolation and role-based access control.
- Hierarchical RBAC (SuperAdmin > admin > member)
- Prisma middleware with auto-scoping
- AsyncLocalStorage context isolation
- Composite key membership validation
- Organization-scoped API endpoints
- File access with tenant validation
- Real-time permission enforcement
Input validation & sanitization
Type-safe validation pipeline with comprehensive sanitization and injection prevention.
- Zod schema validation with TypeScript
- Multi-layer request validation (body/query/params)
- Email format + uniqueness validation
- File type + size restrictions (MIME validation)
- DOMPurify HTML sanitization
- XSS prevention with content analysis
- Parameterized SQL via Prisma ORM
Network security & headers
Hardened network layer with comprehensive security headers and traffic analysis.
- Helmet.js comprehensive header suite
- Strict content security policy (CSP)
- HSTS with 1-year max-age + subdomains
- X-Frame-Options: DENY (clickjacking protection)
- Origin-restricted CORS policies
- Request size limits (DoS prevention)
- IP whitelist for development environments
Secure file management
Enterprise file handling with organization isolation and comprehensive validation.
- Organization-scoped directory structure
- Authenticated file serving (no direct access)
- MIME type validation + extension filtering
- Memory-based processing (no temp files)
- Path traversal prevention
- User + organization nested directories
- Filename sanitization with safe characters
Database security & isolation
Automatic tenant scoping with comprehensive data protection and audit capabilities.
- Prisma middleware auto-organization filtering
- Password hash exclusion from responses
- AsyncLocalStorage request isolation
- Parameterized queries (SQL injection prevention)
- Organization membership validation
- Response data sanitization
- Comprehensive audit logging with context
Real-time security
Secure WebSocket infrastructure with authenticated connections and room isolation.
- Socket.IO CORS matching API configuration
- WebSocket connection authentication
- Organization + page room isolation
- User presence validation with DB lookup
- Real-time event authorization
- Connection health monitoring
- Exponential backoff reconnection
Security intelligence & monitoring
Real-time threat detection with comprehensive analysis and automated response.
- Correlation-based security event analysis
- Behavioral pattern detection algorithms
- Real-time account lockout monitoring
- Rate limit violation tracking
- Comprehensive user activity audit
- Performance-based security metrics
- Automated threat response protocols
Security features
Comprehensive security infrastructure
Security is integrated into every aspect of our development process and system architecture.
Our security engineering approach includes automated security testing in CI/CD pipelines, regular security assessments, and comprehensive threat modeling for every feature implementation.
We implement TypeScript for type safety, Prisma for parameterized queries, and comprehensive input validation with Zod schemas to prevent common vulnerability classes at the development level.
Focused security practices
- Automated security testing in CI/CD pipeline
- Regular penetration testing by certified experts
- Encryption in transit and at rest where supported
- Multi-factor authentication with TOTP/FIDO2
- Real-time threat intelligence integration
- Zero-trust network architecture
- Automated vulnerability scanning
- Security-first development lifecycle (SSDLC)
Compliance standards
Standards and compliance posture
Frameworks we align with in product design and hosting choices. Status labels below are intentional: only completed, evidenced certifications should ever be marked certified.
SOC 2 Type II
InfrastructureWe host on infrastructure that supports SOC 2 programs at the datacenter/provider layer. Mainbase product SOC 2 Type II is not claimed as completed on this page.
Quebec Law 25 support
Controls in placePrivacy-oriented controls and documentation intended to support Quebec Law 25 / privacy obligations, subject to customer configuration and written agreements.
ISO 27001
In progressISO 27001 is a target information-security management framework. Product certification is not claimed here.
ISO 9001
In progressISO 9001 quality-management certification is not claimed for Mainbase on this page.
Privacy by design
Controls in placePrivacy-minded defaults such as tenant scoping, access controls, and data minimization principles in product design.
Security features
Advanced security implementation
Deep technical security features with comprehensive protection across all application layers.
Layered request and host controls
Defense-in-depth controls around HTTP headers, transport security, framing, and origin checks.
- Helmet.js with strict CSP and security headers
- HSTS enforcement with 1-year max-age
- Clickjacking protection via X-Frame-Options
- Origin-restricted CORS with credential validation
Advanced cryptographic authentication
Password hashing, lockout, and rate-limiting controls in the authentication pipeline.
- bcrypt with adaptive salt rounds (10+)
- Enhanced entropy validation and pattern detection
- Progressive lockout with exponential backoff
- IP + fingerprint rate limiting (5/15min)
Multi-tenant data isolation
Database-level tenant isolation with automatic context scoping and zero cross-contamination.
- Prisma middleware with automatic org filtering
- AsyncLocalStorage for request context isolation
- Composite key validation for membership
- Organization-scoped file system access
Input sanitization & validation pipeline
Multi-layered validation with schema enforcement and comprehensive sanitization protocols.
- Zod type-safe validation schemas
- DOMPurify HTML sanitization
- XSS filtering with content analysis
- Prisma ORM parameterized queries
Real-time security intelligence
Real-time security monitoring with pattern recognition and automated threat response capabilities.
- Correlation-based event analysis
- Behavioral pattern detection algorithms
- Automated lockout with security logging
- Comprehensive audit trail with context
End-to-end encryption & data protection
Encryption, tenant scoping, and sanitization controls for data handling in the product stack.
- Database-level organization scoping
- Response sanitization and filtering
- Encrypted file storage with access controls
- Pre-transmission data sanitization
Talk through your security requirements
Share your questionnaire, hosting model, and compliance needs. We will map Mainbase controls to your review — without overstating certifications we have not published evidence for.