netbox-nsm 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- netbox_nsm-0.0.1/LICENSE +21 -0
- netbox_nsm-0.0.1/PKG-INFO +246 -0
- netbox_nsm-0.0.1/README.md +230 -0
- netbox_nsm-0.0.1/netbox_nsm/__init__.py +28 -0
- netbox_nsm-0.0.1/netbox_nsm/api/__init__.py +0 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers.py +5 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/__init__.py +0 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/nsm_object.py +39 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/nsm_object_type.py +37 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/nsm_object_type_field.py +44 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_custom_object.py +38 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_custom_object_assignment.py +56 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_custom_type.py +33 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_group.py +29 -0
- netbox_nsm-0.0.1/netbox_nsm/api/serializers_/security_zone_policy_rulebook.py +163 -0
- netbox_nsm-0.0.1/netbox_nsm/api/urls.py +29 -0
- netbox_nsm-0.0.1/netbox_nsm/api/views.py +85 -0
- netbox_nsm-0.0.1/netbox_nsm/apps.py +5 -0
- netbox_nsm-0.0.1/netbox_nsm/builtin_types.py +219 -0
- netbox_nsm-0.0.1/netbox_nsm/choices/__init__.py +25 -0
- netbox_nsm-0.0.1/netbox_nsm/choices/application_choices.py +30 -0
- netbox_nsm-0.0.1/netbox_nsm/choices/security_policy_choices.py +20 -0
- netbox_nsm-0.0.1/netbox_nsm/constants/__init__.py +29 -0
- netbox_nsm-0.0.1/netbox_nsm/constants/constants.py +69 -0
- netbox_nsm-0.0.1/netbox_nsm/fields/__init__.py +3 -0
- netbox_nsm-0.0.1/netbox_nsm/fields/choice_field.py +33 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/__init__.py +6 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/application_item.py +46 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/nsm_object_builder.py +63 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/object_custom_object.py +23 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/object_custom_object_assignment.py +21 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/object_custom_type.py +24 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/object_group.py +22 -0
- netbox_nsm-0.0.1/netbox_nsm/filtersets/security_zone_policy_rulebook.py +123 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/__init__.py +6 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/nsm_object_builder.py +252 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/object_custom_object.py +273 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/object_custom_object_assignment.py +64 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/object_custom_type.py +130 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/object_group.py +92 -0
- netbox_nsm-0.0.1/netbox_nsm/forms/security_zone_policy_rulebook.py +302 -0
- netbox_nsm-0.0.1/netbox_nsm/graphql/__init__.py +1 -0
- netbox_nsm-0.0.1/netbox_nsm/graphql/enums.py +18 -0
- netbox_nsm-0.0.1/netbox_nsm/graphql/filter_lookups.py +24 -0
- netbox_nsm-0.0.1/netbox_nsm/graphql/filters/__init__.py +1 -0
- netbox_nsm-0.0.1/netbox_nsm/graphql/types.py +9 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0001_initial.py +1432 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0002_rename_filter_firewallfilterrule_firewall_filter.py +18 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0003_rename_actions_securityzonepolicy_policy_actions.py +18 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0004_alter_natrule_custom_interface.py +20 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0005_policer.py +108 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0006_alter_natpoolassignment_assigned_object_type_and_more.py +45 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0007_policerassignment.py +89 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0008_alter_address_options_rename_value_address_address_and_more.py +217 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0009_alter_address_options_alter_address_unique_together_and_more.py +41 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0010_applicationitem_application_applicationset_and_more.py +360 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0011_remove_securityzonepolicy_application_and_more.py +35 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0012_remove_application_destination_port_and_more.py +488 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0013_address_identifier_addressset_identifier_and_more.py +43 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0014_addressset_address_sets.py +20 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0015_alter_address_unique_together_and_more.py +38 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0016_alter_application_application_items_and_more.py +31 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0017_applicationset_application_sets.py +22 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0018_alter_address_unique_together.py +17 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0019_alter_natpool_options_alter_natrule_options_and_more.py +25 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0020_alter_addressassignment_options_and_more.py +64 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0021_address_owner_addressset_owner_application_owner_and_more.py +165 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0022_natpoolmember_comments_natpoolmember_description_and_more.py +38 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0023_alter_securityzoneassignment_assigned_object_type.py +39 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0024_address_assigned_object_id_and_more.py +108 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0025_route_address_fields_to_gfk.py +67 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0026_alter_address_options_remove_address_address_and_more.py +71 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0027_alter_addressassignment_assigned_object_type_and_more.py +167 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0028_alter_customprefix_options.py +23 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0029_securityzonerole_and_zone_role_fk.py +72 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0030_securityzonerole_owner.py +25 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0031_securityzonematrix_and_policy_models.py +198 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0032_security_zone_policy_rulebook.py +274 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0033_securitypolicy_add_roles.py +21 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0034_securityzone_roles_m2m.py +42 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0035_securityzonepolicy_zones_m2m.py +182 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0036_objects_menu_models.py +270 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0037_migrate_address_sets_to_object_groups.py +101 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0038_application_profile_fields.py +46 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0039_remove_application_saas.py +15 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0040_objectlabel_single_type.py +127 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0041_securityzone_color.py +16 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0042_objectuser_name_dn.py +101 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0043_nsm_object_builder.py +118 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0044_seed_builder_object_types.py +244 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0045_nsm_object_instances.py +216 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0046_objectgroup_nested_groups.py +35 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0047_objectgroup_group_member_type.py +42 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0048_security_rule_fields_srcdst_manipulators.py +90 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0049_objectaction_and_rule_action_objects.py +86 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0050_objectlog.py +44 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0051_alter_objectaction_action.py +54 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0052_object_assignment_models.py +348 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0053_objectcustomtype.py +43 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0054_objectcustomtype_owner.py +23 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0055_objectcustomtype_area_fields.py +29 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0056_objectcustomobject.py +65 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0057_policyrule_custom_objects.py +41 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0058_objectnat_objectinterface.py +159 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0059_objectcomment_objectinstalledon.py +91 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0060_objectfilter_objectpolicer.py +110 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0061_policyrule_new_objects.py +65 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0062_policyrule_info_objects.py +31 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0063_objectcustomobjectassignment.py +99 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0064_objectcustomtype_icon.py +21 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0065_objectcustomobjectassignment_comment.py +16 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0066_remove_securityzone_policy_and_matrix.py +16 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0067_remove_nat_and_policer.py +17 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0068_remove_firewall_filter_object_label_sgt_user_log.py +23 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0069_remove_assignment_models_and_securityzonerole.py +39 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0070_remove_policyrulebook_roles.py +15 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0071_remove_address_models.py +35 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0072_remove_legacy_object_models.py +56 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0073_add_object_group.py +100 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0074_security_rule_groups.py +61 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0075_display_template_and_rulebook_comment.py +37 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0076_labels_type_choice_field.py +33 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0077_labels_type_flexible_text.py +38 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0078_remove_application_applicationset.py +36 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0079_remove_securityzone_applicationitem.py +48 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/0080_remove_matrix_rulebook_type.py +20 -0
- netbox_nsm-0.0.1/netbox_nsm/migrations/__init__.py +0 -0
- netbox_nsm-0.0.1/netbox_nsm/mixins/__init__.py +9 -0
- netbox_nsm-0.0.1/netbox_nsm/mixins/assignment_filterset.py +82 -0
- netbox_nsm-0.0.1/netbox_nsm/mixins/ports.py +82 -0
- netbox_nsm-0.0.1/netbox_nsm/models/__init__.py +6 -0
- netbox_nsm-0.0.1/netbox_nsm/models/nsm_object_builder.py +272 -0
- netbox_nsm-0.0.1/netbox_nsm/models/object_custom_object.py +79 -0
- netbox_nsm-0.0.1/netbox_nsm/models/object_custom_object_assignment.py +59 -0
- netbox_nsm-0.0.1/netbox_nsm/models/object_custom_type.py +71 -0
- netbox_nsm-0.0.1/netbox_nsm/models/object_group.py +58 -0
- netbox_nsm-0.0.1/netbox_nsm/models/security_zone_policy_rulebook.py +218 -0
- netbox_nsm-0.0.1/netbox_nsm/navigation.py +67 -0
- netbox_nsm-0.0.1/netbox_nsm/serializers/__init__.py +0 -0
- netbox_nsm-0.0.1/netbox_nsm/serializers/yaml_bundle.py +364 -0
- netbox_nsm-0.0.1/netbox_nsm/signals/__init__.py +0 -0
- netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/nsm_visible_when.js +72 -0
- netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/object_group_form.js +152 -0
- netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/object_label_form.js +52 -0
- netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/security_rule_form.js +381 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/__init__.py +5 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/mixins.py +34 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/nsm_object_builder.py +88 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/object_custom_object.py +54 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/object_custom_type.py +18 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/object_group.py +50 -0
- netbox_nsm-0.0.1/netbox_nsm/tables/security_zone_policy_rulebook.py +295 -0
- netbox_nsm-0.0.1/netbox_nsm/template_content.py +317 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/address/extend.html +19 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/address.html +133 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/addressset/extend.html +19 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/addressset.html +130 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/assigned_objects.html +4 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/builtin_type_install.html +98 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/customprefix.html +46 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/device/security.html +6 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/device_matching_rules.html +188 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/dynamic_object_catalog.html +52 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/firewallfilter.html +97 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/firewallfilterrule.html +43 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/global_rules_search.html +135 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/assigned_objects_tab.html +6 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/nsm_security_links.html +122 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/security_tab.html +80 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/settings.html +26 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/interface/addresslist.html +38 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/interface/interface_extend.html +48 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/ipaddress/security.html +62 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/iprange/nsm_groups.html +62 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/iprange/security.html +164 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natpool.html +84 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natpool_members.html +22 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natpoolmember.html +73 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natrule.html +173 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natruleset.html +104 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natruleset_rules.html +23 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/nsmobject.html +62 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/nsmobjecttype.html +45 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/object_builder.html +37 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/object_custom_area.html +76 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/object_tabs.html +108 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectaction.html +23 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcomment.html +37 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustom.html +88 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustom_assignments.html +41 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustomobject.html +1 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustomtype.html +86 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectfilter.html +55 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup.html +114 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup_area.html +43 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup_assignments.html +39 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup_list.html +22 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectinstalledon.html +32 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectinterface.html +40 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectlabel.html +31 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectlabel_edit.html +7 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectlog.html +23 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectnat.html +58 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectpolicer.html +36 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectsgt.html +24 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectuser.html +24 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/policer.html +111 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/prefix/security.html +62 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/security_zone_role.html +46 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicy.html +89 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrule.html +143 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrule_edit.html +211 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook.html +44 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook_bulk_assign.html +35 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook_security_policy.html +286 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook_visualization.html +491 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/virtual_device_context/security.html +6 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/virtualmachine/security.html +6 -0
- netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/yaml_bundle_import.html +124 -0
- netbox_nsm-0.0.1/netbox_nsm/templatetags/object_type.py +17 -0
- netbox_nsm-0.0.1/netbox_nsm/urls.py +99 -0
- netbox_nsm-0.0.1/netbox_nsm/utilities/__init__.py +121 -0
- netbox_nsm-0.0.1/netbox_nsm/validators/__init__.py +3 -0
- netbox_nsm-0.0.1/netbox_nsm/validators/fqdn.py +15 -0
- netbox_nsm-0.0.1/netbox_nsm/version.py +1 -0
- netbox_nsm-0.0.1/netbox_nsm/views/__init__.py +9 -0
- netbox_nsm-0.0.1/netbox_nsm/views/device_security.py +250 -0
- netbox_nsm-0.0.1/netbox_nsm/views/ipam_security_tabs.py +113 -0
- netbox_nsm-0.0.1/netbox_nsm/views/nsm_object_builder.py +172 -0
- netbox_nsm-0.0.1/netbox_nsm/views/object_custom_object.py +159 -0
- netbox_nsm-0.0.1/netbox_nsm/views/object_custom_type.py +120 -0
- netbox_nsm-0.0.1/netbox_nsm/views/object_group.py +146 -0
- netbox_nsm-0.0.1/netbox_nsm/views/object_tabs.py +305 -0
- netbox_nsm-0.0.1/netbox_nsm/views/security_zone_policy_rulebook.py +994 -0
- netbox_nsm-0.0.1/netbox_nsm/views/yaml_bundle.py +99 -0
- netbox_nsm-0.0.1/netbox_nsm.egg-info/PKG-INFO +246 -0
- netbox_nsm-0.0.1/netbox_nsm.egg-info/SOURCES.txt +239 -0
- netbox_nsm-0.0.1/netbox_nsm.egg-info/dependency_links.txt +1 -0
- netbox_nsm-0.0.1/netbox_nsm.egg-info/top_level.txt +3 -0
- netbox_nsm-0.0.1/pyproject.toml +32 -0
- netbox_nsm-0.0.1/setup.cfg +4 -0
netbox_nsm-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Andy Wilson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: netbox-nsm
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A NetBox plugin for network security management, including object groups and security policies
|
|
5
|
+
Author: Christian Burmeister
|
|
6
|
+
Project-URL: Homepage, https://github.com/christianbur/netbox-nsm
|
|
7
|
+
Project-URL: Documentation, https://github.com/christianbur/netbox-nsm/blob/main/README.md
|
|
8
|
+
Project-URL: Repository, https://github.com/christianbur/netbox-nsm
|
|
9
|
+
Project-URL: Issues, https://github.com/christianbur/netbox-nsm/issues
|
|
10
|
+
Keywords: netbox,netbox-plugin,security
|
|
11
|
+
Classifier: Development Status :: 3 - Alpha
|
|
12
|
+
Requires-Python: >=3.12
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Dynamic: license-file
|
|
16
|
+
|
|
17
|
+
# netbox-nsm — Network Security Management Plugin for NetBox
|
|
18
|
+
|
|
19
|
+
> **⚠️ Work in Progress — do not use in production.**
|
|
20
|
+
|
|
21
|
+
A [NetBox](https://github.com/netbox-community/netbox) plugin for managing network security objects, security policies, and object groups.
|
|
22
|
+
|
|
23
|
+
This plugin was inspired by [netbox-security](https://github.com/andy-shady-org/netbox-security) by andy-shady-org. After working with it, I decided to write a new plugin from scratch that better fits my workflow and requirements.
|
|
24
|
+
|
|
25
|
+
The goal is a **modular, vendor-agnostic plugin** that can be used with any kind of firewall or policy system — including traditional firewalls, Cisco TrustSec, and label-based micro-segmentation platforms such as Illumio. Instead of hard-coding object types, the plugin lets you define your own types and fields to match whatever your environment requires.
|
|
26
|
+
|
|
27
|
+
This plugin was developed using my own hands-on experience in network security, combined with ideas and concepts shaped with the help of AI.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
### Custom Object Types
|
|
34
|
+
Define your own object types with configurable fields — for example **Addresses**, **Networks**, **Services**, **NAT-Pools**, or anything your network requires.
|
|
35
|
+
|
|
36
|
+
- **Area-based classification**: each type belongs to one of four areas:
|
|
37
|
+
- `Source/Destination` — objects used as traffic sources or destinations
|
|
38
|
+
- `Services` — port/protocol definitions and similar
|
|
39
|
+
- `Action` — actions applied to matching traffic (permit, deny, log, policer …)
|
|
40
|
+
- `Info` — informational objects attached to rules (install dates, comments …)
|
|
41
|
+
- **Configurable field definitions**: JSON list of typed fields per type (`text`, `number`, `boolean`, `url`, `date`, `markdown`, `object_ref`, `multi_object_ref`)
|
|
42
|
+
- **Display template**: format string (`{name} ({port}/{protocol})`) that controls how instances are displayed throughout the UI
|
|
43
|
+
- **MDI icon**: assign an icon from [pictogrammers.com](https://pictogrammers.com/library/mdi/)
|
|
44
|
+
- **Built-in type catalog**: a set of ready-made types (Action, Filter, Log, Policer, Comment, InstalledOn, InstallDate, …) that can be installed with one click
|
|
45
|
+
|
|
46
|
+
### Custom Objects
|
|
47
|
+
Instances of a Custom Type — the actual objects referenced in security rules.
|
|
48
|
+
|
|
49
|
+
- Dynamic form fields generated from the type's field definitions
|
|
50
|
+
- Optional `object_ref` fields that link to any NetBox model (IP prefix, device, …)
|
|
51
|
+
- Optional key/value table (`table_data`) for arbitrary extra metadata
|
|
52
|
+
- Comments field with template variable substitution (`{name}`, field data keys)
|
|
53
|
+
- Full CRUD, bulk-edit, bulk-delete, bulk-import via CSV
|
|
54
|
+
- REST API with filterable endpoint (`/api/plugins/netbox-nsm/object-custom-objects/`)
|
|
55
|
+
|
|
56
|
+
### Custom Object Assignments
|
|
57
|
+
Assign any Custom Object to any NetBox object (Device, VM, Interface, IP Address, Prefix, …).
|
|
58
|
+
|
|
59
|
+
- Generic foreign key — no model restrictions
|
|
60
|
+
- Comment field per assignment
|
|
61
|
+
- Assignment list tab on every Custom Object detail page
|
|
62
|
+
|
|
63
|
+
### Object Groups
|
|
64
|
+
Named groups that aggregate Custom Objects and/or other groups of the same area.
|
|
65
|
+
|
|
66
|
+
- Supports nested sub-groups (arbitrary depth)
|
|
67
|
+
- Area validation: only objects/groups of the same area can be combined
|
|
68
|
+
- Parent-group back-reference shown in group detail view
|
|
69
|
+
- Used directly in security rules as `source_groups`, `destination_groups`, etc.
|
|
70
|
+
|
|
71
|
+
### Security Policies (Rulebooks)
|
|
72
|
+
Named policy containers holding an ordered list of security rules.
|
|
73
|
+
|
|
74
|
+
- `rulebook_type` choice field (currently: *Security Rules*)
|
|
75
|
+
- **Rule comment template**: Markdown template pre-filled when adding new rules (`{rule_name}`, `{index}`, `{rulebook}`)
|
|
76
|
+
- Assign policies to **Devices**, **Virtual Machines**, and **Virtual Device Contexts** via Rulebook Assignments
|
|
77
|
+
- Bulk-assign a policy to multiple devices at once
|
|
78
|
+
- Policy visualization view (rule table with source / destination / service / action columns rendered as linked pill badges)
|
|
79
|
+
|
|
80
|
+
### Security Rules
|
|
81
|
+
Individual firewall/security rules inside a policy.
|
|
82
|
+
|
|
83
|
+
| Field | Description |
|
|
84
|
+
|---|---|
|
|
85
|
+
| `index` | Rule order (numeric) |
|
|
86
|
+
| `enabled` | Enable / disable the rule |
|
|
87
|
+
| `name` | Unique name within the rulebook |
|
|
88
|
+
| `policy_action` | `permit` / `deny` / `log` / `count` / `reject` |
|
|
89
|
+
| `custom_srcdst_objects` | Source custom objects (area: srcdst) |
|
|
90
|
+
| `source_groups` | Source object groups (area: srcdst) |
|
|
91
|
+
| `destination_custom_objects` | Destination custom objects (area: srcdst) |
|
|
92
|
+
| `destination_groups` | Destination object groups (area: srcdst) |
|
|
93
|
+
| `custom_service_objects` | Service custom objects (area: services) |
|
|
94
|
+
| `service_groups` | Service object groups (area: services) |
|
|
95
|
+
| `custom_action_objects` | Action custom objects (area: action) |
|
|
96
|
+
| `action_groups` | Action object groups (area: action) |
|
|
97
|
+
| `source_users` / `destination_users` | NetBox user references |
|
|
98
|
+
| `log_enabled` | Enable logging |
|
|
99
|
+
|
|
100
|
+
Rule edit form groups fields into **Source / Destination / Service / Action** sections with a live type/value table showing currently selected objects.
|
|
101
|
+
|
|
102
|
+
### YAML Bundle Export / Import
|
|
103
|
+
Transfer Custom Types and their objects between NetBox instances.
|
|
104
|
+
|
|
105
|
+
- **Export**: select one or more Custom Types → download a `.yaml` bundle file
|
|
106
|
+
- **Import**: paste YAML or upload a file, with optional update-existing mode
|
|
107
|
+
- `object_ref` fields are serialized as `{__model: …, __str: …}` and resolved on import via natural keys
|
|
108
|
+
- Bundle format: `apiVersion: nsm/v1`, `kind: Bundle/CustomType/CustomObject`
|
|
109
|
+
|
|
110
|
+
### Device / VM Matching Rules
|
|
111
|
+
Find all security rules that reference the labels (Custom Object Assignments) of a specific device or VM.
|
|
112
|
+
|
|
113
|
+
- Accessible from the device/VM detail page
|
|
114
|
+
- Separate result tables for rules where the device appears as source vs. destination
|
|
115
|
+
|
|
116
|
+
### Security Tab on IPAM Objects
|
|
117
|
+
A **Security** tab is added to IP Address, Prefix, and IP Range detail pages showing every Object Group chain that references the object — including inherited matches via containing prefixes for IP addresses.
|
|
118
|
+
|
|
119
|
+
### NSM Object Builder *(advanced)*
|
|
120
|
+
A second, more flexible object type system (`NsmObjectType` / `NsmObjectTypeField` / `NsmObject`) for scenarios that require strongly-typed, validated fields with weights and grouping.
|
|
121
|
+
|
|
122
|
+
### REST API
|
|
123
|
+
All models are fully accessible via NetBox's REST API framework:
|
|
124
|
+
|
|
125
|
+
| Endpoint | Model |
|
|
126
|
+
|---|---|
|
|
127
|
+
| `/api/plugins/netbox-nsm/object-custom-types/` | ObjectCustomType |
|
|
128
|
+
| `/api/plugins/netbox-nsm/object-custom-objects/` | ObjectCustomObject |
|
|
129
|
+
| `/api/plugins/netbox-nsm/object-custom-object-assignments/` | ObjectCustomObjectAssignment |
|
|
130
|
+
| `/api/plugins/netbox-nsm/object-groups/` | ObjectGroup |
|
|
131
|
+
| `/api/plugins/netbox-nsm/security-zone-policy-rulebooks/` | SecurityZonePolicyRulebook |
|
|
132
|
+
| `/api/plugins/netbox-nsm/security-zone-policy-rules/` | SecurityZonePolicyRule |
|
|
133
|
+
| `/api/plugins/netbox-nsm/security-zone-policy-rulebook-assignments/` | SecurityZonePolicyRulebookAssignment |
|
|
134
|
+
|
|
135
|
+
All endpoints support filtering, searching, and pagination.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Compatibility
|
|
140
|
+
|
|
141
|
+
| NetBox Version | Plugin Version |
|
|
142
|
+
|---|---|
|
|
143
|
+
| 4.5.x | 0.0.1 |
|
|
144
|
+
| 4.6.x | 0.0.1 |
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Installation
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
pip install netbox-nsm
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Enable the plugin in your NetBox `configuration.py`:
|
|
155
|
+
|
|
156
|
+
```python
|
|
157
|
+
PLUGINS = ["netbox_nsm"]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Run database migrations:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
cd /opt/netbox
|
|
164
|
+
source venv/bin/activate
|
|
165
|
+
python netbox/manage.py migrate netbox_nsm
|
|
166
|
+
python netbox/manage.py reindex netbox_nsm
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Restart NetBox (gunicorn / uwsgi).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Configuration
|
|
174
|
+
|
|
175
|
+
Add plugin settings in `configuration.py` (all optional):
|
|
176
|
+
|
|
177
|
+
```python
|
|
178
|
+
PLUGINS_CONFIG = {
|
|
179
|
+
"netbox_nsm": {
|
|
180
|
+
# Show plugin menu as top-level entry (default: True)
|
|
181
|
+
"top_level_menu": True,
|
|
182
|
+
|
|
183
|
+
# Show assignments sub-menu item (default: False)
|
|
184
|
+
"assignments_menu": False,
|
|
185
|
+
|
|
186
|
+
# Position of the NSM panel on Virtual Machine detail pages
|
|
187
|
+
# Options: "left", "right", "full_width", "" (disabled)
|
|
188
|
+
"virtual_ext_page": "left",
|
|
189
|
+
|
|
190
|
+
# Position of the NSM panel on Interface detail pages
|
|
191
|
+
"interface_ext_page": "full_width",
|
|
192
|
+
|
|
193
|
+
# Position of the NSM panel on IP Address/Prefix detail pages
|
|
194
|
+
"address_ext_page": "right",
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
## Screenshots
|
|
202
|
+
|
|
203
|
+
### Navigation & Object Management
|
|
204
|
+

|
|
205
|
+

|
|
206
|
+

|
|
207
|
+

|
|
208
|
+

|
|
209
|
+
|
|
210
|
+
### Object Groups
|
|
211
|
+

|
|
212
|
+

|
|
213
|
+
|
|
214
|
+
### Built-in Types & YAML Bundle
|
|
215
|
+

|
|
216
|
+

|
|
217
|
+
|
|
218
|
+
### Security Policies
|
|
219
|
+

|
|
220
|
+

|
|
221
|
+

|
|
222
|
+
|
|
223
|
+
### Object Assignments & Device Integration
|
|
224
|
+

|
|
225
|
+

|
|
226
|
+
|
|
227
|
+
### Security on IPAM Objects
|
|
228
|
+

|
|
229
|
+

|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Quick Start
|
|
234
|
+
|
|
235
|
+
1. **Install built-in types** — go to *Security → Objects → Object-Builder → Install Defaults* and select the types you need (Addresses, Networks, Ports, …).
|
|
236
|
+
2. **Create custom objects** — navigate to the matching area tab (Source/Destination, Services, Action) and add objects.
|
|
237
|
+
3. **Create object groups** *(optional)* — group related objects under *Security → Objects → Groups*.
|
|
238
|
+
4. **Create a Security Policy** — under *Security → Security Policy*.
|
|
239
|
+
5. **Add rules** — open the policy and add rules, selecting objects and groups for each column.
|
|
240
|
+
6. **Assign the policy to a device** — open a Device and use the *Assign Rulebook* action, or use the bulk-assign view on the policy.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## License
|
|
245
|
+
|
|
246
|
+
[Apache 2.0](LICENSE)
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# netbox-nsm — Network Security Management Plugin for NetBox
|
|
2
|
+
|
|
3
|
+
> **⚠️ Work in Progress — do not use in production.**
|
|
4
|
+
|
|
5
|
+
A [NetBox](https://github.com/netbox-community/netbox) plugin for managing network security objects, security policies, and object groups.
|
|
6
|
+
|
|
7
|
+
This plugin was inspired by [netbox-security](https://github.com/andy-shady-org/netbox-security) by andy-shady-org. After working with it, I decided to write a new plugin from scratch that better fits my workflow and requirements.
|
|
8
|
+
|
|
9
|
+
The goal is a **modular, vendor-agnostic plugin** that can be used with any kind of firewall or policy system — including traditional firewalls, Cisco TrustSec, and label-based micro-segmentation platforms such as Illumio. Instead of hard-coding object types, the plugin lets you define your own types and fields to match whatever your environment requires.
|
|
10
|
+
|
|
11
|
+
This plugin was developed using my own hands-on experience in network security, combined with ideas and concepts shaped with the help of AI.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Features
|
|
16
|
+
|
|
17
|
+
### Custom Object Types
|
|
18
|
+
Define your own object types with configurable fields — for example **Addresses**, **Networks**, **Services**, **NAT-Pools**, or anything your network requires.
|
|
19
|
+
|
|
20
|
+
- **Area-based classification**: each type belongs to one of four areas:
|
|
21
|
+
- `Source/Destination` — objects used as traffic sources or destinations
|
|
22
|
+
- `Services` — port/protocol definitions and similar
|
|
23
|
+
- `Action` — actions applied to matching traffic (permit, deny, log, policer …)
|
|
24
|
+
- `Info` — informational objects attached to rules (install dates, comments …)
|
|
25
|
+
- **Configurable field definitions**: JSON list of typed fields per type (`text`, `number`, `boolean`, `url`, `date`, `markdown`, `object_ref`, `multi_object_ref`)
|
|
26
|
+
- **Display template**: format string (`{name} ({port}/{protocol})`) that controls how instances are displayed throughout the UI
|
|
27
|
+
- **MDI icon**: assign an icon from [pictogrammers.com](https://pictogrammers.com/library/mdi/)
|
|
28
|
+
- **Built-in type catalog**: a set of ready-made types (Action, Filter, Log, Policer, Comment, InstalledOn, InstallDate, …) that can be installed with one click
|
|
29
|
+
|
|
30
|
+
### Custom Objects
|
|
31
|
+
Instances of a Custom Type — the actual objects referenced in security rules.
|
|
32
|
+
|
|
33
|
+
- Dynamic form fields generated from the type's field definitions
|
|
34
|
+
- Optional `object_ref` fields that link to any NetBox model (IP prefix, device, …)
|
|
35
|
+
- Optional key/value table (`table_data`) for arbitrary extra metadata
|
|
36
|
+
- Comments field with template variable substitution (`{name}`, field data keys)
|
|
37
|
+
- Full CRUD, bulk-edit, bulk-delete, bulk-import via CSV
|
|
38
|
+
- REST API with filterable endpoint (`/api/plugins/netbox-nsm/object-custom-objects/`)
|
|
39
|
+
|
|
40
|
+
### Custom Object Assignments
|
|
41
|
+
Assign any Custom Object to any NetBox object (Device, VM, Interface, IP Address, Prefix, …).
|
|
42
|
+
|
|
43
|
+
- Generic foreign key — no model restrictions
|
|
44
|
+
- Comment field per assignment
|
|
45
|
+
- Assignment list tab on every Custom Object detail page
|
|
46
|
+
|
|
47
|
+
### Object Groups
|
|
48
|
+
Named groups that aggregate Custom Objects and/or other groups of the same area.
|
|
49
|
+
|
|
50
|
+
- Supports nested sub-groups (arbitrary depth)
|
|
51
|
+
- Area validation: only objects/groups of the same area can be combined
|
|
52
|
+
- Parent-group back-reference shown in group detail view
|
|
53
|
+
- Used directly in security rules as `source_groups`, `destination_groups`, etc.
|
|
54
|
+
|
|
55
|
+
### Security Policies (Rulebooks)
|
|
56
|
+
Named policy containers holding an ordered list of security rules.
|
|
57
|
+
|
|
58
|
+
- `rulebook_type` choice field (currently: *Security Rules*)
|
|
59
|
+
- **Rule comment template**: Markdown template pre-filled when adding new rules (`{rule_name}`, `{index}`, `{rulebook}`)
|
|
60
|
+
- Assign policies to **Devices**, **Virtual Machines**, and **Virtual Device Contexts** via Rulebook Assignments
|
|
61
|
+
- Bulk-assign a policy to multiple devices at once
|
|
62
|
+
- Policy visualization view (rule table with source / destination / service / action columns rendered as linked pill badges)
|
|
63
|
+
|
|
64
|
+
### Security Rules
|
|
65
|
+
Individual firewall/security rules inside a policy.
|
|
66
|
+
|
|
67
|
+
| Field | Description |
|
|
68
|
+
|---|---|
|
|
69
|
+
| `index` | Rule order (numeric) |
|
|
70
|
+
| `enabled` | Enable / disable the rule |
|
|
71
|
+
| `name` | Unique name within the rulebook |
|
|
72
|
+
| `policy_action` | `permit` / `deny` / `log` / `count` / `reject` |
|
|
73
|
+
| `custom_srcdst_objects` | Source custom objects (area: srcdst) |
|
|
74
|
+
| `source_groups` | Source object groups (area: srcdst) |
|
|
75
|
+
| `destination_custom_objects` | Destination custom objects (area: srcdst) |
|
|
76
|
+
| `destination_groups` | Destination object groups (area: srcdst) |
|
|
77
|
+
| `custom_service_objects` | Service custom objects (area: services) |
|
|
78
|
+
| `service_groups` | Service object groups (area: services) |
|
|
79
|
+
| `custom_action_objects` | Action custom objects (area: action) |
|
|
80
|
+
| `action_groups` | Action object groups (area: action) |
|
|
81
|
+
| `source_users` / `destination_users` | NetBox user references |
|
|
82
|
+
| `log_enabled` | Enable logging |
|
|
83
|
+
|
|
84
|
+
Rule edit form groups fields into **Source / Destination / Service / Action** sections with a live type/value table showing currently selected objects.
|
|
85
|
+
|
|
86
|
+
### YAML Bundle Export / Import
|
|
87
|
+
Transfer Custom Types and their objects between NetBox instances.
|
|
88
|
+
|
|
89
|
+
- **Export**: select one or more Custom Types → download a `.yaml` bundle file
|
|
90
|
+
- **Import**: paste YAML or upload a file, with optional update-existing mode
|
|
91
|
+
- `object_ref` fields are serialized as `{__model: …, __str: …}` and resolved on import via natural keys
|
|
92
|
+
- Bundle format: `apiVersion: nsm/v1`, `kind: Bundle/CustomType/CustomObject`
|
|
93
|
+
|
|
94
|
+
### Device / VM Matching Rules
|
|
95
|
+
Find all security rules that reference the labels (Custom Object Assignments) of a specific device or VM.
|
|
96
|
+
|
|
97
|
+
- Accessible from the device/VM detail page
|
|
98
|
+
- Separate result tables for rules where the device appears as source vs. destination
|
|
99
|
+
|
|
100
|
+
### Security Tab on IPAM Objects
|
|
101
|
+
A **Security** tab is added to IP Address, Prefix, and IP Range detail pages showing every Object Group chain that references the object — including inherited matches via containing prefixes for IP addresses.
|
|
102
|
+
|
|
103
|
+
### NSM Object Builder *(advanced)*
|
|
104
|
+
A second, more flexible object type system (`NsmObjectType` / `NsmObjectTypeField` / `NsmObject`) for scenarios that require strongly-typed, validated fields with weights and grouping.
|
|
105
|
+
|
|
106
|
+
### REST API
|
|
107
|
+
All models are fully accessible via NetBox's REST API framework:
|
|
108
|
+
|
|
109
|
+
| Endpoint | Model |
|
|
110
|
+
|---|---|
|
|
111
|
+
| `/api/plugins/netbox-nsm/object-custom-types/` | ObjectCustomType |
|
|
112
|
+
| `/api/plugins/netbox-nsm/object-custom-objects/` | ObjectCustomObject |
|
|
113
|
+
| `/api/plugins/netbox-nsm/object-custom-object-assignments/` | ObjectCustomObjectAssignment |
|
|
114
|
+
| `/api/plugins/netbox-nsm/object-groups/` | ObjectGroup |
|
|
115
|
+
| `/api/plugins/netbox-nsm/security-zone-policy-rulebooks/` | SecurityZonePolicyRulebook |
|
|
116
|
+
| `/api/plugins/netbox-nsm/security-zone-policy-rules/` | SecurityZonePolicyRule |
|
|
117
|
+
| `/api/plugins/netbox-nsm/security-zone-policy-rulebook-assignments/` | SecurityZonePolicyRulebookAssignment |
|
|
118
|
+
|
|
119
|
+
All endpoints support filtering, searching, and pagination.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## Compatibility
|
|
124
|
+
|
|
125
|
+
| NetBox Version | Plugin Version |
|
|
126
|
+
|---|---|
|
|
127
|
+
| 4.5.x | 0.0.1 |
|
|
128
|
+
| 4.6.x | 0.0.1 |
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Installation
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pip install netbox-nsm
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Enable the plugin in your NetBox `configuration.py`:
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
PLUGINS = ["netbox_nsm"]
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Run database migrations:
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
cd /opt/netbox
|
|
148
|
+
source venv/bin/activate
|
|
149
|
+
python netbox/manage.py migrate netbox_nsm
|
|
150
|
+
python netbox/manage.py reindex netbox_nsm
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
Restart NetBox (gunicorn / uwsgi).
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
## Configuration
|
|
158
|
+
|
|
159
|
+
Add plugin settings in `configuration.py` (all optional):
|
|
160
|
+
|
|
161
|
+
```python
|
|
162
|
+
PLUGINS_CONFIG = {
|
|
163
|
+
"netbox_nsm": {
|
|
164
|
+
# Show plugin menu as top-level entry (default: True)
|
|
165
|
+
"top_level_menu": True,
|
|
166
|
+
|
|
167
|
+
# Show assignments sub-menu item (default: False)
|
|
168
|
+
"assignments_menu": False,
|
|
169
|
+
|
|
170
|
+
# Position of the NSM panel on Virtual Machine detail pages
|
|
171
|
+
# Options: "left", "right", "full_width", "" (disabled)
|
|
172
|
+
"virtual_ext_page": "left",
|
|
173
|
+
|
|
174
|
+
# Position of the NSM panel on Interface detail pages
|
|
175
|
+
"interface_ext_page": "full_width",
|
|
176
|
+
|
|
177
|
+
# Position of the NSM panel on IP Address/Prefix detail pages
|
|
178
|
+
"address_ext_page": "right",
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Screenshots
|
|
186
|
+
|
|
187
|
+
### Navigation & Object Management
|
|
188
|
+

|
|
189
|
+

|
|
190
|
+

|
|
191
|
+

|
|
192
|
+

|
|
193
|
+
|
|
194
|
+
### Object Groups
|
|
195
|
+

|
|
196
|
+

|
|
197
|
+
|
|
198
|
+
### Built-in Types & YAML Bundle
|
|
199
|
+

|
|
200
|
+

|
|
201
|
+
|
|
202
|
+
### Security Policies
|
|
203
|
+

|
|
204
|
+

|
|
205
|
+

|
|
206
|
+
|
|
207
|
+
### Object Assignments & Device Integration
|
|
208
|
+

|
|
209
|
+

|
|
210
|
+
|
|
211
|
+
### Security on IPAM Objects
|
|
212
|
+

|
|
213
|
+

|
|
214
|
+
|
|
215
|
+
---
|
|
216
|
+
|
|
217
|
+
## Quick Start
|
|
218
|
+
|
|
219
|
+
1. **Install built-in types** — go to *Security → Objects → Object-Builder → Install Defaults* and select the types you need (Addresses, Networks, Ports, …).
|
|
220
|
+
2. **Create custom objects** — navigate to the matching area tab (Source/Destination, Services, Action) and add objects.
|
|
221
|
+
3. **Create object groups** *(optional)* — group related objects under *Security → Objects → Groups*.
|
|
222
|
+
4. **Create a Security Policy** — under *Security → Security Policy*.
|
|
223
|
+
5. **Add rules** — open the policy and add rules, selecting objects and groups for each column.
|
|
224
|
+
6. **Assign the policy to a device** — open a Device and use the *Assign Rulebook* action, or use the bulk-assign view on the policy.
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## License
|
|
229
|
+
|
|
230
|
+
[Apache 2.0](LICENSE)
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
from django.utils.translation import gettext_lazy as _
|
|
2
|
+
from netbox.plugins import PluginConfig
|
|
3
|
+
from .version import __version__
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class SecurityConfig(PluginConfig):
|
|
7
|
+
name = "netbox_nsm"
|
|
8
|
+
verbose_name = _("NetBox NSM - Network Security Management")
|
|
9
|
+
description = _("A NetBox plugin for network security management, including object groups and security policies.")
|
|
10
|
+
version = __version__
|
|
11
|
+
author = "Christian Burmeister"
|
|
12
|
+
author_email = ""
|
|
13
|
+
base_url = "netbox-nsm"
|
|
14
|
+
required_settings = []
|
|
15
|
+
min_version = "4.5.0"
|
|
16
|
+
default_settings = {
|
|
17
|
+
"top_level_menu": True,
|
|
18
|
+
"assignments_menu": False,
|
|
19
|
+
"virtual_ext_page": "left",
|
|
20
|
+
"interface_ext_page": "full_width",
|
|
21
|
+
"address_ext_page": "right",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
def ready(self):
|
|
25
|
+
super().ready()
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
config = SecurityConfig # noqa
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from rest_framework.serializers import HyperlinkedIdentityField
|
|
2
|
+
|
|
3
|
+
from netbox.api.serializers import PrimaryModelSerializer
|
|
4
|
+
|
|
5
|
+
from netbox_nsm.api.serializers_.nsm_object_type import NsmObjectTypeSerializer
|
|
6
|
+
from netbox_nsm.models import NsmObject
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NsmObjectSerializer(PrimaryModelSerializer):
|
|
10
|
+
url = HyperlinkedIdentityField(
|
|
11
|
+
view_name="plugins-api:netbox_nsm-api:nsmobject-detail"
|
|
12
|
+
)
|
|
13
|
+
nsm_object_type = NsmObjectTypeSerializer(nested=True)
|
|
14
|
+
|
|
15
|
+
class Meta:
|
|
16
|
+
model = NsmObject
|
|
17
|
+
fields = (
|
|
18
|
+
"id",
|
|
19
|
+
"url",
|
|
20
|
+
"display",
|
|
21
|
+
"nsm_object_type",
|
|
22
|
+
"name",
|
|
23
|
+
"object_data",
|
|
24
|
+
"source_model",
|
|
25
|
+
"source_pk",
|
|
26
|
+
"description",
|
|
27
|
+
"comments",
|
|
28
|
+
"tags",
|
|
29
|
+
"custom_fields",
|
|
30
|
+
"created",
|
|
31
|
+
"last_updated",
|
|
32
|
+
)
|
|
33
|
+
brief_fields = (
|
|
34
|
+
"id",
|
|
35
|
+
"url",
|
|
36
|
+
"display",
|
|
37
|
+
"nsm_object_type",
|
|
38
|
+
"name",
|
|
39
|
+
)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from rest_framework.serializers import HyperlinkedIdentityField
|
|
2
|
+
|
|
3
|
+
from netbox.api.serializers import PrimaryModelSerializer
|
|
4
|
+
|
|
5
|
+
from netbox_nsm.models import NsmObjectType
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class NsmObjectTypeSerializer(PrimaryModelSerializer):
|
|
9
|
+
url = HyperlinkedIdentityField(
|
|
10
|
+
view_name="plugins-api:netbox_nsm-api:nsmobjecttype-detail"
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
class Meta:
|
|
14
|
+
model = NsmObjectType
|
|
15
|
+
fields = (
|
|
16
|
+
"id",
|
|
17
|
+
"url",
|
|
18
|
+
"display",
|
|
19
|
+
"name",
|
|
20
|
+
"verbose_name",
|
|
21
|
+
"verbose_name_plural",
|
|
22
|
+
"slug",
|
|
23
|
+
"group_name",
|
|
24
|
+
"description",
|
|
25
|
+
"comments",
|
|
26
|
+
"tags",
|
|
27
|
+
"custom_fields",
|
|
28
|
+
"created",
|
|
29
|
+
"last_updated",
|
|
30
|
+
)
|
|
31
|
+
brief_fields = (
|
|
32
|
+
"id",
|
|
33
|
+
"url",
|
|
34
|
+
"display",
|
|
35
|
+
"name",
|
|
36
|
+
"slug",
|
|
37
|
+
)
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from rest_framework.serializers import HyperlinkedIdentityField
|
|
2
|
+
|
|
3
|
+
from netbox.api.serializers import PrimaryModelSerializer
|
|
4
|
+
|
|
5
|
+
from netbox_nsm.api.serializers_.nsm_object_type import NsmObjectTypeSerializer
|
|
6
|
+
from netbox_nsm.models import NsmObjectTypeField
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class NsmObjectTypeFieldSerializer(PrimaryModelSerializer):
|
|
10
|
+
url = HyperlinkedIdentityField(
|
|
11
|
+
view_name="plugins-api:netbox_nsm-api:nsmobjecttypefield-detail"
|
|
12
|
+
)
|
|
13
|
+
nsm_object_type = NsmObjectTypeSerializer(nested=True)
|
|
14
|
+
|
|
15
|
+
class Meta:
|
|
16
|
+
model = NsmObjectTypeField
|
|
17
|
+
fields = (
|
|
18
|
+
"id",
|
|
19
|
+
"url",
|
|
20
|
+
"display",
|
|
21
|
+
"nsm_object_type",
|
|
22
|
+
"name",
|
|
23
|
+
"label",
|
|
24
|
+
"type",
|
|
25
|
+
"group_name",
|
|
26
|
+
"required",
|
|
27
|
+
"unique",
|
|
28
|
+
"default",
|
|
29
|
+
"weight",
|
|
30
|
+
"description",
|
|
31
|
+
"comments",
|
|
32
|
+
"tags",
|
|
33
|
+
"custom_fields",
|
|
34
|
+
"created",
|
|
35
|
+
"last_updated",
|
|
36
|
+
)
|
|
37
|
+
brief_fields = (
|
|
38
|
+
"id",
|
|
39
|
+
"url",
|
|
40
|
+
"display",
|
|
41
|
+
"nsm_object_type",
|
|
42
|
+
"name",
|
|
43
|
+
"type",
|
|
44
|
+
)
|