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(abac-assertions): add context to assertion #112

Draft
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

jon-whit
Copy link
Contributor

@jon-whit jon-whit commented Nov 1, 2023

Description

Add context to Assertions for ABAC support.

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

jpadilla and others added 15 commits September 14, 2023 13:03
* feat: add `condition` to RelationReference

* feat: add `Condition` definition

* feat: add `conditions` to AuthorizationModel

* update swagger

* feat: add `conditions` to WriteAuthorizationModelRequest

* feat: add `context` fields to query requests

* use an enum for condition param type names

* add feat branch to review workflow

* stick to enum conventions

* suppress diffs from generated files

* regenerate

* add missing type name

* proposed validation as starting point

* add ipaddress type

* tweaks

* update validation for Condition.name

* refactor: change Assertion TupleKey to CheckRequestTupleKey

* feat: adding condition for tuple key (#94)

* feat: adding condition for tuple key

* remove redundant validation

---------

Co-authored-by: Jonathan Whitaker <[email protected]>
Co-authored-by: Adrian Tam <[email protected]>
* re-order fields on TupleKey

* mark fields as required where applicable
)

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.12.0 to 0.17.0.
- [Commits](golang/net@v0.12.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@jon-whit jon-whit requested a review from a team as a code owner November 1, 2023 17:38
@jon-whit jon-whit changed the title Add context to assertion feat(abac-assertions): add context to assertion Nov 1, 2023
@jon-whit jon-whit changed the base branch from main to feat/abac November 1, 2023 17:40
Copy link
Member

@miparnisari miparnisari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you update the docs?

description:
"The ReadAssertions API will return, for a given authorization model id, "
"all the assertions stored for it. An assertion is an object that contains a "
"tuple key, and the expectation of whether a call to the Check API of that tuple key "
"will return true or false. "
};

@jpadilla jpadilla marked this pull request as draft December 1, 2023 19:20
Base automatically changed from feat/abac to main December 1, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants