openfga / api

Protocol Buffers used by OpenFGA
Apache License 2.0
19 stars 14 forks source link

refactor: simplify tuple to userset proto object #26

Closed craigpastro closed 2 years ago

craigpastro commented 2 years ago

Description

Previously tupleset and computed_userset used the ObjectRelation object, but since neither of these use the object let's drop it. Also use the correct name "ComputerUserset" and "Tupleset" rather than the vague "ObjectRelation".

Also, since we are already here, rename a few things to be consistent with the Zanzibar paper.

References

Review Checklist

jon-whit commented 2 years ago

Let's do this, but we need to have a plan for the migration.

Today we use the binary wire format when we proto.Marshal the TypeDefinition and write it to the database. See https://github.com/openfga/openfga/blob/main/storage/postgres/postgres.go#L445

This will change that, and so we'll probably need to roll these out under a new protobuf package altogether (the beginnings of the new API spec) and then we can convert the old models to this new one.

craigpastro commented 2 years ago

Close in favour of #27.