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

feat: private keys support for testing #159

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

segfault-magnet
Copy link
Contributor

@segfault-magnet segfault-magnet commented Nov 19, 2024

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)".

@segfault-magnet segfault-magnet self-assigned this Nov 19, 2024
@segfault-magnet segfault-magnet marked this pull request as ready for review November 19, 2024 14:40
Copy link
Contributor

@hal3e hal3e left a 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,
Copy link
Contributor

Choose a reason for hiding this comment

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

probably left from debugging

Suggested change
true,
logs,

Comment on lines +152 to +168
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)?,
};
Copy link
Contributor

Choose a reason for hiding this comment

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

is a bit shorter

Suggested change
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)?,
};

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.

make the committer accept private keys for testing
2 participants