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

HttpClient.create() shares SSL configuration across multiple instances #407

Closed
mp911de opened this issue Aug 2, 2018 · 6 comments
Closed
Labels
type/bug A general bug
Milestone

Comments

@mp911de
Copy link

mp911de commented Aug 2, 2018

Expected behavior

Calling HttpClient.create().secure(Consumer) (and HttpClient.create()) should apply SSL config only for the underlying instance independently from earlier client instances.

Actual behavior

HttpClient.create().secure(…) does not apply SSL context (from SslContextBuilder) to the newly created instance.

Using a dedicated ConnectionProvider (such as ConnectionProvider.fixed()) mitigates the issue.

Steps to reproduce

HttpClient client = HttpClient.create();
// Interact with client to initialize connection provider.

SslContextBuilder sslContextBuilder = SslContextBuilder.forClient();

// provide a specific SSL config such as client certificates.
HttpClient otherClient = HttpClient.create().secure(builder -> {
			builder.sslContext(sslContextBuilder);
});

// access TLS-secured resource

Reactor Netty version

0.8.0.M1

JVM version (e.g. java -version)

1.8.0

OS version (e.g. uname -a)

MacOS X

@smaldini smaldini added the type/bug A general bug label Aug 14, 2018
@smaldini smaldini added this to the 0.8.x Backlog milestone Sep 7, 2018
@smaldini smaldini modified the milestones: 0.8.x Backlog, 0.8.1.RELEASE Sep 27, 2018
@smaldini
Copy link
Contributor

Probably Related to #90

@violetagg
Copy link
Member

@mp911de Can you test PR #449

@mp911de
Copy link
Author

mp911de commented Oct 4, 2018

The issue still persists. Looking at the patch, the code compares host and port to decide whether the pool is suitable. In my case, I'm providing a different SSL configuration that uses the same host/port.

violetagg added a commit that referenced this issue Oct 4, 2018
violetagg added a commit that referenced this issue Oct 4, 2018
violetagg added a commit that referenced this issue Oct 18, 2018
Take into account SSL, Proxy, Logging, Compression and Protocol
when generating the pooled connection key
violetagg added a commit that referenced this issue Oct 25, 2018
Take into account SSL, Proxy, Logging, Compression and Protocol
when generating the pooled connection key
@violetagg
Copy link
Member

@mp911de Can you test the latest snapshot?

@mp911de
Copy link
Author

mp911de commented Oct 26, 2018

Thanks a lot for the fix and for solving the issue.

@violetagg
Copy link
Member

thanks 👍

violetagg added a commit that referenced this issue Feb 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants