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

Hard delete ethereum accounts not working #573

Open
capri-san opened this issue Aug 30, 2022 · 1 comment
Open

Hard delete ethereum accounts not working #573

capri-san opened this issue Aug 30, 2022 · 1 comment

Comments

@capri-san
Copy link

capri-san commented Aug 30, 2022

Describe the bug

We are testing QKM and we've found that the operation of hard delete (/destroy API endpoint) with Hashicorp Vault is not working, while other operations as list, creation and soft delete works properly.

Configuration

We are using last version of QKM: "consensys/quorum-key-manager:latest"

Steps to reproduce

  1. Run QKM properly connected to Hashicorp Vault
  2. Issue: `curl -X DELETE 'http://localhost:8080/stores/my-ethereum-store/ethereum/0x<EXISTING_ACCOUNT_TO_DELETE>/destroy'

Actual result

{"message":"ST100: failed to get deleted account","code":"ST100"}

Expected result

A message indicating that the account was deleted

Additional context

Logs

The QKM log shows the following:

key-manager_1  | 2022-08-30T12:13:36.806Z       ERROR   stores  failed to get deleted account   {"store_id": "my-ethereum-store", "address": "0x<EXISTING_ACCOUNT_TO_DELETE>", "error": "ST100: resource not found"}

Obviosly, the account does exist:

$ curl -X GET 'http://localhost:8080/stores/my-ethereum-store/ethereum/0x<EXISTING_ACCOUNT_TO_DELETE>'
# response
{"publicKey":"0x04f703a9fe6cba9e9f7bf639da7709179766948291a0630956a4521dde64e1642f7735db7b6d2eb090097528c56172fe4a835dc3e0778fd3ada99edb498cb8c454","compressedPublicKey":"0x02f703a9fe6cba9e9f7bf639da7709179766948291a0630956a4521dde64e1642f","createdAt":"2022-08-30T08:06:55.731586Z","updatedAt":"2022-08-30T08:06:55.731586Z","keyId":"my-eth-account","tags":{"property1":"string","property2":"string"},"address":"0x<EXISTING_ACCOUNT_TO_DELETE>","disabled":false}
@amane-c
Copy link

amane-c commented Apr 9, 2023

You might find a successful response of destroy, once you operate soft deletion.

It seems that destroy does not do before soft deletion.
https://github.com/ConsenSys/quorum-key-manager/blob/d509f52d9ab3d6476327415a6d276f4e570b50e2/src/stores/connectors/ethereum/destroy.go#L22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants