nautobot-app-firewall-models icon indicating copy to clipboard operation
nautobot-app-firewall-models copied to clipboard

Add basic validation possibilities

Open Kircheneer opened this issue 2 years ago • 2 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.

Kircheneer avatar Dec 09 '22 14:12 Kircheneer

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

itdependsnetworks avatar Dec 09 '22 18:12 itdependsnetworks

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.

Kircheneer avatar Dec 12 '22 14:12 Kircheneer