rule-laravel-shared-tenant-access-guardrails-model-decision

Enforce CheckTenantAccess on Laravel tenant-authenticated routes using auth:sanctum.

Updated Nov 7, 2025
One-click install
npx skills add https://github.com/belluga/delphi-ai --skill rule-laravel-shared-tenant-access-guardrails-model-decision
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rule-laravel-shared-tenant-access-guardrails-model-decision
Source: https://github.com/belluga/delphi-ai/tree/main/.cline/skills/rule-laravel-shared-tenant-access-guardrails-model-decision
Command: npx skills add https://github.com/belluga/delphi-ai --skill rule-laravel-shared-tenant-access-guardrails-model-decision

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Enforces that CheckTenantAccess is applied to all tenant-authenticated Laravel routes to prevent cross-tenant leakage and ensure consistent guardrails.

Core Features & Use Cases

  • Enforces CheckTenantAccess on tenant routes using auth:sanctum
  • Keeps account-only routes separate and unaffected
  • Provides guidance and testing support for enforcing guardrails in Laravel projects

Quick Start

Audit your Laravel routes to verify tenant route checks and update tests to cover cross-tenant access scenarios.

Frequently Asked Questions about rule-laravel-shared-tenant-access-guardrails-model-decision

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

FAQPage Schema
How do I enforce tenant access guardrails on Laravel routes using Sanctum?▼

You can enforce tenant access by applying the CheckTenantAccess middleware to routes using auth:sanctum with shared prefixes like /admin/api/v1 and /api/v1, ensuring cross-tenant leakage is prevented while keeping account-only routes unaffected.

What is CheckTenantAccess used for in Laravel multi-tenant applications?▼

CheckTenantAccess is a middleware mechanism used in Laravel multi-tenant applications to enforce tenant access governance on authenticated routes, preventing unauthorized cross-tenant data leakage by verifying tenant boundaries on routes secured with auth:sanctum.

How do I prevent cross-tenant data leakage in Laravel API routes?▼

To prevent cross-tenant data leakage in Laravel API routes, enforce the CheckTenantAccess middleware on all tenant-authenticated routes using auth:sanctum and add corresponding tests to verify that cross-tenant access scenarios are properly blocked.

Does CheckTenantAccess affect account-only routes in Laravel?▼

No, CheckTenantAccess does not affect account-only routes in Laravel. It specifically targets tenant-authenticated routes with shared prefixes, keeping account-only routes separate and unaffected while enforcing guardrails only where tenant boundaries apply.

How to test tenant access guardrails in Laravel Sanctum routes?▼

To test tenant access guardrails in Laravel Sanctum routes, audit your route definitions to verify CheckTenantAccess is present and update your test suite to cover cross-tenant access scenarios, referencing the tenant-access-guardrails workflow documentation.