PostgreSQL RLS & OIDC Multi-Tenant Security Blueprint

    by snowgem

    1

    Harden FastAPI multi-tenant APIs with PostgreSQL FORCE RLS and strict RFC 9068 OIDC access-token verification.

    $19

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned

    Works with the AI Agents you already use

    PostgreSQL RLS & OIDC Multi-Tenant Security Blueprint

    Example session with this skill installed

    Audit my FastAPI + async SQLAlchemy SaaS backend for tenant isolation and OIDC access-token security.

    • Read your context and instructions
    • Compiled the postgresql rls

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Stop your AI coding agent from shipping leaky multi-tenant backends.

    Standard prompts produce WHERE tenant_id = ? filters, table-owner DB roles that silently bypass RLS, session-level SET calls that leak data across pooled connections, and loose JWT checks that accept ID tokens or HS256 downgrades.

    This production-hardened SKILL.md enforces an end-to-end security blueprint for FastAPI, async SQLAlchemy, Alembic, and PostgreSQL:

    • True DB-level isolation: separated migrator/runtime roles (NOSUPERUSER NOBYPASSRLS), FORCE ROW LEVEL SECURITY, fail-closed GUC policies, composite tenant foreign keys, and transaction-local set_config(..., true).
    • Strict RFC 9068 OIDC verification: rejects ID tokens (at+jwt only), enforces asymmetric algorithm allowlists before JWKS lookup, validates JWK algorithm match, runs off the async event loop with bounded timeouts, and redacts 503 upstream errors.
    • Real proof, not mocked SQLite: ships with a self-verification checklist and real PostgreSQL + Pytest security test templates for CI.

    Targets PostgreSQL with FastAPI, async SQLAlchemy, Alembic, and OIDC resource-server bearer tokens. Not intended for SQLite-only projects, browser cookie sessions, or OAuth authorization-server implementations.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 3 days ago

    Software
    Python 3.10+PostgreSQLFastAPISQLAlchemy 2.xAlembic

    Permissions

    No special permissions declared or detected

    Listed3 days ago

    What's inside

    Creator

    snowgem

    snowgem

    Hi

    Frequently Asked Questions

    Harden FastAPI multi-tenant APIs with PostgreSQL FORCE RLS and strict RFC 9068 OIDC access-token verification.

    This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

    Connect your AI agent to Agensi through MCP, then ask it to use PostgreSQL RLS & OIDC Multi-Tenant Security Blueprint on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

    New in APIs & Backend

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for APIs & Backend.