Optimizing PDP Performance by Disabling ReBAC
For certain use cases, you might want to disable Relationship-Based Access Control (ReBAC) to optimize the performance of the PDP. This is only useful if you're not using ReBAC features and are looking to enhance the response speed of the PDP.
Prerequisites
- Ensure you have your project ID and environment ID from your Permit.io setup.
- You should have your environment secret (API key) ready for authorization.
Disabling ReBAC
To disable ReBAC in your environment, use the following curl
command. Replace <project id>
, <env id>
, and API_SECRET_KEY
with your specific project ID, environment ID, and API_SECRET_KEY, respectively.
curl --location --request PATCH 'https://api.permit.io/v2/projects/<project-id>/envs/<env-id>' \
--header 'authorization: Bearer API_SECRET_KEY' \
--header 'Content-Type: application/json' \
--data '{
"settings": {
"rebac_disabled": true
}
}'
Important Notes
- Activation of Change: The updated configuration will take effect only when a new PDP instance is started. Therefore, if you have running PDPs, you will need to restart them for the changes to apply.
- Scope of Change: The change applies only to the specified environment in your project. To revert, set
"rebac_disabled": false
using the samecurl
command. - Disabling ReBAC: This action will remove relationship checks from your access control policies. Ensure this change aligns with your application's requirements and remember to change it if you want to use ReBAC.
Need Help? For assistance or more information, reach out to our support team via Slack or email at help@permit.io.