authorization-security
БесплатноЗапускает вложенные скриптыНе проверенAuthorization security standards covering RBAC, ABAC, policy enforcement, OAuth2 scopes, resource-based access control, and NIST 800-53 compliance (AC-3…
Об этом скилле
Authorization Security
Quick Navigation: Level 1: Quick Start (5 min) → Level 2: Implementation (30 min) → Level 3: Mastery (Extended)
Level 1: Quick Start (<800 tokens, 5 minutes)
Core Principles
- Least Privilege: Grant minimum permissions required (NIST AC-6)
- Separation of Duties: No single user controls entire critical process
- Defense in Depth: Multiple authorization checks at different layers
- Fail Secure: Default deny, explicit allow
- Audit Everything: Log all authorization decisions (AU-2)
RBAC vs ABAC Comparison
| Aspect | RBAC (Role-Based) | ABAC (Attribute-Based) |
|---|---|---|
| Model | Roles → Permissions | Attributes → Policies |
| Flexibility | Low (fixed roles) | High (dynamic rules) |
| Complexity | Simple to implement | Complex policy engine |
| Use Case | Traditional enterprise | Context-aware access |
| Example | admin, user, guest |
dept=finance AND time=business_hours |
| NIST Control | AC-3 (Access Enforcement) | AC-3, AC-4, AC-16 |
Essential Checklist
- Least privilege: Users have minimum required permissions (AC-6)
- Separation of duties: Critical operations require multiple approvals (AC-5)
- Role hierarchies: Roles inherit permissions logically
- Policy enforcement: Authorization checked at API gateway + service level
- OAuth2 scopes: Fine-grained permissions in access tokens
- Resource ownership: Users can only access their own resources
- Deny by default: Unknown requests rejected automatically
- Audit logging: All authorization decisions logged with user/resource/action
- Time-based access: Support for temporary permissions
- Policy testing: Unit tests for all authorization rules
Quick Example
# @nist ac-3 "Access enforcement"
# @nist ac-6 "Least privilege"
# ❌ NEVER do this (no authorization)
@app.route('/api/documents/<doc_id>')
def get_document(doc_id):
return Document.query.get(doc_id)
# ✅ Enforce ownership and permissions
@app.route('/api/documents/<doc_id>')
@require_auth
def get_document(doc_id):
doc = Document.query.get_or_404(doc_id)
# Check ownership OR read permission
if doc.owner_id != current_user.id and not current_user.has_permission('documents:read'):
abort(403, "Insufficient permissions")
# Audit the access
audit_log.info(f"User {current_user.id} accessed document {doc_id}")
return doc.to_dict()
Common Patterns
Role Hierarchy:
superadmin
└── admin
└── manager
└── user
└── guest
Permission Naming:
resource:action(e.g.,documents:read,users:write)service:resource:action(e.g.,api:documents:delete)
Scope Patterns:
read:profile- Read own profileread:all_profiles- Read all profiles (admin)write:documents- Create/update documentsadmin:*- Full administrative access
Quick Links to Level 2
Level 2:
📚 Full Examples: See REFERENCE.md for complete code samples, detailed configurations, and production-ready implementations.
Implementation (<4,500 tokens, 30 minutes)
RBAC Implementation
Role-Based Access Control assigns permissions to roles, then roles to users. Ideal for traditional enterprise systems with stable organizational structures.
Core Components
- Roles: Named collections of permissions (e.g.,
admin,editor,viewer) - Permissions: Specific actions on resources (e.g.,
documents:read,users:write) - Users: Assigned one or more roles
- Role Hierarchy: Roles can inherit from parent roles
Database Schema
See REFERENCE.md for complete implementation.
Python Implementation
See templates/policy-enforcement.py for complete implementation.
See REFERENCE.md for complete implementation.
Role Hierarchy Example
See REFERENCE.md for complete implementation.
See templates/rbac-policy.yaml for declarative policy definition.
ABAC Implementation
Attribute-Based Access Control uses policies that evaluate attributes (user, resource, environment) to make dynamic authorization decisions. Ideal for complex, context-aware access control.
Core Components
- Attributes: Properties of users, resources, or environment (e.g.,
user.department, `resource.
Установить authorization-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл authorization-security?
Authorization security standards covering RBAC, ABAC, policy enforcement, OAuth2 scopes, resource-based access control, and NIST 800-53 compliance (AC-3, AC-4, AC-6) for production systems
Как установить скилл authorization-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл authorization-security запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic