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.
Files changed (241) hide show
  1. netbox_nsm-0.0.1/LICENSE +21 -0
  2. netbox_nsm-0.0.1/PKG-INFO +246 -0
  3. netbox_nsm-0.0.1/README.md +230 -0
  4. netbox_nsm-0.0.1/netbox_nsm/__init__.py +28 -0
  5. netbox_nsm-0.0.1/netbox_nsm/api/__init__.py +0 -0
  6. netbox_nsm-0.0.1/netbox_nsm/api/serializers.py +5 -0
  7. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/__init__.py +0 -0
  8. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/nsm_object.py +39 -0
  9. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/nsm_object_type.py +37 -0
  10. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/nsm_object_type_field.py +44 -0
  11. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_custom_object.py +38 -0
  12. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_custom_object_assignment.py +56 -0
  13. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_custom_type.py +33 -0
  14. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/object_group.py +29 -0
  15. netbox_nsm-0.0.1/netbox_nsm/api/serializers_/security_zone_policy_rulebook.py +163 -0
  16. netbox_nsm-0.0.1/netbox_nsm/api/urls.py +29 -0
  17. netbox_nsm-0.0.1/netbox_nsm/api/views.py +85 -0
  18. netbox_nsm-0.0.1/netbox_nsm/apps.py +5 -0
  19. netbox_nsm-0.0.1/netbox_nsm/builtin_types.py +219 -0
  20. netbox_nsm-0.0.1/netbox_nsm/choices/__init__.py +25 -0
  21. netbox_nsm-0.0.1/netbox_nsm/choices/application_choices.py +30 -0
  22. netbox_nsm-0.0.1/netbox_nsm/choices/security_policy_choices.py +20 -0
  23. netbox_nsm-0.0.1/netbox_nsm/constants/__init__.py +29 -0
  24. netbox_nsm-0.0.1/netbox_nsm/constants/constants.py +69 -0
  25. netbox_nsm-0.0.1/netbox_nsm/fields/__init__.py +3 -0
  26. netbox_nsm-0.0.1/netbox_nsm/fields/choice_field.py +33 -0
  27. netbox_nsm-0.0.1/netbox_nsm/filtersets/__init__.py +6 -0
  28. netbox_nsm-0.0.1/netbox_nsm/filtersets/application_item.py +46 -0
  29. netbox_nsm-0.0.1/netbox_nsm/filtersets/nsm_object_builder.py +63 -0
  30. netbox_nsm-0.0.1/netbox_nsm/filtersets/object_custom_object.py +23 -0
  31. netbox_nsm-0.0.1/netbox_nsm/filtersets/object_custom_object_assignment.py +21 -0
  32. netbox_nsm-0.0.1/netbox_nsm/filtersets/object_custom_type.py +24 -0
  33. netbox_nsm-0.0.1/netbox_nsm/filtersets/object_group.py +22 -0
  34. netbox_nsm-0.0.1/netbox_nsm/filtersets/security_zone_policy_rulebook.py +123 -0
  35. netbox_nsm-0.0.1/netbox_nsm/forms/__init__.py +6 -0
  36. netbox_nsm-0.0.1/netbox_nsm/forms/nsm_object_builder.py +252 -0
  37. netbox_nsm-0.0.1/netbox_nsm/forms/object_custom_object.py +273 -0
  38. netbox_nsm-0.0.1/netbox_nsm/forms/object_custom_object_assignment.py +64 -0
  39. netbox_nsm-0.0.1/netbox_nsm/forms/object_custom_type.py +130 -0
  40. netbox_nsm-0.0.1/netbox_nsm/forms/object_group.py +92 -0
  41. netbox_nsm-0.0.1/netbox_nsm/forms/security_zone_policy_rulebook.py +302 -0
  42. netbox_nsm-0.0.1/netbox_nsm/graphql/__init__.py +1 -0
  43. netbox_nsm-0.0.1/netbox_nsm/graphql/enums.py +18 -0
  44. netbox_nsm-0.0.1/netbox_nsm/graphql/filter_lookups.py +24 -0
  45. netbox_nsm-0.0.1/netbox_nsm/graphql/filters/__init__.py +1 -0
  46. netbox_nsm-0.0.1/netbox_nsm/graphql/types.py +9 -0
  47. netbox_nsm-0.0.1/netbox_nsm/migrations/0001_initial.py +1432 -0
  48. netbox_nsm-0.0.1/netbox_nsm/migrations/0002_rename_filter_firewallfilterrule_firewall_filter.py +18 -0
  49. netbox_nsm-0.0.1/netbox_nsm/migrations/0003_rename_actions_securityzonepolicy_policy_actions.py +18 -0
  50. netbox_nsm-0.0.1/netbox_nsm/migrations/0004_alter_natrule_custom_interface.py +20 -0
  51. netbox_nsm-0.0.1/netbox_nsm/migrations/0005_policer.py +108 -0
  52. netbox_nsm-0.0.1/netbox_nsm/migrations/0006_alter_natpoolassignment_assigned_object_type_and_more.py +45 -0
  53. netbox_nsm-0.0.1/netbox_nsm/migrations/0007_policerassignment.py +89 -0
  54. netbox_nsm-0.0.1/netbox_nsm/migrations/0008_alter_address_options_rename_value_address_address_and_more.py +217 -0
  55. netbox_nsm-0.0.1/netbox_nsm/migrations/0009_alter_address_options_alter_address_unique_together_and_more.py +41 -0
  56. netbox_nsm-0.0.1/netbox_nsm/migrations/0010_applicationitem_application_applicationset_and_more.py +360 -0
  57. netbox_nsm-0.0.1/netbox_nsm/migrations/0011_remove_securityzonepolicy_application_and_more.py +35 -0
  58. netbox_nsm-0.0.1/netbox_nsm/migrations/0012_remove_application_destination_port_and_more.py +488 -0
  59. netbox_nsm-0.0.1/netbox_nsm/migrations/0013_address_identifier_addressset_identifier_and_more.py +43 -0
  60. netbox_nsm-0.0.1/netbox_nsm/migrations/0014_addressset_address_sets.py +20 -0
  61. netbox_nsm-0.0.1/netbox_nsm/migrations/0015_alter_address_unique_together_and_more.py +38 -0
  62. netbox_nsm-0.0.1/netbox_nsm/migrations/0016_alter_application_application_items_and_more.py +31 -0
  63. netbox_nsm-0.0.1/netbox_nsm/migrations/0017_applicationset_application_sets.py +22 -0
  64. netbox_nsm-0.0.1/netbox_nsm/migrations/0018_alter_address_unique_together.py +17 -0
  65. netbox_nsm-0.0.1/netbox_nsm/migrations/0019_alter_natpool_options_alter_natrule_options_and_more.py +25 -0
  66. netbox_nsm-0.0.1/netbox_nsm/migrations/0020_alter_addressassignment_options_and_more.py +64 -0
  67. netbox_nsm-0.0.1/netbox_nsm/migrations/0021_address_owner_addressset_owner_application_owner_and_more.py +165 -0
  68. netbox_nsm-0.0.1/netbox_nsm/migrations/0022_natpoolmember_comments_natpoolmember_description_and_more.py +38 -0
  69. netbox_nsm-0.0.1/netbox_nsm/migrations/0023_alter_securityzoneassignment_assigned_object_type.py +39 -0
  70. netbox_nsm-0.0.1/netbox_nsm/migrations/0024_address_assigned_object_id_and_more.py +108 -0
  71. netbox_nsm-0.0.1/netbox_nsm/migrations/0025_route_address_fields_to_gfk.py +67 -0
  72. netbox_nsm-0.0.1/netbox_nsm/migrations/0026_alter_address_options_remove_address_address_and_more.py +71 -0
  73. netbox_nsm-0.0.1/netbox_nsm/migrations/0027_alter_addressassignment_assigned_object_type_and_more.py +167 -0
  74. netbox_nsm-0.0.1/netbox_nsm/migrations/0028_alter_customprefix_options.py +23 -0
  75. netbox_nsm-0.0.1/netbox_nsm/migrations/0029_securityzonerole_and_zone_role_fk.py +72 -0
  76. netbox_nsm-0.0.1/netbox_nsm/migrations/0030_securityzonerole_owner.py +25 -0
  77. netbox_nsm-0.0.1/netbox_nsm/migrations/0031_securityzonematrix_and_policy_models.py +198 -0
  78. netbox_nsm-0.0.1/netbox_nsm/migrations/0032_security_zone_policy_rulebook.py +274 -0
  79. netbox_nsm-0.0.1/netbox_nsm/migrations/0033_securitypolicy_add_roles.py +21 -0
  80. netbox_nsm-0.0.1/netbox_nsm/migrations/0034_securityzone_roles_m2m.py +42 -0
  81. netbox_nsm-0.0.1/netbox_nsm/migrations/0035_securityzonepolicy_zones_m2m.py +182 -0
  82. netbox_nsm-0.0.1/netbox_nsm/migrations/0036_objects_menu_models.py +270 -0
  83. netbox_nsm-0.0.1/netbox_nsm/migrations/0037_migrate_address_sets_to_object_groups.py +101 -0
  84. netbox_nsm-0.0.1/netbox_nsm/migrations/0038_application_profile_fields.py +46 -0
  85. netbox_nsm-0.0.1/netbox_nsm/migrations/0039_remove_application_saas.py +15 -0
  86. netbox_nsm-0.0.1/netbox_nsm/migrations/0040_objectlabel_single_type.py +127 -0
  87. netbox_nsm-0.0.1/netbox_nsm/migrations/0041_securityzone_color.py +16 -0
  88. netbox_nsm-0.0.1/netbox_nsm/migrations/0042_objectuser_name_dn.py +101 -0
  89. netbox_nsm-0.0.1/netbox_nsm/migrations/0043_nsm_object_builder.py +118 -0
  90. netbox_nsm-0.0.1/netbox_nsm/migrations/0044_seed_builder_object_types.py +244 -0
  91. netbox_nsm-0.0.1/netbox_nsm/migrations/0045_nsm_object_instances.py +216 -0
  92. netbox_nsm-0.0.1/netbox_nsm/migrations/0046_objectgroup_nested_groups.py +35 -0
  93. netbox_nsm-0.0.1/netbox_nsm/migrations/0047_objectgroup_group_member_type.py +42 -0
  94. netbox_nsm-0.0.1/netbox_nsm/migrations/0048_security_rule_fields_srcdst_manipulators.py +90 -0
  95. netbox_nsm-0.0.1/netbox_nsm/migrations/0049_objectaction_and_rule_action_objects.py +86 -0
  96. netbox_nsm-0.0.1/netbox_nsm/migrations/0050_objectlog.py +44 -0
  97. netbox_nsm-0.0.1/netbox_nsm/migrations/0051_alter_objectaction_action.py +54 -0
  98. netbox_nsm-0.0.1/netbox_nsm/migrations/0052_object_assignment_models.py +348 -0
  99. netbox_nsm-0.0.1/netbox_nsm/migrations/0053_objectcustomtype.py +43 -0
  100. netbox_nsm-0.0.1/netbox_nsm/migrations/0054_objectcustomtype_owner.py +23 -0
  101. netbox_nsm-0.0.1/netbox_nsm/migrations/0055_objectcustomtype_area_fields.py +29 -0
  102. netbox_nsm-0.0.1/netbox_nsm/migrations/0056_objectcustomobject.py +65 -0
  103. netbox_nsm-0.0.1/netbox_nsm/migrations/0057_policyrule_custom_objects.py +41 -0
  104. netbox_nsm-0.0.1/netbox_nsm/migrations/0058_objectnat_objectinterface.py +159 -0
  105. netbox_nsm-0.0.1/netbox_nsm/migrations/0059_objectcomment_objectinstalledon.py +91 -0
  106. netbox_nsm-0.0.1/netbox_nsm/migrations/0060_objectfilter_objectpolicer.py +110 -0
  107. netbox_nsm-0.0.1/netbox_nsm/migrations/0061_policyrule_new_objects.py +65 -0
  108. netbox_nsm-0.0.1/netbox_nsm/migrations/0062_policyrule_info_objects.py +31 -0
  109. netbox_nsm-0.0.1/netbox_nsm/migrations/0063_objectcustomobjectassignment.py +99 -0
  110. netbox_nsm-0.0.1/netbox_nsm/migrations/0064_objectcustomtype_icon.py +21 -0
  111. netbox_nsm-0.0.1/netbox_nsm/migrations/0065_objectcustomobjectassignment_comment.py +16 -0
  112. netbox_nsm-0.0.1/netbox_nsm/migrations/0066_remove_securityzone_policy_and_matrix.py +16 -0
  113. netbox_nsm-0.0.1/netbox_nsm/migrations/0067_remove_nat_and_policer.py +17 -0
  114. netbox_nsm-0.0.1/netbox_nsm/migrations/0068_remove_firewall_filter_object_label_sgt_user_log.py +23 -0
  115. netbox_nsm-0.0.1/netbox_nsm/migrations/0069_remove_assignment_models_and_securityzonerole.py +39 -0
  116. netbox_nsm-0.0.1/netbox_nsm/migrations/0070_remove_policyrulebook_roles.py +15 -0
  117. netbox_nsm-0.0.1/netbox_nsm/migrations/0071_remove_address_models.py +35 -0
  118. netbox_nsm-0.0.1/netbox_nsm/migrations/0072_remove_legacy_object_models.py +56 -0
  119. netbox_nsm-0.0.1/netbox_nsm/migrations/0073_add_object_group.py +100 -0
  120. netbox_nsm-0.0.1/netbox_nsm/migrations/0074_security_rule_groups.py +61 -0
  121. netbox_nsm-0.0.1/netbox_nsm/migrations/0075_display_template_and_rulebook_comment.py +37 -0
  122. netbox_nsm-0.0.1/netbox_nsm/migrations/0076_labels_type_choice_field.py +33 -0
  123. netbox_nsm-0.0.1/netbox_nsm/migrations/0077_labels_type_flexible_text.py +38 -0
  124. netbox_nsm-0.0.1/netbox_nsm/migrations/0078_remove_application_applicationset.py +36 -0
  125. netbox_nsm-0.0.1/netbox_nsm/migrations/0079_remove_securityzone_applicationitem.py +48 -0
  126. netbox_nsm-0.0.1/netbox_nsm/migrations/0080_remove_matrix_rulebook_type.py +20 -0
  127. netbox_nsm-0.0.1/netbox_nsm/migrations/__init__.py +0 -0
  128. netbox_nsm-0.0.1/netbox_nsm/mixins/__init__.py +9 -0
  129. netbox_nsm-0.0.1/netbox_nsm/mixins/assignment_filterset.py +82 -0
  130. netbox_nsm-0.0.1/netbox_nsm/mixins/ports.py +82 -0
  131. netbox_nsm-0.0.1/netbox_nsm/models/__init__.py +6 -0
  132. netbox_nsm-0.0.1/netbox_nsm/models/nsm_object_builder.py +272 -0
  133. netbox_nsm-0.0.1/netbox_nsm/models/object_custom_object.py +79 -0
  134. netbox_nsm-0.0.1/netbox_nsm/models/object_custom_object_assignment.py +59 -0
  135. netbox_nsm-0.0.1/netbox_nsm/models/object_custom_type.py +71 -0
  136. netbox_nsm-0.0.1/netbox_nsm/models/object_group.py +58 -0
  137. netbox_nsm-0.0.1/netbox_nsm/models/security_zone_policy_rulebook.py +218 -0
  138. netbox_nsm-0.0.1/netbox_nsm/navigation.py +67 -0
  139. netbox_nsm-0.0.1/netbox_nsm/serializers/__init__.py +0 -0
  140. netbox_nsm-0.0.1/netbox_nsm/serializers/yaml_bundle.py +364 -0
  141. netbox_nsm-0.0.1/netbox_nsm/signals/__init__.py +0 -0
  142. netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/nsm_visible_when.js +72 -0
  143. netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/object_group_form.js +152 -0
  144. netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/object_label_form.js +52 -0
  145. netbox_nsm-0.0.1/netbox_nsm/static/netbox_nsm/js/security_rule_form.js +381 -0
  146. netbox_nsm-0.0.1/netbox_nsm/tables/__init__.py +5 -0
  147. netbox_nsm-0.0.1/netbox_nsm/tables/mixins.py +34 -0
  148. netbox_nsm-0.0.1/netbox_nsm/tables/nsm_object_builder.py +88 -0
  149. netbox_nsm-0.0.1/netbox_nsm/tables/object_custom_object.py +54 -0
  150. netbox_nsm-0.0.1/netbox_nsm/tables/object_custom_type.py +18 -0
  151. netbox_nsm-0.0.1/netbox_nsm/tables/object_group.py +50 -0
  152. netbox_nsm-0.0.1/netbox_nsm/tables/security_zone_policy_rulebook.py +295 -0
  153. netbox_nsm-0.0.1/netbox_nsm/template_content.py +317 -0
  154. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/address/extend.html +19 -0
  155. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/address.html +133 -0
  156. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/addressset/extend.html +19 -0
  157. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/addressset.html +130 -0
  158. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/assigned_objects.html +4 -0
  159. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/builtin_type_install.html +98 -0
  160. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/customprefix.html +46 -0
  161. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/device/security.html +6 -0
  162. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/device_matching_rules.html +188 -0
  163. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/dynamic_object_catalog.html +52 -0
  164. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/firewallfilter.html +97 -0
  165. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/firewallfilterrule.html +43 -0
  166. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/global_rules_search.html +135 -0
  167. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/assigned_objects_tab.html +6 -0
  168. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/nsm_security_links.html +122 -0
  169. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/security_tab.html +80 -0
  170. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/inc/settings.html +26 -0
  171. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/interface/addresslist.html +38 -0
  172. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/interface/interface_extend.html +48 -0
  173. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/ipaddress/security.html +62 -0
  174. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/iprange/nsm_groups.html +62 -0
  175. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/iprange/security.html +164 -0
  176. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natpool.html +84 -0
  177. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natpool_members.html +22 -0
  178. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natpoolmember.html +73 -0
  179. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natrule.html +173 -0
  180. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natruleset.html +104 -0
  181. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/natruleset_rules.html +23 -0
  182. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/nsmobject.html +62 -0
  183. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/nsmobjecttype.html +45 -0
  184. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/object_builder.html +37 -0
  185. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/object_custom_area.html +76 -0
  186. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/object_tabs.html +108 -0
  187. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectaction.html +23 -0
  188. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcomment.html +37 -0
  189. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustom.html +88 -0
  190. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustom_assignments.html +41 -0
  191. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustomobject.html +1 -0
  192. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectcustomtype.html +86 -0
  193. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectfilter.html +55 -0
  194. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup.html +114 -0
  195. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup_area.html +43 -0
  196. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup_assignments.html +39 -0
  197. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectgroup_list.html +22 -0
  198. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectinstalledon.html +32 -0
  199. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectinterface.html +40 -0
  200. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectlabel.html +31 -0
  201. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectlabel_edit.html +7 -0
  202. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectlog.html +23 -0
  203. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectnat.html +58 -0
  204. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectpolicer.html +36 -0
  205. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectsgt.html +24 -0
  206. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/objectuser.html +24 -0
  207. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/policer.html +111 -0
  208. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/prefix/security.html +62 -0
  209. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/security_zone_role.html +46 -0
  210. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicy.html +89 -0
  211. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrule.html +143 -0
  212. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrule_edit.html +211 -0
  213. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook.html +44 -0
  214. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook_bulk_assign.html +35 -0
  215. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook_security_policy.html +286 -0
  216. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/securityzonepolicyrulebook_visualization.html +491 -0
  217. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/virtual_device_context/security.html +6 -0
  218. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/virtualmachine/security.html +6 -0
  219. netbox_nsm-0.0.1/netbox_nsm/templates/netbox_nsm/yaml_bundle_import.html +124 -0
  220. netbox_nsm-0.0.1/netbox_nsm/templatetags/object_type.py +17 -0
  221. netbox_nsm-0.0.1/netbox_nsm/urls.py +99 -0
  222. netbox_nsm-0.0.1/netbox_nsm/utilities/__init__.py +121 -0
  223. netbox_nsm-0.0.1/netbox_nsm/validators/__init__.py +3 -0
  224. netbox_nsm-0.0.1/netbox_nsm/validators/fqdn.py +15 -0
  225. netbox_nsm-0.0.1/netbox_nsm/version.py +1 -0
  226. netbox_nsm-0.0.1/netbox_nsm/views/__init__.py +9 -0
  227. netbox_nsm-0.0.1/netbox_nsm/views/device_security.py +250 -0
  228. netbox_nsm-0.0.1/netbox_nsm/views/ipam_security_tabs.py +113 -0
  229. netbox_nsm-0.0.1/netbox_nsm/views/nsm_object_builder.py +172 -0
  230. netbox_nsm-0.0.1/netbox_nsm/views/object_custom_object.py +159 -0
  231. netbox_nsm-0.0.1/netbox_nsm/views/object_custom_type.py +120 -0
  232. netbox_nsm-0.0.1/netbox_nsm/views/object_group.py +146 -0
  233. netbox_nsm-0.0.1/netbox_nsm/views/object_tabs.py +305 -0
  234. netbox_nsm-0.0.1/netbox_nsm/views/security_zone_policy_rulebook.py +994 -0
  235. netbox_nsm-0.0.1/netbox_nsm/views/yaml_bundle.py +99 -0
  236. netbox_nsm-0.0.1/netbox_nsm.egg-info/PKG-INFO +246 -0
  237. netbox_nsm-0.0.1/netbox_nsm.egg-info/SOURCES.txt +239 -0
  238. netbox_nsm-0.0.1/netbox_nsm.egg-info/dependency_links.txt +1 -0
  239. netbox_nsm-0.0.1/netbox_nsm.egg-info/top_level.txt +3 -0
  240. netbox_nsm-0.0.1/pyproject.toml +32 -0
  241. netbox_nsm-0.0.1/setup.cfg +4 -0
