Skip to content

fix: wire BraintrustConfig.sslContext into the API HTTP client#94

Merged
Andrew Kent (realark) merged 1 commit intomainfrom
feat/ssl-context-for-api-client
Apr 28, 2026
Merged

fix: wire BraintrustConfig.sslContext into the API HTTP client#94
Andrew Kent (realark) merged 1 commit intomainfrom
feat/ssl-context-for-api-client

Conversation

@dpguthrie
Copy link
Copy Markdown
Contributor

BraintrustConfig already accepted a custom SSLContext via its builder and applied it to the OTLP span exporter, but createDefaultHttpClient ignored it — leaving BraintrustApiClient always using the JVM default trust store. Customers with custom CAs or internal PKI hit certificate validation errors with no way to override them.

This came from customer feedback:

One additional issue I ran into on braintrust-sdk-java was around BraintrustApiClient SSL configuration. In our environment, we needed to customize the SSL context, but the current BraintrustApiClient abstraction did not seem to expose a straightforward way to inject or override it. This led to some certificate validation issues in our setup.

BraintrustConfig already accepted a custom SSLContext via its builder and
applied it to the OTLP span exporter, but createDefaultHttpClient ignored
it — leaving BraintrustApiClient always using the JVM default trust store.
Customers with custom CAs or internal PKI hit certificate validation errors
with no way to override them.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@realark
Copy link
Copy Markdown
Collaborator

thanks for submitting this Doug Guthrie (@dpguthrie) !

@realark Andrew Kent (realark) merged commit 92b9662 into main Apr 28, 2026
1 check passed
@realark Andrew Kent (realark) deleted the feat/ssl-context-for-api-client branch April 28, 2026 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants