access-control-rbac

Implement role-based and attribute-based access control with permission hierarchies and policy engines.

Updated Jun 22, 2026
One-click install
npx skills add https://github.com/aicodepro/ai-agent-nexi --skill access-control-rbac-aicodepro
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: access-control-rbac
Source: https://github.com/aicodepro/ai-agent-nexi/tree/main/agent/skills/access-control-rbac
Command: npx skills add https://github.com/aicodepro/ai-agent-nexi --skill access-control-rbac-aicodepro

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Building authorization logic from scratch leads to hardcoded permission checks, privilege escalation bugs, and unmaintainable access rules scattered across an application. ## Core Features & Use Cases - RBAC Implementation: Node.js classes for roles, permissions, role inheritance hierarchies, and Express middleware for route protection. - ABAC Policy Engine: Python policy evaluation with condition functions like resource ownership, business hours, department, and clearance level, plus Flask decorators. - Enterprise Java Patterns: Spring Security configuration with method-level @PreAuthorize annotations and custom security expressions. - Use Case: When building a multi-tenant admin dashboard, use this Skill to set up viewer/editor/admin role hierarchies with wildcard permissions and audit-friendly access checks. ## Quick Start Implement an RBAC system with viewer, editor, and admin roles for my Express API, including middleware that protects routes by resource and action.

Frequently Asked Questions about access-control-rbac

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement RBAC in Node.js with Express?

Create Permission and Role classes where roles support wildcard matching and parent-role inheritance, then use a middleware factory like requirePermission(resource, action) that checks the user's assigned roles and returns 403 when access is denied.

What is the difference between RBAC and ABAC?

RBAC assigns permissions to roles and users to roles, suiting most applications. ABAC evaluates policies against attributes like department, clearance level, or time of day, fitting complex rule sets where context determines access.

How do I add method-level security in Spring Boot?

Enable @EnableMethodSecurity(prePostEnabled = true) and annotate controller methods with @PreAuthorize using expressions like hasRole('ADMIN') or custom beans such as @accessControlService.canAccessResource for ownership checks.

Does the Python ABAC engine handle concurrent policy updates?

Yes, the ABACEngine uses a threading lock for add, remove, and update operations, and evaluates against a shallow copy of the policy list so checks do not hold the lock during condition evaluation.

When should I use ReBAC instead of RBAC?

Use relationship-based access control when permissions depend on entity relationships, such as social apps where access flows through friendships or group membership. RBAC fits most applications with stable role definitions.