-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Limit new UnsupportedOperationException to direct base class SslContextFactory usage #4385
Comments
Signed-off-by: Joakim Erdfelt <[email protected]>
Opened new PR #4386 |
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
The change is on purpose throwing to get users to update to use Having a keystore that needs SNI functionalities needs proper wrapping of the We had to err on the safer side on this one, and yes there were some behavior incompatibilities, but the change to make is trivial (just use |
As pointed out at #4326 (comment) @bentmann looking at the code you linked, https://github.com/dropwizard/dropwizard/blob/release/1.3.x/dropwizard-jetty/src/main/java/io/dropwizard/jetty/HttpsConnectorFactory.java#L599 That would not work for Server side SNI based certificates / keystore as it sits right now. |
Yes, "trivial" if one's app makes direct use of Jetty, not so much if one relies on external libraries for that and now has to juggle incompatibilities among patch versions. |
@bentmann If you don't use Jetty directly, don't you just need to upgrade your external library (which would have upgraded to a correct use of Jetty)? |
External libraries (like Dropwizard in our particular case) don't always consume newer versions of their dependencies in a timely manner. E.g. latest stable release of DW is 1.3.17 which natively depends on Jetty 9.4.18 (cf. https://github.com/dropwizard/dropwizard/blob/v1.3.17/dropwizard-bom/pom.xml#L25). |
Signed-off-by: Joakim Erdfelt <[email protected]>
I'd rather help DW to update their code to working SNI with @bentmann did you raise a DW issue yet that we can link? |
Signed-off-by: Joakim Erdfelt <[email protected]>
No, not yet. |
|
…ory-sni-noexception Issue #4385 - Limit new UnsupportedOperationException to direct SslContextFactory usage
The warning is issued at start up not at first request? What is the proposed alternative? |
@gregw with the changes introduced in #3863 we introduced a regression so that if a user used the base class #4325 aimed to fix that by throwing an exception earlier (at startup), rather than later (at runtime). I think this is the correct way to go. The changes in this issue avoid the early error (we know how much users care about warnings at startup - not!) and disable completely SNI processing when using the base class, leading to hard to debug issues for users that rely on SNI (that is now not working at all). The exception at startup has triggered an issue in libraries that were still using the base class, causing them to update to the new I think we should revert the changes introduced in this issue and keep the "throw at startup" behavior. |
@gregw it's not an NPE at startup, it's a NPE at runtime. |
Somebody is not describing something properly??? This PR changes |
+ Plus fleshing out the testcases more for Base / Client / Server with and without certificates that will trigger SNI requirement and ISE. Signed-off-by: Joakim Erdfelt <[email protected]>
…orted-exception-base-sni Issue #4385 - Reverting WARN log in favor of IllegalStateException
solr is having startup issues due to this change - https://issues.apache.org/jira/browse/SOLR-14105 - since multi domain certs are no longer supported by jetty it seems. |
@ttaranov multi domain certs are supported. Can you please open a new issue? Describe whether this is a client or server problem in Solr. Thanks! |
@sbordet well, it seems to be a strange issue where Solr calls itself internally on the server side at startup - https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/component/HttpShardHandlerFactory.java#L316 - and uses jetty's SslContextFactory.Client to setup ssl connection to itself, which seems like no longer allows using multi domain certs that actual server is setup with. |
@ttaranov please open a new issue - I'll tackle it tomorrow. |
This change seems to have broken creation of a HTTPS connector for those using
SslContextFactory
directly instead of itsServer
subclass, like https://github.com/dropwizard/dropwizard/blob/release/1.3.x/dropwizard-jetty/src/main/java/io/dropwizard/jetty/HttpsConnectorFactory.java#L599For a codepath that is merely "deprecated", this seems unexpected.
Originally posted by @bentmann in #4326
The text was updated successfully, but these errors were encountered: