fix: don't apply Coder TLS alternate hostname to JetBrains IDE feed client#311
Merged
Merged
Conversation
…lient The IdeFeedManager fetches IDE metadata from data.services.jetbrains.com but was reusing the default Coder OkHttp client, which applies the user-configured TLS alternate hostname. That setting is meant for the Coder deployment and should not affect requests to JetBrains. Introduce CoderHttpClientBuilder.defaultWithoutTlsAlternateHostname and use it from IdeFeedManager so the JetBrains feed client verifies the real hostname.
| if (feedService != null) return@lazy feedService | ||
|
|
||
| val okHttpClient = CoderHttpClientBuilder.default(context) | ||
| val okHttpClient = CoderHttpClientBuilder.defaultWithoutTlsAlternateHostname(context) |
There was a problem hiding this comment.
Seems kinda hacky. Limited knowledge of the plugin, couldn't we add a separate client builder altogether and use that instead of overloading the CoderHttpClient Builder?
Collaborator
Author
There was a problem hiding this comment.
Definitely - we can. Let me play a bit with the code but I think the tradeoff would be a bit of duplication around the interceptor setup.
Collaborator
Author
There was a problem hiding this comment.
Done. I think the result is quite nice, and I managed to avoid duplication.
CoderHttpClientBuilder is for Coder endpoints — having it grow a "without TLS alternate hostname" variant just to serve the JetBrains data services feed was a smell. Move the JetBrains client construction into IdeFeedManager where it belongs, with only what it actually needs: user-agent, logging, proxy, retry. No Coder TLS context or hostname verifier touches that traffic anymore.
code-asher
approved these changes
May 28, 2026
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.
The IdeFeedManager fetches IDE metadata from data.services.jetbrains.com but was reusing the default Coder OkHttp client which is for Coder endpoints and it applies the user-configured TLS alternate hostname. That setting is meant for the Coder deployment and should not affect requests to JetBrains.
The fix moves the JetBrains client construction into IdeFeedManager where it belongs, with only what it actually needs: user-agent, logging, proxy, retry. No Coder TLS context or hostname verifier touches that traffic anymore.