Multi-Tenant RBAC: 404-Not-403 Isolation

By (author)Maheen Iftikhar

Tech stack:
PY

Built CodeMesh-AIs multi-tenant isolation: role-based permissions (OWNER/ADMIN/DEVELOPER/VIEWER) enforced centrally. Non-members get 404 not 403, so t...
read more
AI Contributions:0
Published At:August 13, 2026
Files Included:1 file(s)
Updated At:October 22, 2026

Read Me

# Multi-Tenant RBAC — CodeMesh-AI

## What it does
Every organization-scoped request in CodeMesh-AI passes through
require_permission() before touching any data. Four roles
(OWNER, ADMIN, DEVELOPER, VIEWER) each map to a fixed set of
permissions defined in core/roles.py.

## Key design decision
Non-members get 404, not 403. If a user tries to access an
org they don't belong to, they see "not found" — never "forbidden" —
so they can't even confirm the organization exists. This is a
standard multi-tenant security pattern that prevents tenant
enumeration attacks.

## Files
backend/app/core/roles.py — role/permission matrix
backend/app/services/membership.py — enforcement helpers

## Verified in repo
Commit a1662c6 — Add code-index, AI Q&A, and repo services

Loading

Loading

Loading

More like this View all

ML Audit — SHAP Explainability Module

A plug-and-play Python script for auditing machine learning models using SHAP (SHapley Additive exPlanations). Produces client-ready charts, ranked importance tables, and flagged predictions suitable

  • 0

    Ratings

  • 1

    Files

    • PY

    Tech stack

RAG Pipeline Builder

A production-ready Retrieval-Augmented Generation pipeline that lets you chat with your own documents. Ingest PDFs, Markdown, text files, or URLs — then query them with a grounded LLM that cites its s

  • 0

    Ratings

  • 1

    Files

    • PY

    Tech stack

Structured Generative AI Workout Architect

A robust Python module that uses Google's Gemini to generate highly personalized workout plans while strictly adhering to a predefined exercise library. It uses structured JSON schemas, advanced promp

  • 0

    Ratings

  • 1

    Files

    • PY

    Tech stack