Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relation-tuples/check always requires a subject_set.relation #1124

Open
6 tasks done
hperl opened this issue Nov 10, 2022 · 1 comment
Open
6 tasks done

relation-tuples/check always requires a subject_set.relation #1124

hperl opened this issue Nov 10, 2022 · 1 comment
Assignees
Labels
bug Something is not working.

Comments

@hperl
Copy link
Collaborator

hperl commented Nov 10, 2022

Preflight checklist

Describe the bug

A request to relation-tuples/check requires the subject set relation to be set. It should just default to an empty string, so that we can, e.g., check Documet:secret#read@User:Bob without having to specify the subject set relation at all.

Reproducing the bug

curl -X GET --silent \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $ORY_PAT" \
  "$ORY_SDK_URL/relation-tuples/check?namespace=File&object=code&relation=view&subject_set.object=Bob&subject_set.namespace=File"|jq

{
  "error": {
    "code": 400,
    "status": "Bad Request",
    "request": "e6e69ca0-1043-9c73-a0e0-73729283136d",
    "message": "incomplete subject, provide \"subject_id\" or a complete \"subject_set.*\""
  }
}

Relevant log output

No response

Relevant configuration

No response

Version

master

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Ory Network

Additional Context

No response

@hperl hperl added the bug Something is not working. label Nov 10, 2022
@hperl hperl self-assigned this Nov 10, 2022
@zepatrik
Copy link
Member

Makes sense 👍 especially with #1092

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

2 participants