Michał Wójcik
09/22/2025, 12:13 PMAsk Inkeep
09/22/2025, 12:15 PMAsk Inkeep
09/22/2025, 12:16 PMAsk Inkeep
09/22/2025, 12:16 PMAlon Boshi
09/22/2025, 12:17 PMMichał Wójcik
09/22/2025, 1:05 PMdata.countries[0].capital == "Bridgetown"
@Alon Boshi am I right?Alon Boshi
09/22/2025, 1:12 PMAsk Inkeep
09/22/2025, 1:12 PMAsk Inkeep
09/22/2025, 1:12 PMcurl --location --request PUT 'https://api.permit.io/v2/projects/{project_id}/{env_id}/opal_scope' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer permit_key_***' \
--data '{
"data": {
"entries": [
{
"url": "https://restcountries.com/v3.1/all?fields=name,region",
"dst_path": "/countries",
"config": {
"headers": {
"Accept": "application/json"
}
}
}
]
}
}'
The dst_path attribute specifies where in the JSON the fetched data will be stored .
*Using the Data in Policies*
Once loaded, you can reference this data in your Rego policies exactly as you mentioned :
data.countries[0].capital == "Bridgetown"
You can also define custom attributes in your Rego policies by adding code in the custom directory of your GitOps repo :
package permit.custom
import future.keywords.in
region_by_common_name[name] := region {
some _,country in data.countries
name := country.name.common
region := country.region
}
custom_user_attributes["region"] := region_by_common_name[data.users[input.user.key].attributes.country]
*Important Requirements*
Make sure your PDP supports custom scopes (v0.2.15+) and enable the OPAL_SPLIT_ROOT_DATA flag :
docker run -e PDP_API_KEY=<YOUR-PERMIT-API-KEY> -e OPAL_SPLIT_ROOT_DATA=1 permitio/pdp-v2:latest
This approach lets you load data from any external source (like Stripe for billing attributes) and use it in your policies without sharing the actual data with Permit's cloud .Ask Inkeep
09/22/2025, 1:13 PMAsk Inkeep
09/22/2025, 1:20 PMThomas
09/22/2025, 1:38 PMlocal PDP + Permit.io SaaS . With a local deployment of the PDP, you can configure a data fetcher to pull data into the PDP and the data will no make it to the SaaS, it will stay local.Michał Wójcik
09/24/2025, 6:48 AMAsk Inkeep
09/24/2025, 6:48 AMAsk Inkeep
09/24/2025, 6:49 AMdocker run -it -p 7766:7000 \
--name pdp-online \
--env PDP_API_KEY=<YOUR_API_KEY> \
--env PDP_FACTDB_ENABLED=true \
permitio/pdp-v2:latest
FactDB tables include :
• role_assignments
• relationship_tuples
• instances
• users
• user_tenant_assoc
*About the Graph Database & Zanzibar*
Yes, Permit.io implements Google Zanzibar-style graph database patterns for ReBAC (3) (4) . The Mesa Verde demo explicitly mentions storing transactions "in a Google-Zanzibar-like graph database, along with their relationships with other users and entities" (3) . The Google Drive tutorial demonstrates Zanzibar-style relationship tuples like (Folder:soc2, parent, File:access-control-policy) (4) .
With FactDB enabled in offline mode, all this graph data can run completely disconnected from Permit cloud (2) .Ask Inkeep
09/24/2025, 6:49 AMAsk Inkeep
09/24/2025, 10:05 AM