diff --git a/pkg/secrets/localstore.go b/pkg/secrets/localstore.go index e87a7cc..1ae9b91 100644 --- a/pkg/secrets/localstore.go +++ b/pkg/secrets/localstore.go @@ -103,7 +103,9 @@ func (l *LocalSecretStore) ListSecrets() (map[string]string, error) { // RemoveSecretByID removes the specified secretID stored locally func (l *LocalSecretStore) RemoveSecretByID(secretID string) { + l.mu.RLock() delete(l.Secrets, secretID) + l.mu.RUnlock() } // openStore tries to create or open the LocalSecretStore based on the environment diff --git a/pkg/secrets/staticstore.go b/pkg/secrets/staticstore.go index 85c2d68..405f58b 100644 --- a/pkg/secrets/staticstore.go +++ b/pkg/secrets/staticstore.go @@ -28,3 +28,7 @@ func (s *StaticStore) ListSecrets() (map[string]string, error) { "static_creds": fmt.Sprintf(`{"username":"%s","password":"%s"}`, s.Username, s.Password), }, nil } + +func (s *StaticStore) RemoveSecretByID(secretID string) { + // Nothing to do here, since nothing is being stored +}