Aegis Multi-Tenancy Enforcer

0•

Enforces strict data isolation by ensuring the mandatory inclusion of community identifiers in all MongoDB queries and service logic.

The Aegis Multi-Tenancy Enforcer is a specialized security skill designed to prevent cross-tenant data leaks within the Aegis platform. It establishes a rigorous framework for database interactions, mandating that every MongoDB query, repository method, and aggregate pipeline includes a community identifier filter. By providing clear implementation patterns for sourcing identifiers from JWT tokens and defining tenant-first indexing strategies, this skill helps developers maintain a secure, isolated environment for community data while avoiding common anti-patterns like trusting request bodies or using optional filters.

Key Features

01Standardized repository and service layer method templates
02Mandatory communityId filter enforcement for all CRUD operations
03Validation logic for multi-stage aggregate pipelines
04Secure JWT-based tenant identification patterns
05Tenant-first compound index optimization rules
060 GitHub stars

Use Cases

01Implementing secure data access layers in multi-tenant NestJS applications
02Auditing backend logic to prevent unauthorized cross-community data access
03Optimizing MongoDB performance through tenant-scoped indexing