Sumit Sati
07/31/2025, 5:52 AMAsk Inkeep
07/31/2025, 5:52 AMAsk Inkeep
07/31/2025, 5:52 AMpermit.authorized_users function is available starting from PDP version 0.4.0, and you're running version 0.9, so that's not the issue (1) . Since this feature is in EAP stage and you have a Pro account, you should have access .
For resource sets usage, the documentation shows this works with the authorized users API . Here's the exact Python usage for resource sets:
from permit import AuthorizedUsersResult
authorized_users: AuthorizedUsersResult = permit.authorized_users(
"read", "repo",
)
The response schema should look like this:
{
"resource": "repo:*",
"tenant": "default",
"users": {
"user1": [
{
"user": "user1",
"tenant": "default",
"resource": "__tenant:default",
"role": "admin"
}
]
}
}
Since you're getting empty user sets, I need some additional information to help our engineers investigate:
1. Which Workspace / Project / Env are you using?
2. What calls are you performing (as SDK code or CURL) ?
3. Which PDP version you are running (you mentioned 0.9) ?
4. Can you share relevant logs from your PDP?
This will help determine if there's an issue with your resource set configuration or the authorized users API implementation.Ask Inkeep
07/31/2025, 5:52 AMRaz Co
07/31/2025, 5:56 AMSumit Sati
08/05/2025, 5:20 AM2025-08-05T05:16:46.760064+0000 | opal_client.engine.logger | INFO | Received request. POST /v1/data/permit/authorized_users/authorized_users
2025-08-05T05:16:46.764233+0000 | opal_client.engine.logger | INFO | Sent response. POST /v1/data/permit/authorized_users/authorized_users -> 200
2025-08-05T05:16:50.013569+0000 | opal_client.engine.logger | INFO | Logs uploaded successfully. {"plugin": "decision_logs", "time": "2025-08-05T05:16:50Z"}
2025-08-05T05:17:49.623197+0000 | opal_client.engine.logger | INFO | Received request. POST /v1/data/permit/authorized_users/authorized_users
2025-08-05T05:17:49.626651+0000 | opal_client.engine.logger | INFO | Sent response. POST /v1/data/permit/authorized_users/authorized_users -> 200
2025-08-05T05:17:55.337529+0000 | opal_client.engine.logger | INFO | Logs uploaded successfully. {"plugin": "decision_logs", "time": "2025-08-05T05:17:55Z"}
2025-08-05T05:18:06.289323+0000 | opal_client.engine.logger | INFO | Received request. POST /v1/data/permit/authorized_users/authorized_users
2025-08-05T05:18:06.292870+0000 | opal_client.engine.logger | INFO | Sent response. POST /v1/data/permit/authorized_users/authorized_users -> 200
2025-08-05T05:18:10.630162+0000 | opal_client.engine.logger | INFO | Logs uploaded successfully. {"plugin": "decision_logs", "time": "2025-08-05T05:18:10Z"}
2025-08-05T05:18:11.023902+0000 | opal_client.engine.logger | INFO | Received request. POST /v1/data/permit/authorized_users/authorized_users
2025-08-05T05:18:11.032496+0000 | opal_client.engine.logger | INFO | Sent response. POST /v1/data/permit/authorized_users/authorized_users -> 200
2025-08-05T05:18:20.084159+0000 | opal_client.engine.logger | INFO | Logs uploaded successfully. {"plugin": "decision_logs", "time": "2025-08-05T05:18:20Z"}
Curl is
curl --location '<http://permit.pdp.tenet.stage/authorized_users>' \
--header 'Authorization: Bearer my_key' \
--header 'Content-Type: application/json' \
--data '{
"action": "create",
"resource": {
"type": "REGOS",
"tenant": "2",
"attributes": {
"level": 0,
"featureTag": "rewardsMarketingCreate"
},
"context": {
"enable_abac_authorized_users": true
}
}
}'Sumit Sati
08/05/2025, 5:21 AM{
"resource": "REGOS:*",
"tenant": "2",
"users": {}
}Sumit Sati
08/05/2025, 5:46 AMgameskraft
tenet-console
devSumit Sati
08/05/2025, 5:48 AMSumit Sati
08/05/2025, 8:05 AMAsk Inkeep
08/05/2025, 8:05 AMAsk Inkeep
08/05/2025, 8:06 AMREGOS:*) rather than filtering by the specific resource set attributes you're providing. (1)
Your curl request shows you're correctly including the ABAC attributes and enabling the feature:
"attributes": {
"level": 0,
"featureTag": "rewardsMarketingCreate"
},
"context": {
"enable_abac_authorized_users": true
}
The documentation warns that ABAC usage is "performance-intensive and is disabled by default" , but you've enabled it with enable_abac_authorized_users: true.
The response "resource": "REGOS:*" suggests the PDP is treating this as a resource-type query rather than applying the attribute filters to match your resource sets. This could be a limitation or bug in how resource sets interact with the authorized_users API in the current EAP version.
Since you've already provided:
1. Workspace/Project/Env: gameskraft/tenet-console/dev
2. The exact CURL call with ABAC attributes
3. PDP version 0.9
4. Relevant PDP logs showing successful 200 responses
This appears to be a specific issue with resource set attribute filtering in the authorized_users API. The engineering team will need to investigate why the ABAC attributes aren't being applied to filter users who have permissions on the specific resource set rather than the entire resource type.Ask Inkeep
08/05/2025, 8:06 AMOmer Zuarets
08/05/2025, 8:08 AMSumit Sati
08/05/2025, 8:09 AMSumit Sati
08/05/2025, 8:10 AMOmer Zuarets
08/05/2025, 8:13 AMSumit Sati
08/05/2025, 8:57 AMcurl --location '<http://permit.pdp.tenet.stage/allowed>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer my_key' \
--data-raw '{
"user": {
"key": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>"
},
"action": "create",
"resource": {
"type": "REGOS",
"attributes": {
"level": 0,
"featureTag": "rewardsMarketingCreate"
},
"tenant": "2"
},
"context": {}
}'Sumit Sati
08/05/2025, 8:58 AM{
"allow": true,
"debug": {
"request": {
"action": "create",
"resource": {
"attributes": {
"featureTag": "rewardsMarketingCreate",
"level": 0,
"type": "REGOS"
},
"type": "REGOS"
},
"tenant": "2",
"user": {
"attributes": {
"email": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>",
"key": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>",
"roles": [
"PROMOTION_promotionsAddCashCreate_0_creator",
"PROMOTION_promotionsAddCashEdit_0_creator",
"PROMOTION_promotionsOtherCreate_0_creator",
"PROMOTION_promotionsOtherEdit_0_creator",
"REGOS_rewardsBusinessCreate_0_creator",
"REGOS_rewardsMarketingCreate_0_creator",
"REGOS_rewardsProductCreate_0_creator"
],
"tenants": [
"1",
"19",
"2",
"31",
"6"
]
},
"key": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>",
"synced": true
}
},
"abac": {
"allow": true,
"allowing_rules": [
{
"resourceset": "resourceset_REGOS_5frewardsMarketingCreate_5flevel_5f0",
"userset": "userset__5f_5fautogen_5fREGOS_5frewardsMarketingCreate_5f0_5fcreator"
}
],
"code": "allow",
"reason": "user '<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>' matched 'userset__5f_5fautogen_5fREGOS_5frewardsMarketingCreate_5f0_5fcreator' userset conditions, the given resource matched the 'resourceset_REGOS_5frewardsMarketingCreate_5flevel_5f0' resourceset conditions, users matching 'userset__5f_5fautogen_5fREGOS_5frewardsMarketingCreate_5f0_5fcreator' userset conditions has the 'create' permission on resources of type 'REGOS' matching 'resourceset_REGOS_5frewardsMarketingCreate_5flevel_5f0' resourceset conditions"
}
},
"result": false
}Sumit Sati
08/05/2025, 9:00 AMOmer Zuarets
08/05/2025, 9:06 AMSumit Sati
08/05/2025, 9:06 AMOmer Zuarets
08/05/2025, 9:27 AMOmer Zuarets
08/05/2025, 9:27 AMcurl --location '<http://localhost:7766/allowed>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your-key}' \
--data-raw '{
"user": {
"key": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>"
},
"action": "create",
"resource": {
"type": "REGOS",
"attributes": {
"level": 0,
"featureTag": "rewardsMarketingCreate"
},
"tenant": "2"
},
"context": {}
}'
returns
{
"allow": true,
"debug": {
"request": {
"action": "create",
"resource": {
"attributes": {
"featureTag": "rewardsMarketingCreate",
"level": 0,
"type": "REGOS"
},
"type": "REGOS"
},
"tenant": "2",
"user": {
"attributes": {
"email": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>",
"key": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>",
"roles": [
"PROMOTION_promotionsAddCashCreate_0_creator",
"PROMOTION_promotionsAddCashEdit_0_creator",
"PROMOTION_promotionsOtherCreate_0_creator",
"PROMOTION_promotionsOtherEdit_0_creator",
"REGOS_rewardsBusinessCreate_0_creator",
"REGOS_rewardsMarketingCreate_0_creator",
"REGOS_rewardsProductCreate_0_creator"
],
"tenants": [
"1",
"19",
"2",
"31",
"6"
]
},
"key": "<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>",
"synced": true
}
},
"abac": {
"allow": true,
"allowing_rules": [
{
"resourceset": "resourceset_REGOS_5frewardsMarketingCreate_5flevel_5f0",
"userset": "userset__5f_5fautogen_5fREGOS_5frewardsMarketingCreate_5f0_5fcreator"
}
],
"code": "allow",
"reason": "user '<mailto:sumit.sati@gameskraft.com|sumit.sati@gameskraft.com>' matched 'userset__5f_5fautogen_5fREGOS_5frewardsMarketingCreate_5f0_5fcreator' userset conditions, the given resource matched the 'resourceset_REGOS_5frewardsMarketingCreate_5flevel_5f0' resourceset conditions, users matching 'userset__5f_5fautogen_5fREGOS_5frewardsMarketingCreate_5f0_5fcreator' userset conditions has the 'create' permission on resources of type 'REGOS' matching 'resourceset_REGOS_5frewardsMarketingCreate_5flevel_5f0' resourceset conditions"
}
},
"result": false
}
get authorized users is
curl --location --request POST '<http://localhost:7766/authorized_users>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {your-key}' \
--data-raw '{
"action": "create",
"resource": {
"type": "REGOS",
"attributes": {
"level": 0,
"featureTag": "rewardsMarketingCreate"
},
"tenant": "2"
},
"context": {
"enable_abac_authorized_users": true
}
}'
returns ( see attached snippet )Sumit Sati
08/05/2025, 9:57 AMSumit Sati
08/05/2025, 10:00 AMCaused by: client error (SendRequest)
Caused by: connection closed before message completed (consecutive failures: 1/12)
these are pdp logs which I am providing .. Also I have this running inside a vpc so if thats an issueSumit Sati
08/05/2025, 10:01 AM2025-08-05T09:40:13.020474+0000 | aiohttp.client |ERROR | Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0xffffa3a3e860>
2025-08-05T09:40:13.021076+0000 | aiohttp.connector |ERROR | Unclosed connector
connections: ['deque([(<aiohttp.client_proto.ResponseHandler object at 0xffffa15bf100>, 82906.834884298)])']
connector: <aiohttp.connector.TCPConnector object at 0xffffa3a3ead0>Sumit Sati
08/05/2025, 10:02 AMAsk Inkeep
08/05/2025, 10:02 AMAsk Inkeep
08/05/2025, 10:02 AMpermit.check calls work because they can use cached data, but the authorized_users API might require fresh data from the cloud, which is failing due to these connection issues.
To help our engineers investigate further:
1. Which Workspace / Project / Env: gameskraft/tenet-console/dev ✓
2. What calls are you performing: CURL provided ✓
3. Which PDP version: 0.9 ✓
4. PDP logs: Connection errors shown ✓
Additional debugging steps:
• Check if your VPC allows outbound HTTPS traffic to Permit's cloud services
• Verify DNS resolution is working correctly inside your VPC
• Consider increasing timeout values if network latency is high
• Check if there's a proxy or firewall blocking connections
The fact that another user (@U03PSEUHR9B) got it working suggests this is environment-specificAsk Inkeep
08/05/2025, 10:02 AMSumit Sati
08/05/2025, 10:04 AM2025-08-05T04:40:12.189344+0000 | opal_client.engine.logger | INFO | OPA is out of date. {"current_version": "1.4.2", "download_opa": "<https://openpolicyagent.org/downloads/v1.7.1/opa_linux_arm64_static>", "latest_version": "1.7.1", "release_notes": "<https://github.com/open-policy-agent/opa/releases/tag/v1.7.1>", "time": "2025-08-05T04:40:12Z"}Ask Inkeep
08/05/2025, 10:04 AMAsk Inkeep
08/05/2025, 10:04 AMconnection closed before message completed, Unclosed client session) suggest your VPC might be blocking or interrupting HTTPS traffic to Permit's cloud services. Since permit.check works (uses cached data) but authorized_users doesn't (may need fresh sync) , focus on resolving the network connectivity first.Ask Inkeep
08/05/2025, 10:04 AMOmer Zuarets
08/05/2025, 12:07 PMOmer Zuarets
08/05/2025, 12:08 PMSumit Sati
08/05/2025, 12:27 PMopal_client.engine.logger | INFO | Received request. POST /v1/data/permit/authorized_users_new/authorized_users
[2025-08-05T12:25:25Z ERROR pdp_server::api::authz::authorized_users] Failed to send request to OPA: Failed to parse OPA response: missing field `result` at line 1 column 54
2025-08-05T12:25:25.928801+0000 | opal_client.engine.logger | INFO | Sent response. POST /v1/data/permit/authorized_users_new/authorized_users -> 200Sumit Sati
08/05/2025, 12:27 PMAsk Inkeep
08/05/2025, 12:27 PMAsk Inkeep
08/05/2025, 12:27 PM/v1/data/permit/authorized_users_new/authorized_users) after you set PDP_USE_NEW_AUTHORIZED_USERS=true.
The PDP_USE_NEW_AUTHORIZED_USERS configuration is described as:
Default: `false`
Feature flag for enabling the new authorized users implementation. This feature is controlled by the control plane.
This feature was added in PDP v0.9.0, which matches your version.
The error "missing field `result`" suggests the OPA response format doesn't match what the PDP expects. Since this is a feature flag controlled by the control plane, there might be additional configuration needed on Permit's side for your workspace.
To help our engineers investigate:
1. Which Workspace / Project / Env they are using: gameskraft/tenet-console/dev ✓
2. What calls are they performing: CURL provided ✓
3. Which PDP version they are running: 0.9 ✓
4. Relevant logs from their PDP: Provided ✓
Could you also share:
• The exact environment variable configuration you're using for the PDP
• Any additional error logs around this OPA parsing errorAsk Inkeep
08/05/2025, 12:27 PMSumit Sati
08/05/2025, 12:33 PMPDP_HORIZON_PORT=7001
HOSTNAME=61702759cd26
PDP_API_KEY=key
SHLVL=1
HOME=/home/permit
OPAL_LOG_TRACEBACK=false
PDP_VERSION_FILE_PATH=/app/permit_pdp_version
OPAL_INLINE_OPA_ENABLED=true
GPG_KEY=key
PDP_REMOTE_STATE_ENDPOINT=/v2/pdps/me/state
PYTHON_SHA256=key
OPAL_INLINE_OPA_EXEC_PATH=/app/bin/opa
OPAL_SERVER_URL=<https://opal.permit.io>
PDP_OPA_PLUGINS={"permit_graph":{}}
PDP_DEBUG=True
PDP_PORT=7000
TERM=xterm
PDP_USE_NEW_AUTHORIZED_USERS=true
PATH=/app/bin:/home/permit/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
OPAL_INLINE_OPA_LOG_FORMAT=http
LANG=C.UTF-8
PDP_REMOTE_CONFIG_ENDPOINT=/v2/pdps/me/config
PDP_PYTHON_PATH=python3
OPAL_AUTH_PUBLIC_KEY=ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDe2iQ+/E01P2W5/EZwD5NpRiSQ8/r/k18pFnym+vWCSNMWpd9UVpgOUWfA9CAX4oEo5G6RfVVId/epPH/qVSL87uh5PakkLZ3E+PWVnYtbzuFPs/lHZ9HhSqNtOQ3WcPDTcY/ST2jyib2z0sURYDMInSc1jnYKqPQ6YuREdoaNdPHwaTFN1tEKhQ1GyyhL5EDK97qU1ejvcYjpGm+EeE2sjauHYn2iVXa2UA9fC+FAKUwKqNcwRTf3VBLQTE6EHGWbxVzXv1Feo8lPZgL7Yu/UPgp7ivCZhZCROGDdagAfK9sveYjkKiWCLNUSpado/E5Vb+/1EVdAYj6fCzk45AdQzA9vwZefP0sVg7EuZ8VQvlz7cU9m+XYIeWqduN4Qodu87rtBYtSEAsru/8YDCXBDWlLJfuZb0p/klbte3TayKnQNSWD+tNYSJHrtA/3ZewP+tGDmtgLeB38NLy1xEsgd31v6ISOSCTHNS8ku9yWQXttv0/xRnuITr8a3TCLuqtUrNOhCx+nKLmYF2cyjYeQjOWWpn/Z6VkZvOa35jhG1ETI8IwE+t5zXqrf2s505mh18LwA1DhC8L/wHk8ZG7bnUe56QwxEo32myUBN8nHdu7XmPCVP8MWQNLh406QRAysishWhXVs/+0PbgfBJ/FxKP8BXW9zqzeIG+7b/yk8tRHQ==
PDP_IGNORE_DEFAULT_DATA_UPDATE_CALLBACKS_URLS=["<http://localhost:8181/v1/data/permit/rebac/cache_rebuild>"]
PYTHON_VERSION=3.10.18
OPAL_LOG_MODULE_EXCLUDE_LIST=[]
OPAL_LOG_DIAGNOSE=false
OPAL_INLINE_OPA_CONFIG={"v0_compatible": true}
PWD=/app
PDP_HORIZON_HOST=0.0.0.0
PDP_CONTROL_PLANE=<https://api.permit.io>
/app $
@Omer Zuarets @Ask Inkeep and there are no additional logs arounf this parsing error.. Also I have replaced some of the secrets with "key"Ask Inkeep
08/05/2025, 12:33 PMAsk Inkeep
08/05/2025, 12:33 PMPDP_USE_NEW_AUTHORIZED_USERS=true (1) . This configuration was added in PDP v0.9.0 , which matches your version.
The error shows the PDP is routing correctly to /v1/data/permit/authorized_users_new/authorized_users, but OPA is returning a response that's missing the expected result field. Since the PDP_USE_NEW_AUTHORIZED_USERS feature is "controlled by the control plane" , there may be additional backend configuration needed for your workspace.
Your environment variables look correct, and the fact that @U03PSEUHR9B got it working suggests this might be a workspace-specific configuration issue. The authorized_users feature is still in EAP stage (2) , which could explain why it requires special control plane configuration.
To help our engineers investigate this parsing error:
1. Which Workspace / Project / Env they are using: gameskraft/tenet-console/dev ✓
2. What calls are they performing: CURL provided ✓
3. Which PDP version they are running: 0.9 ✓
4. Relevant logs from their PDP: OPA parsing error provided ✓
Since this appears to be a control plane configuration issue for the new authorized users implementation, the engineering team will need to check if your workspace has the proper backend configuration enabled for this EAP feature.Ask Inkeep
08/05/2025, 12:34 PMOmer Zuarets
08/05/2025, 12:34 PMPDP_USE_NEW_AUTHORIZED_USERS is EAP and works only for specific environments we enable it for them, you shouldn’t enable it.
The PDP should work as is and return the results as I sent with just configuring the PDP_API_KEYOmer Zuarets
08/05/2025, 12:35 PMSumit Sati
08/05/2025, 12:36 PMOmer Zuarets
08/05/2025, 12:40 PMSumit Sati
08/05/2025, 12:42 PMOmer Zuarets
08/05/2025, 12:43 PMSumit Sati
08/05/2025, 12:55 PMcurl --location '<http://permit.pdp.tenet.stage/authorized_users>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer key' \
--data '{
"action": "sdfsf",
"resource": {
"type": "REGOS",
"attributes": {
"level": 0,
"featureTag": "rewardsMarketingCreate"
},
"tenant": "2"
},
"context": {
"enable_abac_authorized_users": true
}
}'
the same curl but no matter what action I am putting , it always returns full user list.. Even if i put a garbage action which isnt even defined . Please test this on your end once. Simultaneously I am also reloading and testingSumit Sati
08/05/2025, 1:17 PMOmer Zuarets
08/05/2025, 1:23 PMSumit Sati
08/05/2025, 1:39 PMOmer Zuarets
08/05/2025, 1:40 PMSumit Sati
08/05/2025, 1:42 PMOmer Zuarets
08/05/2025, 1:45 PMSumit Sati
08/07/2025, 6:36 AMOmer Zuarets
08/07/2025, 7:17 AMSumit Sati
08/07/2025, 11:12 AMOmer Zuarets
08/08/2025, 2:22 PMSumit Sati
08/08/2025, 2:34 PM