A Rule Based Access Control module for hapi.
This is inspired by the XACML policies.
2.0.0
- Simplified target (updated rbac-core to2.0.0
)1.3.0
- Use more data for target matching1.2.0
- Global default configuration is now possible1.1.0
- Added ability to dynamically retrieve policies for the route1.0.0
- Since this version, only node^4.0
and hapi^12.0.0
is supported. All the functionality and syntax remains the same.
First, install
npm install --save hapi-rbac
Then, import the module in your hapi server instance.
server.register({
register: require('hapi-rbac')
}, function(err) {
...
});
Then, configure your policies. Check the API Reference.
To have a better idea of how this works, you can check my Bachelor's project presentation about XACML here (english), or here (portuguese).
Even though this plugin doesn't implement the XACML specification, it was based on its policies.