-
Notifications
You must be signed in to change notification settings - Fork 19
feat: add TLS configuration support to Java SDK #1135
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1135 +/- ##
==========================================
- Coverage 80.36% 75.31% -5.05%
==========================================
Files 8 9 +1
Lines 4165 4477 +312
==========================================
+ Hits 3347 3372 +25
- Misses 818 1105 +287 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2be3aa8
to
c30ee0d
Compare
280026d
to
830f62b
Compare
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Change TlsConfig from Lombok @value to traditional class structure to match ClientOptions pattern and ensure proper JSON serialization Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
830f62b
to
82e5446
Compare
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive TLS configuration support to the Java SDK as well as updates in related components and tests. Key changes include:
- Adding a new TlsConfig class (with builder and static factory methods) to support custom CA certificates and mutual TLS.
- Updating the FliptClient and ClientOptions in the Java SDK to accept TLS configuration.
- Enhancing tests (Go, Rust, and Python) and documentation to showcase and verify TLS setup.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
test/main.go | Updated container configurations to mount TLS fixtures and set HTTPS environment variables. |
flipt-engine-ffi/src/lib.rs | Modified TLS configuration usage with a fallback error handling mechanism for the fetcher builder. |
flipt-engine-ffi/src/http.rs | Added a default implementation for HTTPFetcherBuilder. |
flipt-client-python/flipt_client/models.py | Added certificate file validation using conditional Pydantic validators. |
flipt-client-java/src/test/java/TestFliptClient.java | Added TLS configuration usage in test setup for secure connections. |
flipt-client-java/src/main/java/io/flipt/client/models/TlsConfig.java | Introduced the new TlsConfig class implementing various TLS setup options. |
flipt-client-java/src/main/java/io/flipt/client/models/ClientOptions.java | Extended ClientOptions to include TLS configuration. |
flipt-client-java/src/main/java/io/flipt/client/FliptClient.java | Integrated TLS configuration into client instantiation and examples. |
flipt-client-java/README.md | Updated documentation to include examples and explanations for TLS configuration. |
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
Signed-off-by: Mark Phelps <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
…t-sdks into feat/go-tls * 'feat/go-tls' of https://github.com/flipt-io/flipt-client-sdks: feat: add TLS configuration support to Java SDK (#1135)
* 'main' of https://github.com/flipt-io/flipt-client-sdks: feat: add TLS configuration support to Ruby SDK (#1136) feat: add TLS configuration support to Java SDK (#1135)
* feat: add TLS configuration support to Java SDK Signed-off-by: Mark Phelps <[email protected]> * chore: fmt java Signed-off-by: Mark Phelps <[email protected]> * chore: update java tests to use https Signed-off-by: Mark Phelps <[email protected]> * chore: update java test params for https Signed-off-by: Mark Phelps <[email protected]> * chore: add debug info for failing tests Signed-off-by: Mark Phelps <[email protected]> * fix: TlsConfig serialization compatibility with Rust FFI Change TlsConfig from Lombok @value to traditional class structure to match ClientOptions pattern and ensure proper JSON serialization Signed-off-by: Mark Phelps <[email protected]> * chore: fmt Signed-off-by: Mark Phelps <[email protected]> * chore: rm debug env vars in java tests Signed-off-by: Mark Phelps <[email protected]> * chore: mount tls file Signed-off-by: Mark Phelps <[email protected]> * chore: add default for fetcher builder Signed-off-by: Mark Phelps <[email protected]> * chore: check for file existence in builder Signed-off-by: Mark Phelps <[email protected]> * chore: add file existence checks for python too Signed-off-by: Mark Phelps <[email protected]> * chore: fmt Signed-off-by: Mark Phelps <[email protected]> * chore: default to 120 seconds on java builder Signed-off-by: Mark Phelps <[email protected]> * chore: only set request_timeout and update_interval in fetcher if > 0 Signed-off-by: Mark Phelps <[email protected]> --------- Signed-off-by: Mark Phelps <[email protected]>
Summary
cc @cristianonicolai