Hello! 馃憢 I've discovered what looks like an issue with forwarding on requests to the facts router, where it collapses the input user filtering to a single value. It may affect other filters - I've only tested user though. The result of this is that a request for users user_1 and user_2 filters to only return user_2.
From the code I can see that when I send a request to the PDP which it hasn't explicitly got a local implementation for, it forwards it on to the cloud with a log it's doing this.
For the functionality I am building, I am requesting the detailed list role assignments with a user filter that contains several IDs. The request to the PDP looks like:
GET https://pdp:7000/v2/facts/proj_id/env_id/role_assignments?page=1&per_page=2&tenant=tenant_id&user=user_1&user=user_2
I then see a log in the PDP output:
Forwarding facts request: GET https://api.permit.io/v2/facts/proj_id/env_id/role_assignments?page=1&per_page=2&tenant=tenant_id&user=user_2
It looks like the PDP forwards to the cloud API with only the last value as the user filter. I believe from some limited testing with FastAPI that this is because unless FastAPI is told to expect an array for a particular value, it only uses the last defined value.
In the immediate term I can modify my request to speak directly to the Permit cloud API, but it would be useful to fix this in the PDP.
Hello! 馃憢 I've discovered what looks like an issue with forwarding on requests to the
factsrouter, where it collapses the inputuserfiltering to a single value. It may affect other filters - I've only testeduserthough. The result of this is that a request for usersuser_1anduser_2filters to only returnuser_2.From the code I can see that when I send a request to the PDP which it hasn't explicitly got a local implementation for, it forwards it on to the cloud with a log it's doing this.
For the functionality I am building, I am requesting the detailed list role assignments with a
userfilter that contains several IDs. The request to the PDP looks like:I then see a log in the PDP output:
It looks like the PDP forwards to the cloud API with only the last value as the
userfilter. I believe from some limited testing with FastAPI that this is because unless FastAPI is told to expect an array for a particular value, it only uses the last defined value.In the immediate term I can modify my request to speak directly to the Permit cloud API, but it would be useful to fix this in the PDP.