What problem does it solve?
Multi-tenant systems often leak data across tenants because developers trust request headers, forget tenant filters in queries, or rely on frontend-only feature gating. This Skill provides a systematic checklist of common isolation pitfalls with wrong/right code examples to prevent cross-tenant data access.
Core Features & Use Cases
- Tenant Context Validation: Ensures tenant identity comes from the authenticated token, not spoofable request headers like X-Tenant-Code, with 403 responses on mismatch.
- Query-Level Isolation: Detects unsafe findById/getReferenceById calls that bypass Hibernate @Filter or MyBatis interceptors, and enforces tenant-aware repository methods like findByTenantIdAndId.
- Feature-Level Authorization: Distinguishes data isolation from functional authorization, requiring backend endpoint checks for tenant/role/subscription-gated features instead of hiding UI buttons.
- Use Case: When reviewing a Spring Boot SaaS backend, apply the grep-based sniffing signals to find every naked findById in the service layer and verify each restricted endpoint independently validates tenant eligibility.
Quick Start
Review my multi-tenant Spring Boot service layer for tenant isolation issues using the cc-multi-tenant-safety checklist.