Uninett / Argus

Argus is an alert aggregator for monitoring systems
GNU General Public License v3.0
18 stars 13 forks source link

Incident metadata validation #840

Open elfjes opened 3 months ago

elfjes commented 3 months ago

When posting Incident metadata to the Argus API, it would be nice if we can validate the incoming metadata to some schema. Currently we have a setup that works through middleware, but it's a bit hacky (https://github.com/GEANT/geant-argus/pull/4). It looks for requests that are POST/PATCH/PUT to the Incidents view and validates any incoming metadata. It would be more proper to have a way to hook into the IncidentViewSet directly through some pluggable validator api.

in talks with @hmpf this would consist of two things

hmpf commented 3 months ago

The default for vanilla argus is simply a function that verifies that the metadata field contains valid json.