-
Notifications
You must be signed in to change notification settings - Fork 6
Conversation
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 TLS/mTLS configuration to the IoTDB C# client, exposing client certificate + custom root CA options through both the fluent SessionPool/TableSessionPool builders and ADO.NET connection strings, and documenting how to map Java/keytool outputs to the .NET certificate model.
Changes:
- Extend
SessionPooland both builders to acceptClientCertificatePath,ClientCertificatePassword, andRootCertificatePath, and wire these into TLS transport creation and validation. - Add ADO.NET connection string keywords (
UseSsl,ClientCertificatePath,ClientCertificatePassword,RootCertificatePath) and update session creation to use the builder pipeline. - Add documentation (EN/ZH) and configuration-focused tests for the new options.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Apache.IoTDB.Tests/MtlsConfigurationTests.cs | Adds tests asserting the new builder and connection-string configuration surfaces accept mTLS/TLS options. |
| tests/Apache.IoTDB.Tests/Apache.IoTDB.Tests.csproj | References Apache.IoTDB.Data to enable testing the ADO.NET connection string builder. |
| src/Apache.IoTDB/TableSessionPool.Builder.cs | Adds client/root certificate configuration to the table session pool builder and forwards into SessionPool. |
| src/Apache.IoTDB/SessionPool.cs | Implements certificate loading, custom root CA validation callback, and client cert selection for TLS sockets. |
| src/Apache.IoTDB/SessionPool.Builder.cs | Adds client/root certificate configuration to the main session pool builder and forwards into SessionPool. |
| src/Apache.IoTDB.Data/IoTDBConnectionStringBuilder.cs | Adds new connection string keywords/properties for TLS/mTLS, and fixes TimeOut setter serialization. |
| src/Apache.IoTDB.Data/DataReaderExtensions.cs | Routes ADO.NET session creation through SessionPool.Builder() so TLS/mTLS options are applied. |
| README.md | Documents TLS/mTLS usage and keytool artifact mapping; provides builder + connection string examples. |
| README_ZH.md | Chinese version of the TLS/mTLS documentation and examples. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Summary
ClientCertificatePath,ClientCertificatePassword, andRootCertificatePathoptions.SessionPool, including ADO.NET connection string support.client.keystoreandca.crt.Impact
Users can now configure one-way TLS with a private CA and mTLS client certificates through both the fluent builders and ADO.NET connection strings. The documented Java/keytool workflow now maps directly to the C# parameters.
Validation
git diff --checkdotnet build tests/Apache.IoTDB.Tests/Apache.IoTDB.Tests.csproj -f net5.0 --no-restore -v:minimal -clp:ErrorsOnly