Maxime Leduc
06/04/2026, 4:32 PMAsk Inkeep
06/04/2026, 4:32 PMAsk Inkeep
06/04/2026, 4:32 PMdocker pull permitio/pdp-v2:latest
2. Run the container locally:
docker run -it -p 7766:7000 --env PDP_API_KEY=<your-permit-api-key> --env PDP_DEBUG=True permitio/pdp-v2:latest
3. Configure your SDK to point to the local PDP:
from permit import Permit
permit = Permit(
token="[your-api-key]",
pdp="<http://localhost:7766>",
)
(2)
*Why This Works for E2E Testing:*
The PDP runs as a self-contained microservice that evaluates authorization policies locally (1) . Permission checks are performed against this local container, meaning your user data never leaves your system (2) . This setup offers minimal latency and keeps security high .
*Additional Testing Support:*
The Permit CLI provides E2E test generation capabilities. You can use permit test generate e2e to generate end-to-end policy test configurations and test data (3) . You can also run permit test run audit to audit your policy decisions against recent logs .
This approach gives you a production-like authorization environment running locally, perfect for automated testing pipelines.Ask Inkeep
06/04/2026, 4:32 PMMaxime Leduc
06/04/2026, 4:34 PMOr Weis
06/04/2026, 4:49 PMAsk Inkeep
06/04/2026, 4:49 PMAsk Inkeep
06/04/2026, 4:49 PMpermit.check()) are evaluated *locally* on your machine with minimal latency (2)
• Your user data *never goes outside your system* during permission checks
*Network architecture:*
The local PDP is powered by OPAL (Open Policy Administration Layer) , which features a built-in separation of the data plane from the control plane (1) . This means:
• *Control plane* (Permit.io Cloud) : Manages policies and configuration
• *Data plane* (your local PDP) : Makes authorization decisions without depending on cloud availability
*For completely offline E2E testing:*
If you need *zero* cloud calls during tests, you would need to pre-configure your policies and run the PDP in a way that doesn't require real-time policy syAsk Inkeep
06/04/2026, 4:49 PM