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

Remove redundant SSL work from client config creation #1923

Merged
merged 9 commits into from
Apr 25, 2023

Conversation

jpcorreia99
Copy link
Contributor

Before this PR

Currently, we do redundant work when building the client configuration.

The call to ClientConfigurations.of already initializes a full SSLContext, however an SSLContext is initialized again here since we want to optionally use a security provider and also control cache size.

This PR uses the new overloaded ClientConfigurations.of() method that accepts a TrustContextFactory. This interface allows us to fully control how SSL related classes are provided and removes the redundant SSL/IO work that was being done in the initial of() call.

After this PR

==COMMIT_MSG==
Use TrustContextFactory when building ClientConfiguration instead of overwriting already performed SSL work.
==COMMIT_MSG==

@changelog-app
Copy link

changelog-app bot commented Apr 25, 2023

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Use TrustContextFactory when building ClientConfiguration instead of overwriting already performed SSL work.

Check the box to generate changelog(s)

  • Generate changelog entry

@@ -16,6 +16,7 @@ dependencies {
implementation 'com.google.errorprone:error_prone_annotations'
implementation 'com.google.guava:guava'
implementation 'com.palantir.conjure.java.runtime:keystores'
implementation 'com.palantir.conjure.java.api:ssl-config'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Had to add this line as CI was failing because of implicit dependencies

@bulldozer-bot bulldozer-bot bot merged commit be44426 into develop Apr 25, 2023
@bulldozer-bot bulldozer-bot bot deleted the jcorreia/redundantSSLInitializationRemoval branch April 25, 2023 16:44
@svc-autorelease
Copy link
Collaborator

Released 3.82.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants