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
Summary
The Java SDK has TCP/TLS support implemented (both blocking via
IggyTcpClientBuilder.enableTls()and async via Netty'sSslContextBuilder), but there are no dedicated integration tests that actually connect to a TLS-enabled server, and no TLS examples inexamples/java/.Current State
IggyTcpClient) and async (AsyncTcpConnection) clientsAsyncIggyTcpClientBuilderTesthas unit-level tests for TLS builder methods (testBuildClientWithTlsBoolean,testBuildClientWithEnableTls,testHandleNullTlsCertificateString), but none actually connect to a TLS-enabled serverexamples/java/Requirements
Integration Tests
core/certs/(iggy_ca_cert.pem,iggy_cert.pem,iggy_key.pem)foreign/csharp/Iggy_SDK.Tests.Integration/IggyTlsConnectionTests.cs) as an example of the approachExamples
examples/java/demonstrating:Reference
IGGY_TCP_TLS_ENABLED=true,IGGY_TCP_TLS_CERT_FILE,IGGY_TCP_TLS_KEY_FILEcore/certs/foreign/csharp/Iggy_SDK.Tests.Integration/IggyTlsConnectionTests.cs