Skip to content

Commit

Permalink
Merge pull request #238 from permitio/oded/per-8917-docs-about-how-to…
Browse files Browse the repository at this point in the history
…-disable-rebac-to-make-rbac-pdp-faster

Add instructions to disable rebac to increase PDP performance
  • Loading branch information
obsd authored Feb 6, 2024
2 parents 98d4199 + b984389 commit c87b278
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions docs/api/rbac/disable-rebac-to-increase-performance.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
sidebar_position: 99
title: 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](/api/examples/get-project-and-env), and [API_SECRET_KEY](/api/api-with-cli/#get-your-api-key), respectively.

```bash
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 same `curl` 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](https://io.permit.io/slack) or email at [[email protected]](mailto:[email protected]).



0 comments on commit c87b278

Please sign in to comment.