nautobot / nautobot-app-firewall-models

Model Firewall policies in Nautobot

Home Page:https://docs.nautobot.com/projects/firewall-models/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add basic validation possibilities

Kircheneer opened this issue · comments

Environment

  • Nautobot version: 1.5.4
  • nautobot-plugin-firewall-model version: 1.1.3

Proposed Functionality

A way to validate that there is no duplication/shadowing going on in a given policy.

Use Case

Users can validate that their policy is built properly.

I had thought about this on netutils, but didn't get too far into thinking about how it would work.

Very simple possibility would be:

On PolicyRule.validate, check whether another PolicyRule with the exact same, directly firewalling-related fields (i.e. source/destination/protocol/etc., not request_id or similar) already exists within the same Policy and raise ValidationError if so.