About access-control-rbac
A skill for designing role-based access control with permission management, attribute-based policies, and least-privilege practices. It includes implementation references for Node.js, Python, and Java.
Key features
- 01RBAC permission management
- 02Attribute-based access policies
- 03Role hierarchy design
- 04Access auditing and reviews
- 05Node.js, Python, and Java references
Use cases
- 01Permission control in multi-tenant apps
- 02Enterprise access management and API authorization
- 03Admin dashboards and data access controls
- 04Permission reviews for compliance
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ aj-geddes/ useful-ai-prompts --skill access-control-rbacAfter installing, type/access-control-rbacin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
references/java-spring-security-rbac.mdnodejs-rbac-system.mdpython-abac-attribute-based-access-control.mdscripts/security-checklist.shDetails
From the project READMEAccess Control & RBAC
Table of Contents
Overview
Implement comprehensive Role-Based Access Control systems with permissions management, attribute-based policies, and least privilege principles.
When to Use
- Multi-tenant applications
- Enterprise access management
- API authorization
- Admin dashboards
- Data access controls
- Compliance requirements
Quick Start
Minimal working example:
// rbac-system.js
class Permission {
constructor(resource, action) {
this.resource = resource;
this.action = action;
}
toString() {
return `${this.resource}:${this.action}`;
}
}
class Role {
constructor(name, description) {
this.name = name;
this.description = description;
this.permissions = new Set();
this.inherits = new Set();
}
addPermission(permission) {
this.permissions.add(permission.toString());
}
removePermission(permission) {
// ... (see reference guides for full implementation)
Reference Guides
Detailed implementations in the references/ directory:
| Guide | Contents |
|---|---|
| Node.js RBAC System | Node.js RBAC System |
| Python ABAC (Attribute-Based Access Control) | Python ABAC (Attribute-Based Access Control) |
| Java Spring Security RBAC | Java Spring Security RBAC |
Best Practices
✅ DO
- Implement least privilege
- Use role hierarchies
- Audit access changes
- Regular access reviews
- Separate duties
- Document permissions
- Test access controls
- Use attribute-based policies
❌ DON'T
- Grant excessive permissions
- Share accounts
- Skip access reviews
- Hardcode permissions
- Ignore audit logs
- Use role explosion
Comments
Markdown supported