-
Notifications
You must be signed in to change notification settings - Fork 17
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 #242 from permitio/daniel/docs
First version of the Debug Mode docs
- Loading branch information
Showing
3 changed files
with
59 additions
and
2 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"label": "Use Audit Logs", | ||
"label": "Audit Logs", | ||
"position": 3, | ||
"link": { | ||
"type": "generated-index", | ||
|
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,57 @@ | ||
--- | ||
sidebar_position: 3 | ||
title: Debug Mode | ||
--- | ||
|
||
Knowing why some decisions were made by your PDP can be a crutial part of buidling and understanding your policies, especially when you encounter unexpected results. | ||
That's what **Debug Mode** is here for. | ||
|
||
##What is Debug mode? | ||
|
||
Permit's Debug Mode adds additional debug information to your decision logs, allowing for an in-depth analysis of the decisions made by your [PDP](https://docs.permit.io/concepts/pdp). | ||
|
||
##The advantages of Debug Mode | ||
|
||
On top of standard log information provided by our Audit Logs, Debug Mode allows us to understand - | ||
|
||
- Why a decision was made | ||
- Which policy was taken into consideration for the evaluation process | ||
- What are the policies currently configured in your environment | ||
|
||
This information gives you a more granular understanding of any decision made by the PDP. | ||
|
||
:::warning | ||
Turning on Debug Mode will impact policy evaluation latency. Thus, it is recommended to disable Debug Mode when running in production. | ||
::: | ||
|
||
##Activating Debug Mode | ||
|
||
There are two possible ways to activate Debug Mode: | ||
|
||
###Through the PDP environment variables: | ||
|
||
When running your PDP, set the environment variable `PDP_DEBUG=True` as part of the PDP deployment. | ||
This will activate Debug Mode for this specific PDP. | ||
|
||
Here's an example of such a PDP deployment: | ||
|
||
``` | ||
docker run -it \ | ||
-p 7766:7000 \ | ||
--env PDP_API_KEY=<YOUR_API_KEY> \ | ||
--env PDP_DEBUG=True | ||
permitio/pdp-v2:latest | ||
``` | ||
|
||
:::note | ||
This configuration will only enable Debug Mode in the PDP itself and not across your environment. | ||
::: | ||
|
||
### Through the UI (Coming Soon) | ||
|
||
Another option to enable Debug Mode is through Permit's UI. To do that: | ||
|
||
1. Go to your Permit dashboard and make sure you have the relevant project and environment selected. | ||
2. Next, go to the **Audit Log** screen. | ||
3. In the top right corner, click on **Settings**. | ||
4. Click the toggle to enable Debug Mode. |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
sidebar_position: 3 | ||
sidebar_position: 4 | ||
title: Troubleshooting | ||
--- | ||
|
||
|