Command Palette

Search for a command to run...

Назад к скиллам
скилл № 19723

abac-access-control

Use this skill when the user says 'ABAC', 'attribute-based access control', 'fine-grained permissions', 'policy-based access control', 'OPA', 'Rego', 'XACML'…

БесплатноБез исполняемых скриптов
j4flmaoот j4flmao★ 47 звёзд на GitHub

Установить abac-access-control в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Attribute-Based Access Control (ABAC)

Purpose

Implement fine-grained access control using policies that evaluate attributes of the subject, resource, action, and environment. ABAC enables dynamic, context-aware authorization decisions without requiring per-role or per-user permission assignments.

Agent Protocol

Trigger

Exact user phrases: "ABAC", "attribute-based access control", "fine-grained permissions", "policy-based access", "OPA authorization", "Rego", "XACML", "attribute policies", "context-aware auth", "dynamic permissions", "risk-based access", "environment-aware auth", "conditional access", "policy combining", "attribute sources".

Input Context

  • Authorization requirements that RBAC cannot satisfy (document-level, context-dependent, multi-attribute).
  • Available attribute sources (user profile, resource metadata, device info, geolocation, time).
  • Existing auth infrastructure (JWT claims, user directory, resource database).
  • Policy engine preference (OPA, Casbin, Cerbos, custom).
  • Compliance rules that involve conditional access.

Output Artifact

ABAC architecture: attribute catalog, policy structure, evaluation flow, engine integration plan, test strategy.

Response Format

Policy Engine: {OPA|Casbin|Cerbos|custom}
Attribute Sources: {subject, resource, environment}
Policy Count: {total rules}
Combining Algorithm: {deny-overrides|allow-overrides|first-match}
Hybrid With: {RBAC|ReBAC|none}

Completion Criteria

  • Attribute sources identified and catalogued.
  • Policy structure defined with conditions.
  • Policy combining algorithm selected.
  • Policy engine integration planned.
  • Hybrid model (RBAC + ABAC) designed if applicable.
  • ABAC test suite written with edge cases.
  • Policy change management process defined.

Max Response Length

ABAC architecture: 25 lines maximum.

Workflow

Step 1: Understand the ABAC Model

ABAC evaluates four attribute categories to reach an access decision:

Subject Attributes ──┐
                     ├──> Policy Evaluation ──> Allow/Deny
Resource Attributes ─┘
                     ┌──> Conditions (AND/OR/NOT)
Action Attributes ───┤
                     └──> Environment Attributes

Attribute categories:

Category Examples Source
Subject role, department, clearance, location, team, managerId, employmentType JWT claims, User DB, HR system
Resource owner, department, classification, sensitivity, region, createdAt, status Resource DB, metadata service
Action read, write, delete, approve, delegate, export Request method + path
Environment time of day, IP range, device trust score, geolocation, risk score, auth method Request context, device profiler

ABAC vs RBAC:

Dimension RBAC ABAC
Permission granularity Role-level Attribute-level (any combination)
Roles needed 10-50 predefined roles 0-5 base roles + policies
Policy change New role or permission assignment Update policy condition
Context awareness None Full (time, location, risk, etc.)
Audit complexity Simple (role assignments) Complex (attribute snapshots needed)
Implementation complexity Low High
Scalability Linear with roles Linear with policies
Best for Stable org structures Dynamic, context-sensitive environments

Step 2: Define Attribute Sources

Map every attribute available for policy decisions:

// Attribute catalog
const ATTRIBUTE_CATALOG = {
  subject: {
    userId:         { type: 'string', source: 'jwt.sub' },
    role:           { type: 'string', source: 'jwt.role' },
    department:     { type: 'string', source: 'user_db.department' },
    clearance:      { type: 'string', source: 'user_db.clearance_level' },
    location:       { type: 'string', source: 'jwt.geo' },
    employmentType: { type: 'string', source: 'hr_system.type' },
    teamIds:        { type: 'string[]', source: 'user_db.teams' },
    managerId:      { type: 'string', source: 'user_db.manager_id' },
    mfaEnabled:     { type: 'boolean', source: 'user_db.mfa' },
  },
  resource: {
    resourceId:     { type: 'string', source: 'request.path' },
    resourceType:   { type: 'string', source: 'request.resource' },
    ownerId:        { type: 'string', source: 'resource_db.owner_id' },
    department:     { type: 'string', source: 'resource_db.department' },
    classification: { type: 'string', source: 'resource_db.classification' },
    sensitivity:    { type: 'number', source: 'resource_db.sensitivity_score' },
    region:         { type: 'string', source: 'resource_db.region' },
    status:         { type: 'string', source: 'resource_db.status' },
    createdAt:      { type: 'datetime', source: 'resource_db.created_at' },
  },
  action: {
    action:         { type: 'string', source: 'request.method' },
    isBatch:        { type: 'boolean', sourc
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/abac-advanced.md
  • references/abac-envoy-deployment.md
  • references/abac-fundamentals.md
  • references/abac-policy-management.md
  • references/abac-policy-structure.md
  • references/abac-testing.md
  • references/hybrid-rbac-abac.md
  • references/opa-abac-implementation.md
  • references/opa-policy-testing.md

FAQ

Что делает скилл abac-access-control?

Use this skill when the user says 'ABAC', 'attribute-based access control', 'fine-grained permissions', 'policy-based access control', 'OPA', 'Rego', 'XACML', 'attribute policies', 'context-aware authorization', 'dynamic permissions', 'risk-based access', 'environment-aware auth', 'conditional access', or when role-based permissions are insufficient and you need fine-grained control based on user attributes, resource properties, and environmental context. This skill covers: ABAC model (subject/resource/action/environment attributes), policy structure and combining algorithms, OPA/Rego implementation, hybrid RBAC-ABAC patterns, ABAC in applications, policy testing and simulation. Do NOT use for: basic role-based authorization, authentication flows, infrastructure policy (Kyverno/Gatekeeper), or Kubernetes admission control.

Как установить скилл abac-access-control?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл abac-access-control запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить abac-access-control с