multi-tenancy

Enforce tenant isolation and RBAC with authorization middleware and query guards.

Updated Apr 5, 2023
One-click install
npx skills add https://github.com/fcalell/dotfiles --skill multi-tenancy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: multi-tenancy
Source: https://github.com/fcalell/dotfiles/tree/main/dot_claude/skills/multi-tenancy
Command: npx skills add https://github.com/fcalell/dotfiles --skill multi-tenancy

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Isolate data and enforce access across tenants using robust RBAC patterns to prevent cross-tenant access and leakage.

Core Features & Use Cases

  • Tenant model with hierarchical boundaries (Organization, Workspace, Team, etc.)
  • Role-based access control with owner/admin/editor/viewer/contributor mappings
  • Middleware that enforces authorization at procedures and queries
  • Tenant membership management and per-tenant permissions

Quick Start

Configure and run this skill to apply tenant-aware access controls across services.

Frequently Asked Questions about multi-tenancy

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

FAQPage Schema
How do I isolate data and enforce access control in a multi-tenant SaaS?

Data isolation in a multi-tenant SaaS is enforced by applying tenant filtering, query guards, and authorization middleware to prevent cross-tenant access and data leakage.

What is the best way to implement RBAC with hierarchical tenant boundaries?

Implementing RBAC with hierarchical boundaries involves defining tenant memberships across organizations or workspaces and mapping roles like owner, admin, editor, and viewer to manage per-tenant permissions.

How do I prevent cross-tenant data leakage in my backend database?

Preventing cross-tenant data leakage requires enforcing tenant scoping through database query guards and cascade deletes, ensuring operations are strictly confined to the authorized tenant context.

Can I use tenant scoping for access control at scale without external dependencies?

Yes, you can apply tenant-aware access controls and RBAC middleware directly across services without external dependencies, securing hierarchical resource management at scale.

How does authorization middleware enforce tenant membership during queries?

Authorization middleware enforces tenant membership by intercepting procedures and applying query guards that filter database access based on the user's specific tenant context and role permissions.

What role mappings are available for per-tenant permissions in multi-tenancy architectures?

Per-tenant permissions in multi-tenancy architectures utilize role mappings including owner, admin, editor, contributor, and viewer to enforce precise access control and data isolation.