Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InsecureSecrets callback does not work for removed secrets #534

Open
ajcasagrande opened this issue May 8, 2023 · 1 comment
Open

InsecureSecrets callback does not work for removed secrets #534

ajcasagrande opened this issue May 8, 2023 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@ajcasagrande
Copy link
Contributor

🐞 Bug Report

Affected Services [REQUIRED]

Any service that uses secret update callback (device-onvif-camera)

Is this a regression?

No?

Description and Minimal Reproduction [REQUIRED]

  • Run EdgeX 3.x in non-secure mode
  • Run device-onvif-camera with at least 1 insecure secret "credentials001"
  • Set logging to DEBUG mode
  • Go to consul and modify the values of "credentials001"
  • Verify in the logs that the secret callback WAS called
  • Go to consul and delete the whole folder for "credentials001"
  • Verify in the logs that the secret callback was NOT called

🔥 Exception or Error





🌍 Your Environment

Deployment Environment:
Docker + Dev Hybrid

EdgeX Version [REQUIRED]:
main 3.x

Anything else relevant?

Here is what I believe is happening:

This is due to the common config. The way that MergeMaps works for the InsecureSecrets causes fields that are no longer present to not be deleted. This is because the software does not keep track of where the secret came from, so it is impossible to know whether or not it should be deleted from the map.

Right now the workaround is to restart the service so that way it never receives the deleted InsecureSecret.

@ajcasagrande ajcasagrande added the bug Something isn't working label May 8, 2023
@github-project-automation github-project-automation bot moved this to New Issues in Technical WG May 8, 2023
@lenny-goodell lenny-goodell added this to the Minnesota milestone May 8, 2023
@cloudxxx8 cloudxxx8 moved this from New Issues to Release Backlog in Technical WG May 9, 2023
@cloudxxx8 cloudxxx8 moved this from Release Backlog to New Issues in Technical WG May 9, 2023
@cloudxxx8 cloudxxx8 moved this from New Issues to Icebox in Technical WG May 17, 2023
@lenny-goodell
Copy link
Member

Note that this applies to any maps in the Writable section. Current code only handles values that changed or map items added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Icebox
Development

No branches or pull requests

2 participants