Support of software installations with secrets #4481

Closed
opened 2025-12-29 18:36:28 +01:00 by adam · 6 comments
Owner

Originally created by @Peter2121 on GitHub (Jan 20, 2021).

Environment

  • Python version: 3.7
  • NetBox version: 2.9.11

Proposed Functionality

Actually, the secrets are related to devices. It seems that in 2.10 version the support was extended to VMs. But conceptually, neither devices itself nor VMs do not support secrets, the secrets are related to some software, installed on devices/VMs. For example, in case of network switch it would be a firmware, in case of a server it would be an operating system.
I propose to add two concepts in Netbox - software (a dictionary) and installations (related to devices and VMs). The secrets should not be related to devices and VMs, but to installations (for the compatibility with the actual versions - the support of secrets could be just extended to installations).
On the side of devices/VMs the installations should be processed at the same manner that interfaces are actually processed - one could add several installations to any device/VM, the type of installation (software) should be searched in a pre-defined list of available software. Any software can have a list of parameters (version etc.) and one could assign several parameters (related to the software) and secrets (for example, different user/password pairs) to any installation. The support of custom fields for both software and installations would be nice too.

Use Case

Different versions of switch firmware support different features. It would be great to be able to search in a sub-network all switches with firmware version larger than X.X.
A VM can have different software installed, with user/password pairs related to the installed software and not VM itself. For example, MySQL installed on Debian Linux - there are two accounts 'root' with different passwords, related to two different installations of different software. Even more, one could have multiple instances of MySQL on the same VM, with the same login 'root' and different passwords. It would be great to be able to search the information like this at the simple manner.

Database Changes

Probably, at least two additional tables should be created - 'installation' and 'software'. In case of tracking of software editors as a dictionary (it would be better) - there is a third table 'editors'.

External Dependencies

Probably, not.

Originally created by @Peter2121 on GitHub (Jan 20, 2021). <!-- NOTE: IF YOUR ISSUE DOES NOT FOLLOW THIS TEMPLATE, IT WILL BE CLOSED. This form is only for proposing specific new features or enhancements. If you have a general idea or question, please start a discussion instead: https://github.com/netbox-community/netbox/discussions NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: 3.7 * NetBox version: 2.9.11 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Actually, the secrets are related to devices. It seems that in 2.10 version the support was extended to VMs. But conceptually, neither devices itself nor VMs do not support secrets, the secrets are related to some software, installed on devices/VMs. For example, in case of network switch it would be a firmware, in case of a server it would be an operating system. I propose to add two concepts in Netbox - _software_ (a dictionary) and _installations_ (related to devices and VMs). The secrets should not be related to devices and VMs, but to installations (for the compatibility with the actual versions - the support of secrets could be just extended to installations). On the side of devices/VMs the installations should be processed at the same manner that interfaces are actually processed - one could add several installations to any device/VM, the type of installation (software) should be searched in a pre-defined list of available software. Any software can have a list of parameters (version etc.) and one could assign several parameters (related to the software) and secrets (for example, different user/password pairs) to any installation. The support of custom fields for both software and installations would be nice too. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case Different versions of switch firmware support different features. It would be great to be able to search in a sub-network all switches with firmware version larger than X.X. A VM can have different software installed, with user/password pairs related to the installed software and not VM itself. For example, MySQL installed on Debian Linux - there are two accounts 'root' with different passwords, related to two different installations of different software. Even more, one could have multiple instances of MySQL on the same VM, with the same login 'root' and different passwords. It would be great to be able to search the information like this at the simple manner. <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes Probably, at least two additional tables should be created - 'installation' and 'software'. In case of tracking of software editors as a dictionary (it would be better) - there is a third table 'editors'. <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies Probably, not.
adam closed this issue 2025-12-29 18:36:28 +01:00
Author
Owner

@ryanmerolle commented on GitHub (Jan 20, 2021):

It has been at least said in chat that longer term secrets moving to a plugin(ie removed from core) since the majority of users leverage third party services like Ansible Vault, CyberArk, Hashicorp Vault, and etc. for secret/password management. Besides the slight tweak of extending to virtual_devices (which is basically the same as devices), I do not see this feature getting added.

@ryanmerolle commented on GitHub (Jan 20, 2021): It has been at least said in chat that longer term secrets moving to a plugin(ie removed from core) since the majority of users leverage third party services like Ansible Vault, CyberArk, Hashicorp Vault, and etc. for secret/password management. Besides the slight tweak of extending to virtual_devices (which is basically the same as devices), I do not see this feature getting added.
Author
Owner

@jeremystretch commented on GitHub (Jan 20, 2021):

FYI #5278 details the use case for porting the secrets app to a plugin.

@jeremystretch commented on GitHub (Jan 20, 2021): FYI #5278 details the use case for porting the secrets app to a plugin.
Author
Owner

@Peter2121 commented on GitHub (Jan 20, 2021):

I don't see any conflict between a proposal of moving secrets to a plugin and my proposal. Does not matter - how the secrets are implemented (even better if they are implemented using Vault as an external storage). The key point is that we need to attach secrets to installations and not to hardware. That's why I proposed to implement these new objects.

@Peter2121 commented on GitHub (Jan 20, 2021): I don't see any conflict between a proposal of moving secrets to a plugin and my proposal. Does not matter - how the secrets are implemented (even better if they are implemented using Vault as an external storage). The key point is that we need to attach secrets to installations and not to hardware. That's why I proposed to implement these new objects.
Author
Owner

@jeremystretch commented on GitHub (Jan 20, 2021):

@Peter2121 as @ryanmerolle suggested I'm afraid we won't be undertaking any feature requests relating to secrets in the near future. If this is functionality you require, I encourage you to create your own plugin to support it.

@jeremystretch commented on GitHub (Jan 20, 2021): @Peter2121 as @ryanmerolle suggested I'm afraid we won't be undertaking any feature requests relating to secrets in the near future. If this is functionality you require, I encourage you to create your own plugin to support it.
Author
Owner

@Peter2121 commented on GitHub (Jan 20, 2021):

@jeremystretch yes, it was my error - mention 'secrets' in the title :)
Once again, this proposal is not directly related to secrets. Even if I create an external plugin to manage secrets - I have no objects of type 'installation' to attach my secrets. And even if I create a plugin to manage software/installations - I cannot show this information as a part of VMs/devices car plugins cannot modify models of the core objects. So, basically, my proposal concerns the extension of VMs/devices models to include there the object of type 'installation'.

@Peter2121 commented on GitHub (Jan 20, 2021): @jeremystretch yes, it was my error - mention 'secrets' in the title :) Once again, this proposal is not directly related to secrets. Even if I create an external plugin to manage secrets - I have no objects of type 'installation' to attach my secrets. And even if I create a plugin to manage software/installations - I cannot show this information _as a part_ of VMs/devices car plugins cannot modify models of the core objects. So, basically, my proposal concerns the extension of VMs/devices models to include there the object of type 'installation'.
Author
Owner

@jeremystretch commented on GitHub (Jan 20, 2021):

I cannot show this information as a part of VMs/devices car plugins cannot modify models of the core objects.

No, but you can certainly reference them. I encourage you to read the plugins documentation to see what's possible. At any rate, managing the particular software packages installed on a particular device/VM would be out of scope for NetBox core anyway, so you would need to write a plugin or fork.

@jeremystretch commented on GitHub (Jan 20, 2021): > I cannot show this information as a part of VMs/devices car plugins cannot modify models of the core objects. No, but you can certainly reference them. I encourage you to read the [plugins documentation](https://netbox.readthedocs.io/en/stable/plugins/development/) to see what's possible. At any rate, managing the particular software packages installed on a particular device/VM would be out of scope for NetBox core anyway, so you would need to write a plugin or fork.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4481