Secrets - Allow creation of secrets without assigning to a device #4907

Closed
opened 2025-12-29 19:22:05 +01:00 by adam · 1 comment
Owner

Originally created by @jaakub on GitHub (May 14, 2021).

NetBox version

v2.11.2

Feature type

Change to existing functionality

Proposed functionality

Allow creation of secrets without having to assign them to a device/VM object.

At the moment, when trying to CSV import, you need to specify either one or the other, otherwise, it errors out like below. Also, device/vm fields aren't marked as required - I suspect this might be down to that not both are required, but one or the other.

Enter the list of column headers followed by one line per record to be imported, using commas to separate values. Multi-line data and values containing commas may be wrapped in double quotes.
Row 1 __all__: Secret must be assigned to a device or a virtual machine

Use case

Storing of default credentials which are then retrieved by scripts.

In my use case, I have a script generating secrets and inventory data. If a device has secrets assigned to it, those are used, otherwise, defaults are used.

Currently, to have defaults, you need to have some sort of device/VM object called 'defaults' or something meaningful to assign those credentials to it. In my setup, for this particular device, I use a separate site, manufacturer, model and role called 'Defaults'. A lot of unnecessary objects, and it would be nice if we could just have secrets on their own, without being assigned to anything. To retrieve those, I just use a tag of defaults.

Database changes

N/A

External dependencies

N/A

Originally created by @jaakub on GitHub (May 14, 2021). ### NetBox version v2.11.2 ### Feature type Change to existing functionality ### Proposed functionality Allow creation of secrets without having to assign them to a device/VM object. At the moment, when trying to CSV import, you need to specify either one or the other, otherwise, it errors out like below. Also, device/vm fields aren't marked as required - I suspect this might be down to that not both are required, but one or the other. ``` Enter the list of column headers followed by one line per record to be imported, using commas to separate values. Multi-line data and values containing commas may be wrapped in double quotes. Row 1 __all__: Secret must be assigned to a device or a virtual machine ``` ### Use case Storing of default credentials which are then retrieved by scripts. In my use case, I have a script generating secrets and inventory data. If a device has secrets assigned to it, those are used, otherwise, defaults are used. Currently, to have defaults, you need to have some sort of device/VM object called 'defaults' or something meaningful to assign those credentials to it. In my setup, for this particular device, I use a separate site, manufacturer, model and role called 'Defaults'. A lot of unnecessary objects, and it would be nice if we could just have secrets on their own, without being assigned to anything. To retrieve those, I just use a tag of `defaults`. ### Database changes N/A ### External dependencies N/A
adam added the type: feature label 2025-12-29 19:22:05 +01:00
adam closed this issue 2025-12-29 19:22:06 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 14, 2021):

NetBox's secrets functionality is being split off into a plugin in the upcoming v2.12 release (see #5278), and no further work is being done on that component at this time. I encourage you to raise the proposal for the new plugin once it's been released.

@jeremystretch commented on GitHub (May 14, 2021): NetBox's secrets functionality is being split off into a plugin in the upcoming v2.12 release (see #5278), and no further work is being done on that component at this time. I encourage you to raise the proposal for the new plugin once it's been released.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4907