backend-authorization
Use when the user asks about authorization, role based permissions for admins, editors and viewers, RBAC, ABAC, ReBAC, Casbin, Cerbos, OpenFGA, break-glass or…
от j4flmao★ 47 звёзд на GitHub
Установить backend-authorization в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Backend Authorization
Purpose
Design and implement authorization that is correct, auditable, and maintainable. Every protected resource must have an explicit access decision. Authorization rules live in code or policy, never in the developer's head.
Architecture Decision Trees
Authorization Model Selection
How many resource types need access control?
├── < 10 → Flat RBAC (simple role-permission map)
└── >= 10 → Do roles map well to resources?
├── Yes → Does every user fit a single role?
│ ├── Yes → Hierarchical RBAC (roles + inheritance)
│ └── No → RBAC + ABAC hybrid (roles for coarse, attributes for exceptions)
└── No → Does access depend on relationships between entities?
├── Yes → ReBAC (Zanzibar-style relationship tuples)
└── No → ABAC (attribute-based policies for maximal flexibility)
Regulatory requirements (SoD, audit)?
├── Yes → Constrained RBAC with SoD enforcement
└── No → Standard RBAC or ABAC
Multi-tenant?
├── Yes → RBAC + scope-based authorization (org/department/team isolation)
└── No → Single-tenant RBAC or ABAC
Policy Engine Decision Tree
Existing policy engine in stack?
├── Yes → Leverage existing engine
└── No → Cloud-native / K8s?
├── Yes → OPA (sidecar deployment, Rego policies, K8s admission control)
└── No → Need GUI for non-devs to manage policies?
├── Yes → Permit.io (SaaS, visual policy editor)
└── No → Multi-language support critical?
├── Yes → Casbin (libraries for 10+ languages, in-app)
└── No → Fine-grained, human-readable policies?
├── Yes → Cerbos (YAML policies, sidecar)
└── No → ReBAC at massive scale?
└── AuthZed / SpiceDB (Zanzibar, gRPC API)
Temporary Access Decision Tree
Emergency scenario (production outage)?
├── Yes → Break-glass protocol: MFA required, 30 min expiry, security team notified
└── No → Need temporary elevated permissions?
├── Yes → JIT elevation: request + approval, time-bound, auto-expire
└── No → Need to delegate permissions?
└── Delegation: delegator-scoped, time-bound, non-cascading
Agent Protocol
Trigger
Exact user phrases: "authorization", "access control", "RBAC", "ABAC", "ReBAC", "permissions", "role", "policy engine", "Casbin", "Cerbos", "Permit.io", "OPA", "permission delegation", "temporary access", "break glass", "super admin", "master admin", "JIT elevation", "role hierarchy", "permission model", "least privilege", "separation of duties", "I want to restrict access".
Input Context
- Application type and resource inventory (entities, actions per entity).
- User types and their organizational structure.
- Existing auth system (if any) — JWT claims, auth middleware.
- Compliance requirements (SOC 2, HIPAA, SOX, PCI DSS).
- Expected scale (users, roles, permissions, tenants).
Output Artifact
Authorization architecture document: model selection, role tree, permission matrix, policy structure, integration plan.
Response Format
Model: {RBAC|ABAC|ReBAC|Hybrid}
Role Tree: {top-level roles, hierarchy depth}
Granularity: {coarse|fine|mixed}
Policy Engine: {native|Casbin|OPA|Cerbos}
Admin Pattern: {flat|hierarchical|break-glass}
Testing: {matrix|regression|fuzzing}
Completion Criteria
- Authorization model selected based on requirements.
- Permission architecture designed with levels and granularity.
- Role hierarchy defined with inheritance.
- Admin/super-admin patterns specified.
- Temporary elevation or delegation mechanism (if needed).
- Policy engine integration planned.
- Authorization test matrix written.
Max Response Length
Authorization architecture: 25 lines maximum.
Workflow
Step 1: Identify Authorization Requirements
Map every resource and action in the system:
| Resource | Actions | Conditions |
|---|---|---|
| Invoice | create, read, update, delete, approve | own dept only, business hours |
| User | read, update, deactivate | same org level |
| Workspace | create, read, update, delete, invite | quota limits |
| Report | generate, export, schedule | premium tier only |
Collect:
- Resource inventory — every entity the system manages.
- Action catalog — Create, Read, Update, Delete, Execute, Approve, Delegate.
- User taxonomy — types, org levels, relationships.
- Environmental constraints — time, location, device trust, risk score.
- Compliance rules — SoD, data segregation, retention policies.
Step 2: Choose Authorization Model
| Model | Granularity | Complexity | Scale | Best For |
|---|---|---|---|---|
| ACL | Per-resource | Low | Small | Simple file sharing |
| RBAC (Core) | Role-level | Low | Large | Enterprise apps, orgs with clear roles |
| RBAC (Hierarchical) | Role-level + inheritance | Medium | Large | Multi-level orgs, subsidiaries |
| RBAC (Constrained) | Role + SoD | Medi |
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- references/authorization-advanced.md
- references/authorization-audit.md
- references/authorization-delegation.md
- references/authorization-fundamentals.md
- references/authorization-middleware.md
- references/authorization-models.md
- references/authorization-policy-distribution.md
- references/authorization-testing.md
- references/data-level-authorization.md
- references/fine-grained-policies.md
- references/permission-architecture.md
- references/policy-engines-comparison.md
- references/rbac-hierarchy.md
- references/temporary-delegated-access.md
FAQ
Что делает скилл backend-authorization?
Use when the user asks about authorization, role based permissions for admins, editors and viewers, RBAC, ABAC, ReBAC, Casbin, Cerbos, OpenFGA, break-glass or JIT elevation. Produces a server-side permission model with enforcement code. Not for login and tokens (use backend-auth-patterns).
Как установить скилл backend-authorization?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл backend-authorization запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…