Onemind-Services-LLC / netbox-secrets

Enhance your secret management with encrypted storage and flexible, user-friendly features.
Apache License 2.0
105 stars 11 forks source link

[Bug]: Cannot create more than one un-named secret for an object #100

Closed jseifeddine closed 9 months ago

jseifeddine commented 1 year ago

NetBox Secrets plugin version

v1.9.0

NetBox version

v3.6.1

Steps to Reproduce

First secret created just fine,

image

image

Second attempt image image

Looks like it isn't constrained by uuid but rather name, when you create a second un-named secret on an object you get this error,

Solution: unique names

Great plugin !

Expected Behavior

Create multiple un-named secrets

Observed Behavior

image

abhi1693 commented 1 year ago

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and a complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

Without it, it errored out loading secrets.js

You need to run python manage.py migrate from your virtual environment. This is not a bug. Please see the installation steps: https://github.com/Onemind-Services-LLC/netbox-secrets?tab=readme-ov-file#installation

jseifeddine commented 1 year ago

Thank you for opening a bug report. Unfortunately, the information you have provided is not sufficient for someone else to attempt to reproduce the reported behavior. Remember, each bug report must include detailed steps that someone else can follow on a clean, empty NetBox installation to reproduce the exact problem you're experiencing. These instructions should include the creation of any involved objects, any configuration changes, and a complete accounting of the actions being taken. Also be sure that your report does not reference data on the public NetBox demo, as that is subject to change at any time by an outside party and cannot be relied upon for bug reports.

Without it, it errored out loading secrets.js

You need to run python manage.py migrate from your virtual environment. This is not a bug. Please see the installation steps: https://github.com/Onemind-Services-LLC/netbox-secrets?tab=readme-ov-file#installation

Ignore that bit, look at the title of the issue, that is the reported bug, I'll edit the issue to make more sense, that was just a comment

abhi1693 commented 1 year ago

I'm sorry but the title is not enough for us to reproduce the issue. Ping me when you have provided more details as I have asked in the last comment and we can take a look.

jseifeddine commented 1 year ago

Check i've updated the original post,

If you create one secret with no name, that works, if you try and create another secret with no name, it fails with screenshot

abhi1693 commented 1 year ago

We may have to tweak this line to allow secrets to be unique when the name is not empty and keep the current implementation

https://github.com/Onemind-Services-LLC/netbox-secrets/blob/d9fbd964e1af1653ccaf6702cb03a6f9a9fa3e73/netbox_secrets/models/secrets.py#L281-L281

jseifeddine commented 1 year ago

"when the name is empty" you mean...

great plugin, but now i've got you - wondering if you could point me in the right direction for API use,

I have just stored all my secrets and now i'm wondering how to retrieve them from a remote system, I've got the user key stored

jseifeddine commented 1 year ago

ignore that last comment, just found the doc!

THANKS !

yash-pal1 commented 9 months ago

Screenshot from 2024-03-07 17-59-09

we can create multiple un-named objects with different roles.