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

Support contextual tuples an assertion in OpenFGAClient #449

Open
1 task done
ewanharris opened this issue Nov 6, 2024 · 0 comments
Open
1 task done

Support contextual tuples an assertion in OpenFGAClient #449

ewanharris opened this issue Nov 6, 2024 · 0 comments
Labels
dotnet-sdk Affects the C#/DotNet SDK enhancement New feature or request go-sdk Affects the Go SDK java-sdk Affects the Java/Kotlin SDK js-sdk Affects the JavaScript SDK python-sdk Affects the Python SDK

Comments

@ewanharris
Copy link
Member

Checklist

Describe the problem you'd like to have solved

OpenFGA now supports adding contextual tuples to an assertion, in #448 we will be updating the OpenFGAApi to support this but will need to do some work to expose this in the OpenFGAClient.

Note that the request body for WriteAssertions treats contextual_tuples similar to ListUsers in that it is an array of tuple objects (as opposed to Check which accepts an object with a tuple_keys property).

Describe the ideal solution

The WriteAssertions and ReadAssertions endpoints are updated to support contextual_tuples.

As a rough plan of work:

  • Update the existing ClientAssertion type in each language to include contextual_tuples, it should be an array of ClientTuple`
  • Where necessary handle converting from ClientTuple to TupleKey (see how the SDK ListUsers method handles this)
  • Update any existing tests to include sending contextual_tuples
  • Ensure documentation is updated

Alternatives and current workarounds

No response

References

No response

Additional context

No response

@ewanharris ewanharris added the enhancement New feature or request label Nov 6, 2024
@ewanharris ewanharris added go-sdk Affects the Go SDK dotnet-sdk Affects the C#/DotNet SDK js-sdk Affects the JavaScript SDK python-sdk Affects the Python SDK java-sdk Affects the Java/Kotlin SDK labels Nov 6, 2024
@ewanharris ewanharris mentioned this issue Nov 6, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-sdk Affects the C#/DotNet SDK enhancement New feature or request go-sdk Affects the Go SDK java-sdk Affects the Java/Kotlin SDK js-sdk Affects the JavaScript SDK python-sdk Affects the Python SDK
Projects
Status: Backlog
Development

No branches or pull requests

1 participant