-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Fix coordinator/overlord redirects when TLS is enabled #5037
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
5e43402
to
6437f4c
Compare
currentKnownLeader.set(leaderUrl); | ||
return leaderUrl; | ||
} | ||
catch (MalformedURLException ex) { |
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.
may be log here what it found ?
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.
added a log
return null; | ||
} | ||
|
||
String location = StringUtils.format("%s://%s%s", scheme, leader, requestURI); |
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.
Can we document somewhere that requests sent using "http" scheme would be redirected to "https" if both TLS/non-TLS ports are enabled?
This might be surprising to a user if the client being used can't handle HTTPS and fails because of the scheme change.
Ideally I think the redirect should follow the same scheme as the original request, but that doesn't seem straightforward to implement since the leaderID always prefers TLS if it's there. Any ideas on whether we could accomplish that in a simple way?
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.
yeah, ideally http should get redirected to http but that is not simple to implement. however fixing it, so that it atleast redirects to a valid url, is necessary. so the upgrade path is to enable clients so that they can handle both http and https... then upgrade druid and enable both http and https ports... then change client configs to refer to druid with https and then disable http port on druid servers.
I'll update the tls specific doc page.
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.
updated the doc
👍 @pjain1 Did you have any more comments on this? |
@himanshug Can you do the backport of this? |
* Fix coordinator/overlord redirects when TLS is enabled * address review comment * fix UTs * workaround to not ignore URL instance to fix the teamcity build * update tls doc
@himanshug cool, I added a note to the 0.11.0 release notes in "Upgrading coordinators and overlords" regarding the incompatibilities, can you review that section? |
@jon-wei changed slightly to make it clear that overlords and coordinators can be upgraded indepedent of each other. thanks. |
…pache#5068) * Fix coordinator/overlord redirects when TLS is enabled * address review comment * fix UTs * workaround to not ignore URL instance to fix the teamcity build * update tls doc
Fixes ##5033
Incompatibilities:
This patch requires that coordinators/overlords are upgraded together that is no two coordinators or overlords should be running different versions of Druid code while upgrade.