-
Notifications
You must be signed in to change notification settings - Fork 17
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
feat: store user keys in GCP Datastore #103
Conversation
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.
Looks cool!
@@ -57,6 +54,12 @@ enum Cli { | |||
default_value("https://api.kitwallet.app") | |||
)] | |||
account_lookup_url: String, | |||
/// GCP project ID | |||
#[arg(long, env("MPC_RECOVERY_GCP_PROJECT_ID"))] |
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.
Is it the same ID I have added in my PR? Let's delete it, if so.
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.
No, that's the GCP project id (currently we use pagoda-discovery-platform-dev
). It's needed for integration tests where I am using an emulated GCP project with a different name.
Let's not merge this until Datastore is up on our GCP project so that we don't break the dev environment (assuming other teams still depend on it for testing their stuff). Also, should probably come in after #97 as that is a more substantial change, and I want to minimize the number of conflicts to resolve. |
@DavidM-D could you make sure that whatever I wrote in |
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.
The sign node stuff looks good to me
Err(err) => { | ||
tracing::error!(?err); | ||
( | ||
StatusCode::INTERNAL_SERVER_ERROR, |
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.
Nit: this is probably a bad request, not an internal server error
|
||
let combined_pub = to_dalek_combined_public_key(ctx.pk_set).unwrap(); | ||
let account_id = get_test_claims().get_internal_account_id(); |
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.
This change makes sense, previously we were just checking against the node signatures, which were identical to the signing signatures
This PR makes the leader node generate random private keys for users and store them in GCP Datastore. The code is quite hefty mainly because of the amount of boilerplate I had to write for protobuf (de)serialization.