Skip to main content

NetBox plugin to document data flows between systems and applications.

Project description

netbox-data-flows

Plugin for NetBox to document Data Flows between systems and applications.

WARNING

This plugin is considered Work in Progress (Beta). Please use caution if using this plugin for production!

Features

  • Document data flows between IP addresses, IP ranges and prefixes
  • Document the application that requires these data flows
  • WIP: Prepare the list of data flows to be injested as firewall rules

Installation and Configuration

Full reference: Using Plugins - NetBox Documentation

Requirements

  • NetBox (>=3.4.2, <3.6.0)
  • Python 3.8 or higher

Note: the plugin uses some classes that are not explicitely exported in NetBox's plugin API, such as MPTT Tree-based models. Upward compatiblity is not guaranteed.

Temporary installation

Install the Python package:

source /opt/netbox/venv/bin/activate
pip install netbox-data-flows

Add the plugin in NetBox configuration

# Add in: /opt/netbox/netbox/netbox/configuration.py

PLUGINS = [
  'netbox_data_flows',
]

Create the database migrations:

source /opt/netbox/venv/bin/activate
/opt/netbox/netbox/manage.py migrate netbox_data_flows

The plugin will be removed at the next NetBox update.

Permanent installation

Add the Python package to local_requirements:

echo netbox-data-flows >> /opt/netbox/local_requirements.txt 

Add the plugin in NetBox configuration

# Add in: /opt/netbox/netbox/netbox/configuration.py

PLUGINS = [
  'netbox_data_flows',
]

Run the upgrade.sh script:

/opt/netbox/upgrade.sh

Configuration

There is no PLUGIN_CONFIG configuration for this plugin. However, several other aspects can be configured.

Nomenclature

The name of Data Flows, Data Flow Groups and Object Aliases is not constrained. You may wish to enforce your own validation rules in your configuration, e.g.:

# Add in: /opt/netbox/netbox/netbox/configuration.py

CUSTOM_VALIDATORS = {
    "netbox_data_flows.objectalias": [
        {
            "name": {
                "regex": "(host|net)_[a-z_]+"
            },
        }
    ]
}

Similar settings can be applied to:

  • Applications: netbox_data_flows.application
  • Application Roles: netbox_data_flows.applicationrole
  • Data Flows: netbox_data_flows.dataflow
  • Data Flow Groups: netbox_data_flows.dataflowgroup
  • Object Aliases: netbox_data_flows.objectalias

Full reference: CUSTOM_VALIDATORS - NetBox Documentation

Protocol Choices

You can edit the list of available protocols when creating a data flow.

# Add in: /opt/netbox/netbox/netbox/configuration.py

FIELD_CHOICES = {
    'netbox_data_flows.DataFlow.protocol+': (
        ('igmp', "IGMP"),
    )
}

Full reference: FIELD_CHOICES - NetBox Documentation

Data model

Application and Application Role

Applications are logical grouping of data flows and can be business applications or infrastructure. Examples of applications:

  • Active Directory
  • MySuperBusinessApp
  • Network management
  • ...

Application Role is a label to help you categorize your applications. Each Application may have one Application Role. Examples of roles:

  • Infrastructure
  • Business Division 1
  • ...

Data Flow

Data Flows modelize a network connection between two objects. They may be assigned to an Application

Data Flows should have a source, a destination, a protocol, source ports and destination ports. Only the protocol is mandatory.

Data Flow Groups form a forest of groups. A tree can be assigned to a single Application. Data Flow Groups can be enabled and disabled and inherit the status of their parent. Disabled Data Flow Groups disable all the Data Flows contained within.

Object Alias

Object Aliases are a group of references to other NetBox objects. Object Aliases are used as sources and destinations of Data Flows and corresponds to the groups or aliases used in firewall configuration. Internally, Object Aliases contain Object Alias Targets, because Django cannot create ManyToMany relationships to generic objects. Object Alias Targets are not exposed in the interface and should be transparent for the user.

Object Aliases currently supports:

  • IP Addresses (ipam.ipaddress)
  • IP Ranges (ipam.iprange)
  • Prefixes (ipam.prefix) If an IP Address is assigned to a device or virtual machine, that device is also displayed.

Development

Contributions are welcomed. This plugin is developped on the free time of its author, so do not expect regular releases.

Know bugs and limitations

  • REST API and GraphQL API are not tested

See also the list of issues

Planned Evolution

  • Include data's type/nature and link to data flows or at rest on devices

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox-data-flows-0.7.0.tar.gz (36.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_data_flows-0.7.0-py3-none-any.whl (62.5 kB view details)

Uploaded Python 3

File details

Details for the file netbox-data-flows-0.7.0.tar.gz.

File metadata

  • Download URL: netbox-data-flows-0.7.0.tar.gz
  • Upload date:
  • Size: 36.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for netbox-data-flows-0.7.0.tar.gz
Algorithm Hash digest
SHA256 31a3d192f606c4b4f0f0fe7ce7cf8a08c136569ba34eeff1c54e15550f6ef532
MD5 2508e14837f43e3713699a77a2e2abaa
BLAKE2b-256 d0158fb9fc0edecab2717bb5e0117ca99a66b1385d063c5cb3cad8e293c69f90

See more details on using hashes here.

File details

Details for the file netbox_data_flows-0.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for netbox_data_flows-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5328723461a2496223481b0fa19b2a20068ebc58387a19865f337bd910656873
MD5 1a3841c7914b883d640baadbb76490c7
BLAKE2b-256 cf162107c84bc53f7bc767f46e60bb58408eeb4bef961d86eacb1334b10b97e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page