access-control-rbac
Implement Role-Based Access Control (RBAC), permissions management, and authorization policies. Use when building secure access control systems with fine-grained permissions.
How do I install this agent skill?
npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill access-control-rbacIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill provides reference implementations for Role-Based Access Control (RBAC) and Attribute-Based Access Control (ABAC) across Node.js, Python, and Java. No security issues were detected in the instructions or scripts.
- Socketwarn
1 alert: gptAnomaly
- Snykpass
Risk: LOW · No issues
- Runlayerpass
1/5 files flagged
- ZeroLeakspass
Score: 93/100 · 2 sections analyzed
What does this agent skill do?
Access 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
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/aj-geddes/useful-ai-prompts/access-control-rbac">View access-control-rbac on skillZs</a>