Command Palette

Search for a command to run...

Back to skills
skill № 09508

endpoint-authorization

Use when building or reviewing any HTTP/event endpoint. The checklist + Fuze auth architecture for authN-middleware coverage, object/field-level authorization…

FreeNo executable scripts
FuzeOneby FuzeOne★ 18 GitHub stars

Install endpoint-authorization in Claude Code & Claude Desktop

Sign up to install this skill

Create a free account to reveal the install command and save the skill to your library.

  • Reveal the one-line install command
  • Save skills to your synced library
  • Get notified when skills update
Sign up freeI already have an account

About this skill

endpoint-authorization

Per governance/architecture-guidelines.md. Reference: FuzeFront backend/src/middleware/permissions.ts.

Checklist (every endpoint)

  1. AuthN — behind verified auth middleware (authenticate / Depends(get_current_user) / NextAuth). No public-by-default.
  2. Object-level authz (BOLA/IDOR) — before returning/mutating a resource fetched by id, authorize the specific object: await permit.check(user, action, resource, ctx) and/or requireOwnership(getOwnerId). Never findById(req.params.id) without an ownership/permission gate.
  3. Field-level authz (BOPLA) — set only an explicit allow-list of fields on writes (no raw-body mass-assignment); project only entitled fields on reads.
  4. Input validation — schema (Zod/pydantic/Joi) on params + body; reject unknown fields.

Patterns

  • Express: router.get('/x/:id', authenticate, requirePermission({action:'read',resource:'x'}), handler) or requireOwnership(req => getXOwner(req.params.id)).
  • FastAPI: @router.get('/x/{id}') + Depends(get_current_user); in-handler permit.check(user,'read',f'x:{id}'); pydantic body models.
  • Use the Permit.io PDP (offline locally) for policy; reserve raw role-ifs for trivial cases.

How to detect BOLA in review/CI

Grep/Semgrep for resource-by-id access (findById, findOne({_id, where({ id, get(id)) in a handler with no nearby permit.check/requireOwnership/ownership filter → flag. gate-authz automates this; adjudicate logic-level cases by tracing the owner check.

Fixing a finding

Add the missing middleware/permit.check/requireOwnership/schema; add a test that a non-owner gets 403 and an owner 200. Hand implementation to backend-engineer.

Allowed tools

Tools this skill is permitted to call.

No restriction — this skill can use any tool.

FAQ

What does the endpoint-authorization skill do?

Use when building or reviewing any HTTP/event endpoint. The checklist + Fuze auth architecture for authN-middleware coverage, object/field-level authorization (BOLA/BOPLA mitigation), and input validation — and how to add requireOwnership / permit.check / schema validation. Surfaced by gate-authz (advisory, never blocks); enforced by gate-platform-auth; owned by appsec-reviewer.

How do I install the endpoint-authorization skill?

Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.

Does the endpoint-authorization skill run scripts?

No, this skill is instructions only (SKILL.md) with no executable scripts.

Related skills

Compare endpoint-authorization with