mmodzelewski opened a new issue, #2808:
URL: https://github.com/apache/iggy/issues/2808
## Summary
The Node.js SDK has TCP/TLS support implemented with a dedicated \`TLS\`
transport type and \`TlsOption\` configuration, but there are no integration
tests for TLS connections and no TLS examples in \`examples/node/\`.
## Current State
- **TLS implementation**: Present in \`foreign/node/src/client/\`:
- \`client.type.ts\`: Defines \`TlsOption\` type combining port with
Node.js \`ConnectionOptions\`
- \`client.connection.ts\`: Implements TLS transport via
\`createTlsSocket()\` using Node.js built-in \`tls\` module
- Supports \`'TCP'\` and \`'TLS'\` as transport types
- **Integration tests**: No TLS-specific tests (existing tests in
\`foreign/node/src/\` are unit tests for wire protocol serialization; e2e tests
don't cover TLS)
- **Examples**: No TLS-specific examples in \`examples/node/\`
## Requirements
### Integration Tests
- Add integration test(s) that start an Iggy server with TLS enabled and
connect using the Node.js client with TLS transport
- 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
- Connection failure when TLS is required but client uses plain TCP
- Basic message send/receive over TLS connection
### Examples
- Add a TLS example in \`examples/node/\` demonstrating:
- How to configure the client with \`transport: 'TLS'\` and \`TlsOption\`
- 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]