mmodzelewski opened a new issue, #2805:
URL: https://github.com/apache/iggy/issues/2805
## Summary
The Java SDK has TCP/TLS support implemented (both blocking via
`IggyTcpClientBuilder.enableTls()` and async via Netty's `SslContextBuilder`),
but there are no dedicated integration tests that actually connect to a
TLS-enabled server, and no TLS examples in `examples/java/`.
## Current State
- **TLS implementation**: Present in both blocking (`IggyTcpClient`) and
async (`AsyncTcpConnection`) clients
- **Existing tests**: `AsyncIggyTcpClientBuilderTest` has unit-level tests
for TLS builder methods (`testBuildClientWithTlsBoolean`,
`testBuildClientWithEnableTls`, `testHandleNullTlsCertificateString`), but none
actually connect to a TLS-enabled server
- **Examples**: No TLS-specific examples exist in `examples/java/`
## Requirements
### Integration Tests
- Add integration test(s) that start an Iggy server with TLS enabled and
connect using the Java TCP client with TLS
- Test both blocking and async TLS connections
- Use custom certificates from `core/certs/` (`iggy_ca_cert.pem`,
`iggy_cert.pem`, `iggy_key.pem`)
- Test scenarios:
- Successful TLS connection with custom CA certificate
- Successful TLS connection with server certificate
- Connection failure when TLS is required but client doesn't use TLS
- Basic message send/receive over TLS connection
- Reference the C# TLS integration tests
(`foreign/csharp/Iggy_SDK.Tests.Integration/IggyTlsConnectionTests.cs`) as an
example of the approach
### Examples
- Add a TLS example in `examples/java/` demonstrating:
- How to configure the client builder with TLS enabled
- How to specify a custom CA certificate file
- A simple producer/consumer flow over TLS
## Reference
- Server TLS config env vars: `IGGY_TCP_TLS_ENABLED=true`,
`IGGY_TCP_TLS_CERT_FILE`, `IGGY_TCP_TLS_KEY_FILE`
- Custom certs location: `core/certs/`
- C# TLS tests for reference:
`foreign/csharp/Iggy_SDK.Tests.Integration/IggyTlsConnectionTests.cs`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]