tenant-context-propagation

Community

Safely propagate tenant context across services.

Authormarquesfelip
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Ensures safe propagation of tenant context across HTTP requests, service boundaries, and background jobs in a multi-tenant SaaS environment, preventing cross-tenant data leakage and misidentification.

Core Features & Use Cases

  • Extract and validate tenant context at the request boundary using a typed context key.
  • Propagate tenant information through application layers without passing raw identifiers.
  • Detach context for asynchronous work and goroutines to avoid cancellation of in-flight operations.
  • Enforce tenant presence and membership at service boundaries to guarantee isolation.
  • Provide fast feedback through boundary assertions and test helpers to catch propagation gaps early.

Quick Start

Integrate TenantMiddleware into your HTTP router and replace any direct tenant_id usage in services with tenant derived from context.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: tenant-context-propagation
Download link: https://github.com/marquesfelip/agents-and-skills/archive/main.zip#tenant-context-propagation

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.