-
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
Split SslContextFactory into Client and Server #3464
Comments
almost think having a mode (CLIENT | SERVER) on SslContextFactory makes more sense. or what about a |
Meh, mode and toClient/toServer wouldn't help address the warnings tho. |
@joakime exactly, hence the idea of subclassing to make the behavior overridable. |
What behaviour for current users that are using the class directly? |
@gregw the current behavior. |
Introduced SslContextFactory subclasses Client and Server. Replaced all usages of SslContextFactory with either Client or Server as required. Refactored configuration checking so that warnings are not emitted when non necessary. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Opened PR #3480 |
Updated documentation referencing the 2 new subclasses. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
…xtfactory Issue #3464 - Split SslContextFactory into Client and Server
Fixed a couple of places where Server was used instead of Client. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Merged, closing issue. |
Fixed instanceof check to maintain backwards compatibility. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
Remaining Issues: - JSP compilation failure caused by: apache/tomcat@224fb6c#diff-ef02fd9c3f90ca4838d3cdaa051489556eca75d537fc396022e0ed456c24d895R329 - `WebSocketClientConnectionHandler.onConnect` assumes that `session.getRemoteAddress()` supplies an `InetSocketAddress` which might not always be true. What's the best approach in our context? Fixed in this commit: - Websocket server Maven artifact renamed from `websocket-server` to `websocket-jetty-server` - `WebSocketServlet` renamed to `JettyWebSocketServlet` - `WebSocketServletFactory` renamed to `JettyWebSocketServletFactory` See: https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#pg-migration-94-to-10 - `GzipHandler` is no longer part of `ServletContextHandler` jetty/jetty.project#4765 - Renamed `setWebInfClassesDirs` to `setWebInfClassesResources` jetty/jetty.project#4506 - Split `SslContextFactory` into Client and Server jetty/jetty.project#3464
Remaining Issues: - JSP compilation failure caused by: apache/tomcat@224fb6c#diff-ef02fd9c3f90ca4838d3cdaa051489556eca75d537fc396022e0ed456c24d895R329 - `WebSocketClientConnectionHandler.onConnect` assumes that `session.getRemoteAddress()` supplies an `InetSocketAddress` which might not always be true. What's the best approach in our context? Fixed in this commit: - Websocket server Maven artifact renamed from `websocket-server` to `websocket-jetty-server` - `WebSocketServlet` renamed to `JettyWebSocketServlet` - `WebSocketServletFactory` renamed to `JettyWebSocketServletFactory` See: https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#pg-migration-94-to-10 - `GzipHandler` is no longer part of `ServletContextHandler` jetty/jetty.project#4765 - Renamed `setWebInfClassesDirs` to `setWebInfClassesResources` jetty/jetty.project#4506 - Split `SslContextFactory` into Client and Server jetty/jetty.project#3464
Remaining Issues: - JSP compilation failure caused by: apache/tomcat@224fb6c#diff-ef02fd9c3f90ca4838d3cdaa051489556eca75d537fc396022e0ed456c24d895R329 - `WebSocketClientConnectionHandler.onConnect` assumes that `session.getRemoteAddress()` supplies an `InetSocketAddress` which might not always be true. What's the best approach in our context? Fixed in this commit: - Websocket server Maven artifact renamed from `websocket-server` to `websocket-jetty-server` - `WebSocketServlet` renamed to `JettyWebSocketServlet` - `WebSocketServletFactory` renamed to `JettyWebSocketServletFactory` See: https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#pg-migration-94-to-10 - `GzipHandler` is no longer part of `ServletContextHandler` jetty/jetty.project#4765 - Renamed `setWebInfClassesDirs` to `setWebInfClassesResources` jetty/jetty.project#4506 - Split `SslContextFactory` into Client and Server jetty/jetty.project#3464
Following discussion on #3454 (comment), the proposal is to add 2 subclasses of
SslContextFactory
, namelySslContextFactory.Client
andSslContextFactory.Server
and each subclass overrides both the default configuration and the warning it emits.Currently there is only one set of defaults, and it's not possible to configure them in a way that work well for both client and server.
For example, the default is
endpointIdentificationAlgorithm="HTTPS"
which is good for the client. However, when using client certificate authentication on the server, this default setting is not good and needs to be changed tonull
, butnull
emits a warning at server startup which is not ideal and may confuse people.@gregw thoughts?
The text was updated successfully, but these errors were encountered: