@Charith (Cerbos)@Dennis (Cerbos) - random question... why are you not storing the policy definition as JSON in DB?
c
Charith (Cerbos)
11/05/2021, 6:00 PM
Internally we work exclusively with protobufs so it was naturally easier to serialize it in that form rather than going through JSON conversion back and forth. Also, different databases have different levels of support for JSON data types so it's rather painful to deal with that in a generic way as well.
j
Jack Archer
11/05/2021, 6:15 PM
fair enough
Jack Archer
11/05/2021, 6:15 PM
we're using postgres, and I think it might be a nice postgres configuration option to allow the user to opt into JSON storage
Jack Archer
11/05/2021, 6:17 PM
easy to serialize / deserialize JSON to proto
Jack Archer
11/05/2021, 6:18 PM
and while in theory I think you shouldnt be going into the DB to run random queries, it would be nice to be able to query a row and read the definition inline
Jack Archer
11/05/2021, 6:18 PM
just a random idea - feel free to disregard
c
Charith (Cerbos)
11/05/2021, 6:23 PM
Fair enough. We'll definitely consider it for a future release. Right now, it's not very practical for us to maintain different drivers for different databases. Also, the storage layer is still evolving so we want people to go through the API rather than through the the DB. Hyrum's law and all that :)