Mihiru Kongahage
11/24/2025, 2:13 PM{
"user": {
"key": "user_id1"
},
"action": "create",
"resource": {
"type": "project",
"tenant": "default",
"key": "project_test10"
},
"context": {}
}
Is this RBAC + ReBAC design and resource-instance model valid for Permit.io for this use case? Any other design options/candidates that you'd recommend?
In the first iteration, we'd like to use the cloud PDP exclusively without a local PDP setup. Is there a another approach where this kind of permission model can be supported by exclusively using cloud PDP?Alon Boshi
11/24/2025, 2:34 PMAlon Boshi
11/24/2025, 2:34 PMAsk Inkeep
11/24/2025, 2:34 PMAsk Inkeep
11/24/2025, 2:34 PMdocker pull permitio/pdp-v2:latest
(4)
docker run -it -p 7766:7000 --env PDP_DEBUG=True --env PDP_API_KEY=<YOUR_API_KEY> permitio/pdp-v2:latest
(4) (5)
The Cloud PDP is designed for "quick experimentation with Permit" but "in production deployments, it is best to deploy the Docker Container PDP for better latency and availability" (5) .
Your permission check structure looks correct for checking project-level permissions with the tenant context included .Ask Inkeep
11/24/2025, 2:34 PMOr Weis
11/24/2025, 2:43 PMMihiru Kongahage
11/25/2025, 7:10 AMAlon Boshi
11/25/2025, 8:14 AMAlon Boshi
11/25/2025, 9:29 AMMihiru Kongahage
11/25/2025, 9:31 AMOr Weis
11/29/2025, 4:58 PMOmer Zuarets
11/30/2025, 12:36 PMMihiru Kongahage
12/03/2025, 12:08 PMOmer Zuarets
12/03/2025, 12:32 PMMihiru Kongahage
12/03/2025, 1:15 PMOmer Zuarets
12/03/2025, 1:32 PMMihiru Kongahage
12/03/2025, 1:53 PMBashwara Undupitiya
12/05/2025, 9:03 AMOr Weis
12/05/2025, 9:08 AMBashwara Undupitiya
12/05/2025, 9:36 AMMihiru Kongahage
12/10/2025, 7:41 AMAlon Boshi
12/10/2025, 8:28 AMAsk Inkeep
12/10/2025, 8:28 AMAsk Inkeep
12/10/2025, 8:29 AMpermit.check()) go to your local PDP container. (1) (2) (3) (4) The local PDP itself connects to Permit.io's cloud services (like api.permit.io, opal-v2.permit.io, etc.) to fetch policies and sync data. (5) (6)
So from a networking standpoint:
• *SDK → Local PDP*: Your application only talks to your local PDP for authorization checks
• *Local PDP → Permit Cloud*: The PDP connects outbound to Permit's cloud services for policy updates and data sync
Your application code doesn't directly connect to Permit's cloud for permission checks when using a local PDP—only the PDP container does.
*2. Querying role assignments via SDK:*
I don't have specific documentation on SDK support for querying role assignments. The sources I have access to focus on permission checks and user sync operations rather than listing role assignments. You're correct that this is currently available via the API directly.
*
I'd recommend reaching out to the team directly (as Alon mentioned) for confirmation on the SDK roadmap for role assignment queries, and for any additional networking details specific to your deployment.Ask Inkeep
12/10/2025, 8:29 AMMihiru Kongahage
12/10/2025, 9:14 AMAlon Boshi
12/10/2025, 1:30 PMpermit.api.*).Mihiru Kongahage
12/10/2025, 1:32 PMAlon Boshi
12/10/2025, 1:35 PMsyncUser function creates a user if they don't exist, or updates them if they already do.
Please expand here @Ask InkeepAsk Inkeep
12/10/2025, 1:35 PMAsk Inkeep
12/10/2025, 1:36 PMsyncUser is a data operation that goes directly to the Permit API (cloud) , not through the PDP. (1) (2)
The syncUser function saves a user's information to the Permit.io cloud and PDP upon user creation. (1) It should be used for initial user creation and when syncing users between your authentication solution and Permit.
Here's how it works in Node.js:
const user = await permit.api.syncUser(user) ;
And in .NET:
var user = await permitClient.Api.SyncUser(userObj) ;
(3)
Notice the permit.api.* pattern—this indicates it's an API operation that communicates directly with Permit's cloud services, not a permission check that goes through the PDP. (1) (3)
The recommended approach is to call syncUser() immediately after authentication to ensure user data is up-to-date in Permit. (2) You can also assign roles during sync by including role_assignments in the request. (4)
For bulk user operations, you can use the bulk API endpoints instead:
curl -X POST https://api.permit.io/v2/facts/{proj_id}/{env_id}/bulk/users \
-H "Authorization: Bearer {your_permit_token}" \
-H "Content-Type: application/json" \
-d '{
"operations": [{
"key": "jane_doe",
"email": "jane@coolcompany.com",
"first_name": "Jane",
"last_name": "Doe",
"attributes": {}
}, ...]
}'
(4) Ask Inkeep
12/10/2025, 1:36 PMBashwara Undupitiya
12/10/2025, 2:34 PMAlon Boshi
12/10/2025, 2:59 PMAsk Inkeep
12/10/2025, 2:59 PMAsk Inkeep
12/10/2025, 3:00 PMpermit.check()) * → go to your local PDP (1) (2)
2. **API operations (permit.api.* like syncUser, creating resources, etc.) ** → go directly to Permit.io cloud (api.permit.io) (3)
So yes, *Service 1 would require network exclusions to `api.permit.io`* (HTTPS) for user syncing and other data operations.
*Regarding latency and regional servers:* I don't have specific documentation on regional server selection or automatic routing based on IP location. The control plane URL defaults to https://api.permit.io.
For enterprise deployments with specific regional requirements, the documentation mentions: "Custom cloud PDP deployments are available to enterprise tier customers. Those can include different regions, cloud providers, custom SSL/TLS configurations or other specifications. Please reach out to us at support@permit.io" (1)
I'd recommend reaching out to the team directly for details on:
• Regional API availability
• Latency expectations for direct API calls from your region
• Whether automatic regional routing existsAsk Inkeep
12/10/2025, 3:00 PMAlon Boshi
12/10/2025, 3:01 PMproxy_facts_via_pdp
@Ask Inkeep please expandAsk Inkeep
12/10/2025, 3:01 PMAsk Inkeep
12/10/2025, 3:01 PMproxy_facts_via_pdp is exactly what you need for your network-restricted environment. (1)
When enabled, this feature routes data operations (like user syncing, creating resources, role assignments) *through your local PDP* instead of directly to the Permit cloud API.
This means Service 1 would only need network access to your PDP—the PDP handles the cloud communication.
*How it works:*
With proxy_facts_via_pdp enabled, the SDK sends fact operations to your PDP at /facts/... endpoints, and the PDP forwards them to the Permit API.
*Python example:*
from permit import Permit
permit = Permit(
token="<your-api-key>",
pdp="http://localhost:7766",
proxy_facts_via_pdp=True
)
# This now goes through PDP, not directly to cloud
user = await permit.api.users.create({
"key": "user123",
"email": "user@example.com"
})
, (2)
*Supported operations via PDP proxy:* (1)
• POST /facts/users
• PUT /facts/users/{user_id}
• PATCH /facts/users/{user_id}
• POST /facts/tenants
• POST /facts/users/{user_id}/roles
• POST /facts/role_assignments
• POST /facts/resource_instances
• POST /facts/relationship_tuples
*Bonus:* This also enables "read-your-own-writes" consistency—permission checks work immediately after creating data, without sync delays.
*Minimum PDP version required:* 0.5.1 or above.Ask Inkeep
12/10/2025, 3:01 PM