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

AWS SDK operations in Ethereum account "Delete" and "Destroy" are inappropriate #595

Open
amane-c opened this issue Apr 9, 2023 · 0 comments

Comments

@amane-c
Copy link

amane-c commented Apr 9, 2023

Describe the bug

In the case of using AWS KMS,

Delete Ethereum Account is not implemented as soft deletion, but schedule hard deletion.
https://consensys.github.io/quorum-key-manager/#tag/Ethereum/paths/~1stores~1%7BstoreName%7D~1ethereum~1%7Baddress%7D/delete

Destroy Ethereum Account ignores hard deletion and only removes the entry in the database.
https://consensys.github.io/quorum-key-manager/#tag/Ethereum/paths/~1stores~1%7BstoreName%7D~1ethereum~1%7Baddress%7D~1destroy/delete

Configuration

We are using main(d509f52) version of QKM and AWS KMS configuration.

Steps to reproduce

  1. Execute "Delete Ethereum Account"
  2. Check AWS CloudTrail

Actual result

To find ScheduleKeyDeletion

Expected result

To find DisableKey

Additional context

In the following part, soft deletion("DeleteKey()") uses "ScheduleKeyDeletion".
https://github.com/ConsenSys/quorum-key-manager/blob/d509f52d9ab3d6476327415a6d276f4e570b50e2/src/infra/aws/client/kms.go#L143

But, ScheduleKeyDeletion is a destructive operation, not soft deletion. "DeleteKey()" should use "DisableKey".
https://docs.aws.amazon.com/kms/latest/APIReference/API_ScheduleKeyDeletion.html

In addition, "Destroy()" should be implemented as the current implementation of "Delete()".
The following part ignores the deletion operation.
https://github.com/ConsenSys/quorum-key-manager/blob/d509f52d9ab3d6476327415a6d276f4e570b50e2/src/stores/store/keys/aws/aws.go#L230

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

1 participant