-
Notifications
You must be signed in to change notification settings - Fork 3
Persistent TLS certificates #37
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
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.
Pull Request Overview
This PR introduces persistent TLS certificate management for the receiver-proxy component by adding new CLI flags, updating the proxy configuration, and modifying the test suite to accommodate these changes.
- Introduces the flags cert-path and cert-key-path in receiver-proxy’s main package.
- Modifies the proxy constructor to use utils_tls.GetOrGenerateTLS for certificate management.
- Updates tests to supply file paths for certificates.
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
proxy/receiver_proxy_test.go | Updated test helper functions to include certificate file path args. |
proxy/receiver_proxy.go | Added CertPath and CertKeyPath fields and updated TLS certificate logic. |
cmd/receiver-proxy/main.go | Registered new CLI flags and updated main logic to validate TLS file paths. |
Files not reviewed (1)
- go.mod: Language not supported
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.
I approve with comment about test.
This pull request introduces support for specifying file paths for storing generated TLS certificates and keys in the
receiver-proxy
component. It also updates the test suite to accommodate these changes.New mandatory orderflow-proxy-receiver flags / env vars:
--cert-path
/CERT_PATH
--cert-key-path
/CERT_KEY_PATH
Below are the most important changes grouped by theme:
TLS Certificate Management:
cert-path
andcert-key-path
to specify file paths for storing TLS certificates and keys incmd/receiver-proxy/main.go
. These flags are validated to ensure they are set. [1] [2] [3] [4]ReceiverProxyConfig
inproxy/receiver_proxy.go
to includeCertPath
andCertKeyPath
fields.NewReceiverProxy
function to useutils_tls.GetOrGenerateTLS
, which either retrieves existing certificates from the specified paths or generates new ones.Dependency Update:
github.com/flashbots/go-utils
dependency ingo.mod
to a newer version.Test Suite Updates:
proxy/receiver_proxy_test.go
to passcertPath
andcertKeyPath
arguments, ensuring the new certificate management logic is tested. [1] [2] [3] [4] [5]Needs flashbots/go-utils#44 -- should merge that one first and then tag and update the dep.