# onury/accesscontrol

Role and Attribute based Access Control for Node.js

Repository: https://github.com/onury/accesscontrol
Canonical: https://ross.abutalabs.com/products/accesscontrol
Language: TypeScript
License: MIT
License Family: permissive
Topics: access-control, abac, rbac, roles, permissions, attributes, acl, nodejs, security, authorization
Last push: 2026-08-12T04:55:50+00:00

## Health v2 (maintenance only)
Score: 96/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 97, release rhythm 93, longevity 100
- inputs: {"age_days": 3641, "days_push": 21, "days_rel": 48, "gap_med": 22, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2327, forks 181 (observed 2026-08-28T04:06:37.489276+00:00)

## What it is
A Node.js library implementing Role-Based Access Control (RBAC) merged with Attribute-Based Access Control (ABAC), including role inheritance, deny-overrides, conditions, and enforced ownership. It offers a chainable API for defining grants and checking permissions on resources and actions.

## Use cases
- implement role-based permissions in a Node.js API
- add attribute-based access control policies to an Express app
- define role hierarchies with deny-overrides for user permissions
- enforce ownership rules so users can only modify their own resources
- check CRUD permissions like can(role).createOwn(resource)
- write declarative ABAC conditions with a readable expression syntax

## When to choose
- you need combined RBAC and ABAC authorization in a Node.js/TypeScript project
- you want role inheritance with deny-always-wins semantics
- you need ownership enforcement and policy conditions in a lightweight library

## When to avoid
- you need a centralized policy server or externalized authorization service
- your stack is not Node.js
- you need fine-grained policy evaluation across distributed microservices with external decision engines

## Facets
- artifact type: library
- maturity: active
- function: authorization, security, middleware
- domain: security, backend, web-development, developer-tools
- platform: -
- tags: rbac, abac, access-control, permissions, roles, policy-engine, esm, nodejs, typescript

## Member repositories
- onury/accesscontrol (main) score 96

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:37.489276+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:38:14.300302+00:00, confidence not recorded.
  - readme: https://github.com/onury/accesscontrol (fetched 2026-08-28T04:06:37.489276+00:00, sha d3962a0d7d8d)
  - registry_npm: https://registry.npmjs.org/accesscontrol (fetched 2026-08-29T10:18:53.701704+00:00, sha 3cd61fbdc730)
- Data as of 2026-08-30T08:39:29.467469+00:00.
