feat(composer)! avoid holding private key in env var#1074
Merged
Conversation
SuperFluffy
reviewed
May 15, 2024
Contributor
There was a problem hiding this comment.
Agree with the changes.
Can we also put the SigningKey behind a https://docs.rs/secrecy/0.8.0/secrecy/struct.Secret.html? So that we don't accidentally leak it if someone decides to debug-print executor or the submitfut? Right now SigningKey implements Debug and happily leaks its contents.
aajimal
approved these changes
May 16, 2024
Contributor
Author
|
@SuperFluffy - as agreed, I put the signing key in a newtype in 3515ac0 and replaced all usages of the original type. |
SuperFluffy
approved these changes
May 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR changes the configuration env vars for composer to not hold the contents of the private key for signing sequencer transactions.
Background
It's undesirable to have the contents of a private key in an env var.
Changes
Changed the existing env var to hold a path to a hex-encoded private key file.
Testing
Modified existing tests, and ran smoke test using local build of composer.
Breaking Changelist
ASTRIA_COMPOSER_PRIVATE_KEYASTRIA_COMPOSER_PRIVATE_KEY_FILERelated Issues
Closes #993.