Coder Social home page Coder Social logo

dddc-netbox-plugin's Introduction

Netbox Plugin D3C

This repository contains the source code for the BSI Project 507 TP2. In this context, the D3C plugin for Netbox was developed. The D3C plugin takes input data from various sources, supports the processing and approval of this data to construct a device database within the framework of Netbox. As such, it is intended to support IT security management tasks such as device management, vulnerability management, and patch management.

In addition to the plugin code, this repository contains additional files for the community-driven Docker image integrating the D3C Plugin in development mode. This is primarily used for test purposes for the CI/CD pipeline and can be used for testing the plugin within an exemplary Netbox environment.

Installation of the D3C Plugin

As the D3C plugin is a standard Netbox plugin, it can be installed according to the Netbox documentation. This plugin is compatible with Netbox version 3.6.x and ensured by plugins setup.py file.

Additionally, this repository contains files from the community-driven Docker image to set up Netbox, along with all its dependencies, such as a PostgreSQL database. Please note: This is not an installation for a production environment, as it uses default passwords and API keys as specified in the project's files. Furthermore, this installation sets up Netbox in 'developer mode', which means that the user will receive detailed information in case of an exception. This is very useful for alpha and beta testing, which is why this installation option is described below:

Installation via Docker for developing and testing purposes

Prerequisites

This Dockerfile simply extends the netbox-docker project with the custom D3C-plugin. Therefore, the dependencies of the netbox-docker project also apply for this installation:

Recommendation: Install docker with the Compose v2 already integrated into the Docker CLI platform.

To check the version installed on your system run docker --version and docker compose version.

After the installation, Netbox is available at http://127.0.0.1:8000. Therefore, for simplicity, a web browser should be available on the installed system.

Installation for developing and testing purposes

  1. Execute the following commands:

    cd /home/
    apt update
    apt install apt-transport-https ca-certificates curl software-properties-common
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
    add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu jammy stable"
    apt-cache policy docker-ce
    apt install docker-ce
    
    git clone https://github.com/DINA-community/DDDC-Netbox-plugin.git
    cd /home/d3c/
    docker compose build --no-cache
    docker compose up
    
  2. Wait until Initialisation is done. is printed. Afterwards the GUI can be accessed via http://127.0.0.1:8000.

  3. Login as

    • BN: admin
    • PW: admin

After testing, the containers can be stopped by pressing Ctrl+C and restarted using docker-compose up

Notes regarding the installation of this plugin via the provided files

The installation will provide a warning message since the installation is using the default security token:

⚠️ Warning: You have the old default admin token in your database. This token is widely known; please remove it.

In theory, you can add an alternative security token in the file netbox.env by adding the following line:

SUPERUSER_API_TOKEN=<Token>

However, an important aspect of an installation in a production environment is the creation of users, tokens, and their permissions. This must be done for each Netbox installation separately and in accordance with the specific requirements in place.

Testing

The unit tests of netbox can be executed via ./test.sh

Help

This section contains links for familiarizing yourself with Django, Netbox, and plugins.

General

Development

dddc-netbox-plugin's People

Contributors

crubumble avatar jplettuce avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.