-
Notifications
You must be signed in to change notification settings - Fork 24
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: private keys support for testing #159
base: master
Are you sure you want to change the base?
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.
Great work. Left some suggestions
@@ -60,7 +60,7 @@ impl WholeStack { | |||
let db = start_db().await?; | |||
|
|||
let committer = start_committer( | |||
logs, | |||
true, |
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.
probably left from debugging
true, | |
logs, |
let blob_signer = if let Some(blob_key) = keys.blob { | ||
let signer = match blob_key { | ||
L1Key::Kms(key) => { | ||
Signer::make_aws_signer(aws_client.as_ref().expect("is set"), key).await? | ||
} | ||
L1Key::Private(key) => Signer::make_private_key_signer(&key)?, | ||
}; | ||
Some(signer) | ||
} else { | ||
None | ||
}; | ||
|
||
let l1_key = keys.main; | ||
let main_signer = match l1_key { | ||
L1Key::Kms(key) => Signer::make_aws_signer(&aws_client.expect("is set"), key).await?, | ||
L1Key::Private(key) => Signer::make_private_key_signer(&key)?, | ||
}; |
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 a bit shorter
let blob_signer = if let Some(blob_key) = keys.blob { | |
let signer = match blob_key { | |
L1Key::Kms(key) => { | |
Signer::make_aws_signer(aws_client.as_ref().expect("is set"), key).await? | |
} | |
L1Key::Private(key) => Signer::make_private_key_signer(&key)?, | |
}; | |
Some(signer) | |
} else { | |
None | |
}; | |
let l1_key = keys.main; | |
let main_signer = match l1_key { | |
L1Key::Kms(key) => Signer::make_aws_signer(&aws_client.expect("is set"), key).await?, | |
L1Key::Private(key) => Signer::make_private_key_signer(&key)?, | |
}; | |
let blob_signer = match keys.blob { | |
Some(L1Key::Kms(key)) => { | |
Some(Signer::make_aws_signer(aws_client.as_ref().expect("is set"), key).await?) | |
} | |
Some(L1Key::Private(key)) => Some(Signer::make_private_key_signer(&key)?), | |
None => None, | |
}; | |
let main_signer = match keys.main { | |
L1Key::Kms(key) => Signer::make_aws_signer(&aws_client.expect("is set"), key).await?, | |
L1Key::Private(key) => Signer::make_private_key_signer(&key)?, | |
}; |
closes: #160
We'll still be using KMS in our e2e tests so that we remain as close to prod as possible.
The bridge repo can now specify their keys as "Private(key_here)" while we'll configure the keys as "Kms(arn_here)".