A Rule Based Access Control module for hapi.
This is inspired by the XACML policies.
2.3.0- Ability to use RegExp to match target values. Ability to match field to field. (updated rbac-core to
2.2.0- Customized error responses
2.1.0- Usage of user defined data retrievals for target matching. Nested properties on target keys.
2.0.0- Simplified target (updated rbac-core to
1.3.0- Use more data for target matching
1.2.0- Global default configuration is now possible
1.1.0- Added ability to dynamically retrieve policies for the route
1.0.0- Since this version, only node
^12.0.0is supported. All the functionality and syntax remains the same.
npm install --save hapi-rbac
Then, import the module in your hapi server instance.
Then, configure your policies. Check the API Reference.
Even though this plugin doesn't implement the XACML specification, it was based on its policies.