Aegis Multi-Tenancy Enforcer

0•

Enforces strict data isolation in the Aegis platform by ensuring every MongoDB query and service method filters by community identifier.

The Aegis Multi-Tenancy Enforcer is a specialized skill designed to maintain rigorous security and data isolation within the Aegis multi-tenant community platform. It provides Claude with a set of mandatory rules and implementation patterns for writing MongoDB queries, repository methods, and service logic. By enforcing the 'Absolute Rule' that every database interaction must include a validated communityId—sourced exclusively from authenticated JWT tokens rather than request bodies—this skill effectively prevents cross-tenant data leaks and unauthorized access. It also guides the creation of optimized compound indexes and aggregation pipelines, ensuring that tenant isolation is deeply integrated into the system's architecture.

Key Features

010 GitHub stars
02Mandatory communityId injection for all find, update, and delete operations
03Strict compound index ordering for query optimization and isolation
04Standardized repository method patterns for consistent data access
05Mandatory $match stage enforcement for all MongoDB aggregation pipelines
06Security-first validation ensuring tenant IDs are sourced from JWT payloads

Use Cases

01Refactoring service-layer logic to comply with multi-tenant security protocols
02Auditing and correcting MongoDB indexes to ensure tenant-first query performance
03Developing secure repository methods for new Aegis platform features