validate-tenant-isolation

Verify tenant isolation across gateway, service, and database boundaries.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/Edgame2/castiel2 --skill validate-tenant-isolation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-tenant-isolation
Source: https://github.com/Edgame2/castiel2/tree/main/.cursor/skills/validate-tenant-isolation
Command: npx skills add https://github.com/Edgame2/castiel2 --skill validate-tenant-isolation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Verifies tenant isolation is enforced across gateway, service, and database boundaries to prevent cross-tenant data leakage and to support security audits and compliance.

Core Features & Use Cases

  • Layered validation for API gateway, service, and database interactions
  • Verification of tenantId propagation across service calls and logs
  • Audit readiness with tenant-id inclusion in logs and events

Quick Start

Run a security audit by validating that all routes enforce tenant checks, service methods require tenantId, and database queries include tenantId in the partition key.

Frequently Asked Questions about validate-tenant-isolation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify tenant isolation across API gateway, service, and Cosmos DB layers?

Verify tenant isolation by checking that all API routes enforce tenant checks, service methods require tenantId, and Cosmos DB queries include tenantId in the partition key. This layered validation prevents cross-tenant data leakage across gateway, service, and database boundaries.

What is tenant isolation enforcement in a multi-tenant architecture?

Tenant isolation enforcement in a multi-tenant architecture ensures user data remains separated across gateway, service, and database layers. It requires consistent X-Tenant-ID handling, tenant propagation across service calls, and tenantId inclusion in queries and logs to prevent cross-tenant data leakage.

How do I audit multi-tenant Cosmos DB queries for tenantId partition key inclusion?

Audit multi-tenant Cosmos DB queries by validating that every query includes tenantId in the partition key. This database boundary check ensures tenant isolation is enforced at the data layer, preventing unauthorized cross-tenant access and supporting security audit compliance.

Does this tenant isolation validation check X-Tenant-ID propagation in service layer logs?

Yes, tenant isolation validation checks X-Tenant-ID propagation across service calls and logs. It verifies that tenantId is consistently included in logs and events, ensuring audit readiness and confirming tenant context is maintained throughout the entire request lifecycle.

Can I use this for pre-deployment security audits in a multi-tenant environment?

Yes, you can use this for pre-deployment security audits in a multi-tenant environment. It validates tenant isolation enforcement across all layers according to configuration rules, supporting ongoing multi-tenant compliance and preventing cross-tenant data leakage before deployment.

What is the best way to prevent cross-tenant data leakage in multi-tenant services?

The best way to prevent cross-tenant data leakage is enforcing tenant isolation across gateway, service, and database boundaries. This requires consistent X-Tenant-ID handling, tenant propagation across calls, and tenantId inclusion in all Cosmos DB queries and application logs.