We have a requirement that geoserver allow or disallow insert/update/delete specifically (on certain layers) rather than just transactions in general. I’m studying the code and developing a plan to enhance geofence in this respect. We’re using an external geofence.
I can see that the RuleReaderService.getAccessInfo() is a key interface. In all likelihood the member will not receive info in the RuleFilter that tells it whether there are insert/update/delete requests in the transaction, since that would involve forward scanning all the XML to find (or not) such tags. I’m wondering if it would be appropriate to somehow potentially return an AccessInfo that for example says to the caller, “ALLOW, but only allow update (not insert/delete)”. Then in the downstream code that executes the transaction, that code would need to be modified to receive flags that tell it which operations (insert/update/delete) are permitted and throw exceptions if it finds any that are not.
There will be other details to manage such as the geofence GUI but this is what I’m thinking at a big picture level.
Any comments from developers with geofence background are appreciated. If I can reasonably manage it I’ll do this as a contribution to the genfence product rather than just my own custom code. I’m pretty new to geoserver and geofence and learning my way around the code.
Thanks, Walter Stovall
Byers Engineering Company