-
Notifications
You must be signed in to change notification settings - Fork 4
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
Problem: zksync eth_signer private key loading security concerns #44
Conversation
2ad4540
to
51297c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall lgtm
core/node/node_framework/src/implementations/layers/pk_signing_eth_client.rs
Outdated
Show resolved
Hide resolved
core/node/node_framework/src/implementations/layers/pk_signing_eth_client.rs
Outdated
Show resolved
Hide resolved
Co-authored-by: Calvin Lau <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, have a small question about the use of unwrap()
.
Merging this PR @JayT106 as an improvement, lets add mode in config such as |
Co-authored-by: Calvin Lau <[email protected]>
Co-authored-by: Calvin Lau <[email protected]>
Co-authored-by: Calvin Lau <[email protected]>
Solution: trying to add a gCloud KMS signer into SigningEthClientLayer, using google KMS to manage the private key and stores it in the hardware.
There are three environment variables need to be setup before using the Google KMS signer
GOOGLE_APPLICATION_CREDENTIALS - a service account credential file to allow server to access the google KMS services.
GOOGLE_KMS_OP_KEY_NAME - the KMS key path of the eth sender operator. For example:
The key path format is:
It needs to be matched with the google projects setup to able to access the keys in the google kms.
GOOGLE_KMS_OP_BLOB_KEY_NAME(optional) - the KMS key path of the eth sender blob operator.
Note
The zksync V25 start to introduce the node framework for setup the zk node. There for this PR is only for V24.2.0 on our tesetnet for testing purpose. Later on I will migrate it to the upstream and may using zksync config system instead of the environment variables.
Deployment
During the key setup during the network deployment, we can:
Once got keys in the KMS. We can attest/verify the key through the google cloud console.
For the network deploy we will need to setup the converted ethereum address relate to these keys and set into the L1 contracts.