Add creation and last update dates to authorization models #159
Closed
geoffroybraun
started this conversation in
Ideas
Replies: 2 comments
-
Authorization Models in OpenFGA are immutable - so you cannot update them, just create new authorization models with new IDs. Re: date created, the authorization model id is a ulid which contains the date. For example, in JS you can use the ulid library to get the time:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
The CLI also provides an easy way to get the latest authorization model
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So far, only stores have both creation and last update dates. Unfortunatly, regarding authorization models, it is impossible to get a specific version without knowing its ID, as the
list authorization models
endpoint does not indicate how models are ordered before being retrieved.A successful but quite easy-to-implement solution would retrieve an authorization model creation date aside with its last update one, which could be the same date as the creation date if no update has been performed yet. That way, we could list authorization models and know which one is the latest.
Please let know if more explanations have to be provided, cheers!
Beta Was this translation helpful? Give feedback.
All reactions