@@ -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
+ ![Navigation](docs/img/01-navigation.png)
205
+ ![Custom Object Types](docs/img/02-object-types.png)
206
+ ![Object Type Detail](docs/img/03-object-type-detail.png)
207
+ ![Object List](docs/img/04-object-list.png)
208
+ ![Object Detail](docs/img/05-object-detail.png)
209
+
210
+ ### Object Groups
211
+ ![Object Groups](docs/img/06-object-groups.png)
212
+ ![Object Group Detail](docs/img/07-object-group-detail.png)
213
+
214
+ ### Built-in Types & YAML Bundle
215
+ ![Built-in Type Installer](docs/img/08-builtin-types.png)
216
+ ![YAML Bundle Export/Import](docs/img/09-yaml-bundle.png)
217
+
218
+ ### Security Policies
219
+ ![Security Policy — Address-based Rules](docs/img/10-security-policy-address.png)
220
+ ![Security Rule Detail](docs/img/11-security-rule-detail.png)
221
+ ![Security Policy — Label-based Rules (Illumio-style)](docs/img/12-security-policy-labels.png)
222
+
223
+ ### Object Assignments & Device Integration
224
+ ![Custom Object Assignments](docs/img/13-custom-object-assignments.png)
225
+ ![Device Security Panel](docs/img/14-device-security-panel.png)
226
+
227
+ ### Security on IPAM Objects
228
+ ![Prefix Security Tab](docs/img/15-prefix-security-tab.png)
229
+ ![IP Address Security Tab (inherited via subnet)](docs/img/16-ipaddress-security-tab.png)
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
+ ![Navigation](docs/img/01-navigation.png)
189
+ ![Custom Object Types](docs/img/02-object-types.png)
190
+ ![Object Type Detail](docs/img/03-object-type-detail.png)
191
+ ![Object List](docs/img/04-object-list.png)
192
+ ![Object Detail](docs/img/05-object-detail.png)
193
+
194
+ ### Object Groups
195
+ ![Object Groups](docs/img/06-object-groups.png)
196
+ ![Object Group Detail](docs/img/07-object-group-detail.png)
197
+
198
+ ### Built-in Types & YAML Bundle
199
+ ![Built-in Type Installer](docs/img/08-builtin-types.png)
200
+ ![YAML Bundle Export/Import](docs/img/09-yaml-bundle.png)
201
+
202
+ ### Security Policies
203
+ ![Security Policy — Address-based Rules](docs/img/10-security-policy-address.png)
204
+ ![Security Rule Detail](docs/img/11-security-rule-detail.png)
205
+ ![Security Policy — Label-based Rules (Illumio-style)](docs/img/12-security-policy-labels.png)
206
+
207
+ ### Object Assignments & Device Integration
208
+ ![Custom Object Assignments](docs/img/13-custom-object-assignments.png)
209
+ ![Device Security Panel](docs/img/14-device-security-panel.png)
210
+
211
+ ### Security on IPAM Objects
212
+ ![Prefix Security Tab](docs/img/15-prefix-security-tab.png)
213
+ ![IP Address Security Tab (inherited via subnet)](docs/img/16-ipaddress-security-tab.png)
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
@@ -0,0 +1,5 @@
1
+ from .serializers_.security_zone_policy_rulebook import *
2
+ from .serializers_.object_custom_type import *
3
+ from .serializers_.object_custom_object import *
4
+ from .serializers_.object_custom_object_assignment import *
5
+ from .serializers_.object_group import *
@@ -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
+ )