Replies: 7 comments 1 reply
-
Hey @vhpoet ! This is actually a discussion a lot of us on the team have been navigating and exploring quite a bit over the last couple weeks. These are some of the scenarios we're evaluating:
These sorts of conversations that involve deployment and versioning and real world usage spark ideas about the fundamental architecture and user experience of OpenFGA, so we're trying to be thoughtful with how we proceed in evaluating different options before we prescribe solutions in our docs. For the example you mentioned,
I'd love to hear your feedback, and to hear about any alternative patterns you might be considering as well. |
Beta Was this translation helpful? Give feedback.
-
Below are some of my thoughts from the past few days. BackgroundTypes of migrations
Migration scenarios
Migration strategies for Blue/Green deployment
Ideal World
Proposed SolutionIntroduce tooling for migrations as part of OpenFGA sdks (inspired by knex).
|
Beta Was this translation helpful? Give feedback.
-
Hi @vhpoet Thanks for this! I like the idea of having migration scripts. It's a complex problem to solve. For example, if the script says "rename type from x to y", we'd need to:
Is not only a 'migration script' but also changing the behavior of the system while the migration is running (e.g. step 2). We'd need to define a language to express different changes in the DSL (e.g. split the I see this as something that will be built eventually. |
Beta Was this translation helpful? Give feedback.
-
ok this makes a lot of sense to me, thanks for the detailed responses @matthewpereira, @aaguiarz and @jon-whit. Do you have any rough timelines for introducing tools and changes to the system to make this possible? |
Beta Was this translation helpful? Give feedback.
-
Hi @vhpoet No, we don't have a timeline yet. |
Beta Was this translation helpful? Give feedback.
-
Hello @vhpoet , thank you for bringing the lack of documentation for migration to our attention. We have added documentations (https://openfga.dev/docs/modeling/migrating-relations) to describe the recommended steps for migrating models. |
Beta Was this translation helpful? Give feedback.
-
This is great, thanks @adriantam! Hope to get some tooling around this at some point too. |
Beta Was this translation helpful? Give feedback.
-
Do you have any best practices / examples documented somewhere for authorization model migrations? Say an object type or a relation has changed, one might need to migrate the tuples. There's multiple ways of doing this and I haven't found an elegant one yet. I'm not necessarily asking for a single solution, but wondering if this is something you'd be covering in the docs at some point?
Beta Was this translation helpful? Give feedback.
All reactions