Behaviour varies between /relation-tuples/check/openapi and /relation-tuples/check #1596
Open
4 of 5 tasks
Labels
bug
Something is not working.
Preflight checklist
Ory Network Project
No response
Describe the bug
When defining a subject set, both the CLI and base /relation-tuples/check allow for the subject relation to be excluded.
The OpenAPI-produced client (both the outdated 0.11 on maven and I think the one generated from master) refer to /relation-tuples/check/openapi.
This endpoint will return a 400, whereas the CLI and /relation-tuples/check endpoints will return true or false where expected.
Reproducing the bug
Make API request from the OpenAPI client (PermissionApi.checkPermission)
permissionApi.checkPermission(
MY_NAMESPACE,
_object.toString(),
MY_RELATION,
null, // subject_id
ENTITY, // namespace
"$requestingEntity", // subject set object
null, // subject set relation
DEFAULT_MAX_DEPTH)
This will return 400.
Override this function to use the non-openAPI POST endpoint, and alter it to add the parameters to the POST body instead of the query parameters.
This will succeed.
Relevant log output
Relevant configuration
No response
Version
v0.12.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Binary
Additional Context
No response
The text was updated successfully, but these errors were encountered: