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

node: add amazon kms and benchmark signers #4168

Merged

Conversation

pleasew8t
Copy link
Contributor

Amazon KMS Guardian Signer

This PR adds an Amazon AWS KMS Guardian signer, allowing observations to be signed using KMS! The new signer can be used by specifying the ARN of the KMS key to use, through the --guardianSignerUri commandline argument, as follows:

  • --guardianSignerUri=amazonkms://<ARN>

NOTE For the best possible performance, it is recommended that the Guardian be run from an EC2 instance that is in the same region as the KMS key.

The KMS key's spec should be ECC_SECG_P256K1, and should be enabled for signing. In order for the Guardian to authenticate against the KMS service, one of two options are available:

  • Create new API keys in the AWS console that are permissioned to use the KMS key for signing, and add the keys to the EC2 instance's ~/.aws/credentials file. (example here).
  • Create a role that is permissioned to use the KMS key and attach that role to the Guardian EC2 instance.

Benchmark Signer

The PR also includes a benchmark signer, which wraps any other signer, logging signing and verification latency to prometheus histograms. External signing services might at times introduce unwanted latency, and if an event occurs where observation processing is particularly slow, the histograms would provide insight into whether or not the signing service is to blame.

NOTE
This is a redo of a previous pull request, which Pires spent time looking at. Below are key points following that review that informs the current state of the code:

  • Contexts should be supplied to signing, verification and public key retrieval, as these functions potentially interact with 3rd party services that could timeout or block indefinitely.
  • The GuardianSigner constructor (NewGuardianSignerFromUri) accepts a Context, as the new signer might need to interact with the 3rd party service to validate configurations (such as the AmazonKms signer). A different approach could be to have the constructor define its own context, to avoid the necessity of passing a context to it.

@pleasew8t pleasew8t marked this pull request as ready for review November 22, 2024 07:31
bruce-riley
bruce-riley previously approved these changes Nov 27, 2024
pires
pires previously approved these changes Dec 2, 2024
Copy link
Collaborator

@pires pires left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been involved in reviewing this before this PR was open so I want to signal I think this is in a good shape to be seriously considered for merge by other more seasoned maintainers.
That said, @andreclaro and xLabs Nodes team will be soaking this in testnet and report back 🙏🏻

node/pkg/guardiansigner/benchmarksigner.go Show resolved Hide resolved
node/pkg/guardiansigner/amazonkms.go Outdated Show resolved Hide resolved
node/pkg/guardiansigner/amazonkms.go Show resolved Hide resolved
node/pkg/guardiansigner/amazonkms.go Outdated Show resolved Hide resolved
node/pkg/guardiansigner/amazonkms.go Outdated Show resolved Hide resolved
node/cmd/guardiand/adminclient.go Show resolved Hide resolved
@pleasew8t pleasew8t force-pushed the add-kms-and-benchmark-signers branch from 6290322 to d3bead1 Compare December 12, 2024 11:16
@pleasew8t pleasew8t merged commit 996dabe into wormhole-foundation:main Dec 12, 2024
24 checks passed
kakucodes pushed a commit that referenced this pull request Dec 18, 2024
cosmwasm(cw_wormhole): integration tests- initial implementation

chore: adding additional vaa parsing tests

cosmwasm: added cw_wormhole integration tests and some code cleanup

cosmwasm: reverted contract changes

Update 0012_ibc_generic_messaging.md with permissionless channel creation information (#4167)

The `wormhole-ibc-receiver` contract contains an allowlist of Wormhole chain ID to channel mappings (other side of Cosmos chain). The allowlist is not used when receiving a packet because we don't want to handle the case of a token transfer failure on the other side. Instead, we just emit the message and ignore it in the IBC watcher. I am just updating the documentation to reflect this.

node: governor token list update

tilt: aptos multi-platform support

tilt: sui multi-platform support

tilt: node multi-platform support

tilt: solana-test-validator multi-platform support

tilt: smaller sui image

Add coin gecko pro API usage for the governor (#4025)

* Add coin gecko pro API usage for the governor

* Add in missing parameter for node test

* Fix missing parameter in publicrpcserver_test.go

* Add in NIT fixes

* Change CLI description

* Reorder error message so that the important part is not truncated in the logs

* Remove network test from unit test. Plan on creating a Github action cron action for this instead

* Remove unnecessary '&' from URL path

* Add in new parameters for gov from rebase

* Fix regression on query creation

* Add coin gecko pro API usage for the governor

* Add in NIT fixes

* Remove network test from unit test. Plan on creating a Github action cron action for this instead

---------

Co-authored-by: Maxwell Dulin <strikeout@maxwells-mbp.lan>
Co-authored-by: Maxwell Dulin <strikeout@Maxwells-MacBook-Pro.local>

node: add amazon kms and benchmark signers (#4168)

* add kms and benchmark signers

* include context during guardiansigner calls

* add error counters and address review comment

* address pr comments

* address pr comments

---------

Co-authored-by: pleasew8t <jason@asymmetric.re>

wormchain: add ibc_receiver_test and ict workflow (#4155)

Update CODEOWNERS (#4151)

sdk: worldchain mainnet SR entry. (#4188)

cosmwasm: refactored the to guardianAddress logic

wormchain: lower ict setup params to improve stability
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

Successfully merging this pull request may close these issues.

4 participants