authorization

Installation
SKILL.md

Core Concepts

Term Definition
Authentication (AuthN) Verifying who the user is. Produces an identity (user ID, claims).
Authorization (AuthZ) Deciding what an authenticated user is allowed to do. Consumes the identity.
Permission A single action on a single resource type: thread:delete, comment:edit.
Role A named collection of permissions: Admin, Moderator, Member.
Policy A named rule that evaluates claims, roles, or resource state to produce allow/deny.
Resource ownership The user who created a resource has implicit permissions on it (edit, delete).

Rules:

  • Authorization is a separate concern from authentication. Never mix "who are you?" with "are you allowed?"
  • Every endpoint that mutates state or returns private data must have an explicit authorization rule. Unauthenticated access is the exception, not the default.
  • Authorization rules are business logic — they belong in the domain or application layer, not in controllers or middleware alone.

Permission Model

Installs
5
GitHub Stars
1
First Seen
Apr 20, 2026