geoserver / geofence

Advanced Authorization Manager for GeoServer
GNU General Public License v2.0
94 stars 55 forks source link

Add external id and name/description fields to Rule and AdminRule #244

Open groldan opened 1 year ago

groldan commented 1 year ago

I'd like to add an extId property to Rule and AdminRule, just like GSUser.extId.

Additional, it'd be nice to have name and/or description properties.

Use case is I've access rules defined in an external system that are converted to GeoFence rules. The external id would help identify which external system rule corresponds to each GeoFence rule, while currently I've to fetch them all, and use a SHA-family hash to determine which rules have changed.

The name/description fields are a secondary concern, but nice to have in order to visually correlate them in a human friendly way at GeoServer's rules web ui pages.

comments?

etj commented 1 year ago

+1 about the extId, it would improve integrations with external systems. The field in the users model was used exactly for that purpose.

I'm not sure about the description field tho: the Rule class is at the core of the engine and at the moment only contains fields for searching/filtering; adding a field for human interaction may add overhead and would probably be unneeded most of the time. Maybe adding a 1:1 object for extra info to be loaded from the DB on demand only would be a nicer place to put such info; that object could in the future grow to hold more informative fields not related to the filtering.