-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from permitio/oded/per-8917-docs-about-how-to…
…-disable-rebac-to-make-rbac-pdp-faster Add instructions to disable rebac to increase PDP performance
- Loading branch information
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]). | ||
|
||
|
||
|