Onemind-Services-LLC / netbox-secrets

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

[Bug]: Cannot decrypt existing secrets once the RSA key pair has been changed #88

Closed hlloreda closed 9 months ago

hlloreda commented 1 year ago

NetBox Secrets plugin version

1.7.6

NetBox version

3.4.10

Steps to Reproduce

  1. Create a first secret using one RSA key pair
  2. Change the user's RSA key pair to another key pair
  3. Try to decrypt the first secret
  4. Reswitch to the initial RSA key pair
  5. Try to decrypt the first secret

The steps can be seen here

Expected Behavior

For step 3, a popup saying that this secret has been encrypted with another key. For step 5, the decrypted secret

Observed Behavior

Can't decode byte error

abhi1693 commented 1 year ago

The reported issue is not a bug as the form clearly states that once a key is changed another administrator activate it. Your steps do not include that this was done.

abhi1693 commented 1 year ago

I saw the video and the issue is that re-saving the form marked the key as active which should not have happened. In any case, a new bug should be filed to fix this issue as the one reported is incorrect.