PHPackages                             bbrody/phprbac - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. bbrody/phprbac

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

bbrody/phprbac
==============

PHP-RBAC is the de-facto authorization library for PHP. It provides developers with NIST Level 2 Standard Role Based Access Control and more, in the fastest implementation yet.

2.0.1(7y ago)0259Apache-2.0PHP

Since Mar 14Pushed 7y ago1 watchersCompare

[ Source](https://github.com/bbrody/rbac)[ Packagist](https://packagist.org/packages/bbrody/phprbac)[ Docs](http://phprbac.net/)[ RSS](/packages/bbrody-phprbac/feed)WikiDiscussions develop Synced 3d ago

READMEChangelog (1)DependenciesVersions (7)Used By (0)

\#PHP-RBAC v2.x

PHP-RBAC is an authorization library for PHP. It provides developers with NIST Level 2 Hierarchical Role Based Access Control and more, in the fastest implementation yet.

**Current Stable Release:** [PHP-RBAC v2.0](https://sourceforge.net/projects/phprbac/files/latest/download?source=dlp)

\##Connect With Us

- Home Page:
- OWASP Project Page:
- PHP-RBAC Documentation: [http://phprbac.net/docs\_contents.php](http://phprbac.net/docs_contents.php)
- PHP-RBAC Wiki:
- PHP-RBAC API:
- Issue Tracker:
- Mailing List: [https://lists.owasp.org/mailman/listinfo/owasp\_phprbac](https://lists.owasp.org/mailman/listinfo/owasp_phprbac)

\##What is an Rbac System?

Take a look at the "[Before You Begin](http://phprbac.net/docs_before_you_begin.php)" section of our [Documentation](http://phprbac.net/docs_contents.php) to learn what an RBAC system is and what PHP-RBAC has to offer you and your project.

\##NIST Level 2 Compliance

For information regarding NIST RBAC Levels, please see [This Paper](http://csrc.nist.gov/rbac/sandhu-ferraiolo-kuhn-00.pdf).

For more great resources see the [NIST RBAC Group Page](http://csrc.nist.gov/groups/SNS/rbac/).

\##Installation

You can now use [Composer](https://getcomposer.org/) to install the PHP-RBAC code base.

For Installation Instructions please refer to the "[Getting Started](http://phprbac.net/docs_getting_started.php)" section of our [Documentation](http://phprbac.net/docs_contents.php).

\##Usage##

**Instantiating a PHP-RBAC Object**

With a 'use' statement:

```
    use PhpRbac;

    $rbac = new Rbac();

```

Without a 'use' statement, outside of a namespace:

```
    $rbac = new PhpRbac\Rbac();

```

Without a 'use' statement, inside of another namespace (notice the leading backslash):

```
    $rbac = new \PhpRbac\Rbac();

```

\##PHP-RBAC and PSR

PHP-RBAC's Public API is now fully PSR-0, PSR-1 and PSR-2 compliant.

You can now:

- Use Composer to install/update PHP-RBAC
- Use any PSR-0 compliant autoloader with PHP-RBAC
- Use the included autoloader to load PHP-RBAC

**If you notice any conflicts with PSR compliance please [Submit an Issue](https://github.com/OWASP/rbac/issues/new).**

\##The future of PHP-RBAC

We are in the process of refactoring the PHP-RBAC internals. We have two goals in mind while doing this:

- To meet modern PHP OOP "Best Practices"
- To meet PHP-FIG PSR compliance:

With a PSR compliant Public API already in place we can continue to work towards our goals one piece at a time without altering the Public API that developers are working with and rely on, making the transition as seamless and invisible as possible.

\##Contributing##

We welcome all contributions that will help make PHP-RBAC even better tomorrow than it is today!

Please visit the [PHP-RBAC Wiki](https://github.com/OWASP/rbac/wiki) to learn about our development process and workflow.

\###How You Can Help

- Report Bugs, Enhancement Requests or Documentation errors using our [Issue Tracker](https://github.com/OWASP/rbac/issues?state=open)
- [Choose a Bug](https://github.com/OWASP/rbac/issues?state=open) to work on and submit a Pull Request
- Make helpful suggestions and contributions to the [Documentation](http://phprbac.net/docs_contents.php) using our [Issue Tracker](https://github.com/OWASP/rbac/issues?state=open)
- Spread the word about PHP-RBAC by:
    - Creating Tutorials
    - Blogging
    - [Tweeting](https://twitter.com/)
    - [Facebooking](https://www.facebook.com/)
    - [Google+ing](https://plus.google.com/)
    - Talking to friends and colleagues about us

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 89.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~854 days

Total

3

Last Release

2737d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e2252c9539dd186b2d1ae5442f25f61cbf1b40082b8de12da9db4f7e6ba89b7b?d=identicon)[bbrody](/maintainers/bbrody)

---

Top Contributors

[![jburns131](https://avatars.githubusercontent.com/u/1120974?v=4)](https://github.com/jburns131 "jburns131 (121 commits)")[![abiusx](https://avatars.githubusercontent.com/u/1401691?v=4)](https://github.com/abiusx "abiusx (7 commits)")[![bblue](https://avatars.githubusercontent.com/u/6132918?v=4)](https://github.com/bblue "bblue (2 commits)")[![bbrody](https://avatars.githubusercontent.com/u/12697951?v=4)](https://github.com/bbrody "bbrody (2 commits)")[![Bilge](https://avatars.githubusercontent.com/u/470626?v=4)](https://github.com/Bilge "Bilge (1 commits)")[![bleuscyther](https://avatars.githubusercontent.com/u/2999487?v=4)](https://github.com/bleuscyther "bleuscyther (1 commits)")[![SiGhTfOrbACQ](https://avatars.githubusercontent.com/u/126778?v=4)](https://github.com/SiGhTfOrbACQ "SiGhTfOrbACQ (1 commits)")

---

Tags

securityrbacowasp

### Embed Badge

![Health badge](/badges/bbrody-phprbac/health.svg)

```
[![Health](https://phpackages.com/badges/bbrody-phprbac/health.svg)](https://phpackages.com/packages/bbrody-phprbac)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[owasp/phprbac

PHP-RBAC is the de-facto authorization library for PHP. It provides developers with NIST Level 2 Standard Role Based Access Control and more, in the fastest implementation yet.

435981.3k4](/packages/owasp-phprbac)[zfr/rbac

Zend Framework 3 prototype for Zend\\Permissions\\Rbac.

271.1M7](/packages/zfr-rbac)[olivier127/rbac-bundle

Symfony PhpRabcBundle allow to use RBAC control access for symfony project

318.3k](/packages/olivier127-rbac-bundle)[hosseinhezami/laravel-permission-manager

Advanced permission manager for Laravel.

403.3k](/packages/hosseinhezami-laravel-permission-manager)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
