-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fix proxy restart EAB issue #829
Fix proxy restart EAB issue #829
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
📝 WalkthroughWalkthroughThe pull request introduces significant changes to the Possibly related PRs
Suggested reviewers
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (1)
- plane/src/proxy/cert_manager.rs (7 hunks)
🧰 Additional context used
🪛 ast-grep
plane/src/proxy/cert_manager.rs
[warning] 272-273: Dangerously accepting invalid TLS
Context: reqwest::Client::builder()
.danger_accept_invalid_certs(true)
Note: [CWE-295]: Improper Certificate [REFERENCES]
- https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.danger_accept_invalid_hostnames
- https://docs.rs/reqwest/latest/reqwest/struct.ClientBuilder.html#method.danger_accept_invalid_certs
🔇 Additional comments (1)
plane/src/proxy/cert_manager.rs (1)
190-203
: Verify the handling whenacme_config
isNone
In the
set_request_sender
method, the refresh loop is initiated only ifacme_config
isSome
. If it'sNone
, the certificate renewal process will not start, which may affect the application's ability to obtain or refresh certificates.Ensure that the application can function correctly without the certificate refresh loop when
acme_config
isNone
. If this is intended, consider documenting this behavior to avoid confusion.
Although ACME accounts are essentially disposable, it's better to re-use them where possible, in particular when dealing with EAB (as we do with Google Certificate Manager), where an account can only be created once per EAB key set.
To date, we have done this eagerly by creating the ACME account when the Plane proxy process starts. The problem with this approach is that it creates an unnecessary point of failure when the ACME account fails to create but the proxy is otherwise ready to go.
This moves account creation into the refresh loop, but makes it lazy such that it only happens once per instance and then is remembered for future certificate refreshes. This way, if we start the proxy with a valid certificate already in place, it won't attempt to fetch the account immediately.