Skip to content
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

Support SSLParameters on blaze-server #3132

Merged
merged 4 commits into from Jan 31, 2020
Merged

Conversation

rossabaker
Copy link
Member

@rossabaker rossabaker commented Jan 30, 2020

  • Deprecates withSSLContext, which takes a SSLClientAuthMode, which is only one of many parameters a user may wish to configure.

  • Adds withSslContext, which is like withSSLContext without the client auth flag.

  • Adds withSslContextAndParameters, which takes an SSLParameters. This can be constructed conveniently from an fs2.io.tls.TLSParameters, though we provide no convenience overload.

  • Adds withoutSsl to disable it.

Addresses #2499 for blaze. Tomcat and Jetty implementations will be their own PRs.


/** Configures the server with TLS, using the provided `SSLContext` and its
* default `SSLParameters` */
def withSslContext(sslContext: SSLContext): Self =
Copy link
Member Author

@rossabaker rossabaker Jan 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to call this TLS, which would match modern usage and ember, but is confusing in terms of the raw Java API.

@rossabaker rossabaker added the enhancement label Jan 30, 2020
@rossabaker
Copy link
Member Author

@rossabaker rossabaker commented Jan 30, 2020

I'd also like to deprecate withSSL and its incomplete set of five parameters, but it's a very long description how to migrate.

@rossabaker
Copy link
Member Author

@rossabaker rossabaker commented Jan 30, 2020

Not entirely proud of what happened in the examples after deprecating withSSL. I don't really want us in the business of convenience wrappers for SSL implementations, but we did make the ergonomics worse.

It also occurs to me the examples are too DRY. They're easier for us to maintain, but less insightful to the new user.

hamnis
hamnis approved these changes Jan 31, 2020
@aeons aeons merged commit 67bfab5 into http4s:master Jan 31, 2020
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants