-
I am trying to use OpenFGA in a application where auditing is a secondary requirement. For example, we might have to answer questions like, did user:A have access to document:X at 12pm on 1/5/2023? If so, how did he get the access? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @velmohan - it's not something supported by the engine at run-time. As in you will not be able to ask the running server that and get the answer you expect. Whether we do introduce it in the future is an open question - we certainly have all the data needed to do so. But what you are asking is still possible, if you are willing to do some work. Before I get into that I will briefly explain the different components of OpenFGA:
For (A), you are able to query at runtime whether someone has access based on any model in your store. Each model is immutable, so it cannot be modified once created.
For (B), the tuples are not immutable, so as you delete tuples, they will be deleted from the store. We also store a historical append-only changelog table of all the tuple modifications. At runtime you can only evaluate access (Check) based on the relationship tuples and not on the changelog. What does all this mean to you? If you wish to check for access at a certain point in time, you need to:
|
Beta Was this translation helpful? Give feedback.
Hey @velmohan - it's not something supported by the engine at run-time. As in you will not be able to ask the running server that and get the answer you expect.
Whether we do introduce it in the future is an open question - we certainly have all the data needed to do so.
But what you are asking is still possible, if you are willing to do some work.
Before I get into that I will briefly explain the different components of OpenFGA:
For (A), you are able to query at runtime whether someone has access based on any model in your store. Each model is immutable, so it cannot be modified once created.
The intention behind immutable models isn't sp…