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

feat: compare this with ctx.subject (#1204) #1497

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

cmmoran
Copy link

@cmmoran cmmoran commented Dec 29, 2023

In the conversation for #1204, @hperl commented:

From an implementation point of view, this would require:

  • adding support for this expression in the OPL parser
  • adding a new userset rewrites type (maybe SubjectEqualsObject), and attach it to the relation if we parsed the expression
  • implement the SubjectEqualsObject rewrite in the check engine (simple, just compare object and subject for a given relation tuple)

Of course, add tests to make sure your change was effective, and run the fuzzers if you touch parser code.

This PR addresses the above suggested implementation and adds the related feature.

Related issue(s)

#1204

Checklist

  • I have read the contributing guidelines.
  • I have referenced an issue containing the design document if my change
    introduces a new feature.
  • I am following the
    contributing code guidelines.
  • I have read the security policy.
  • I confirm that this pull request does not address a security
    vulnerability. If this pull request addresses a security vulnerability, I
    confirm that I got the approval (please contact
    security@ory.sh) from the maintainers to push
    the changes.
  • I have added updated tests that prove my fix is effective or that my feature
    works.
  • I have added or changed the documentation.

Further Comments

I will amend this PR to update/add to the documentation regarding this new feature.

@cmmoran cmmoran requested a review from alnr as a code owner May 5, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant