Repository navigation
feat: Add TLS connection options - #19
Merged
Merged
Conversation
jopemachine
marked this pull request as ready for review
November 6, 2026 06:51
jopemachine
changed the base branch from
main
to
chore/update-crates-with-advisories
November 6, 2026 07:26
jopemachine
force-pushed
the
feat/tls-connect-options
branch
from
November 6, 2026 07:26
58f8ace to
3d7cb14
Compare
2 of 3 tasks
HyeockJinKim
approved these changes
Nov 6, 2026
Enable the `tls` feature of `etcd-client` and expose it as `TlsOptions` with `ConnectOptions.with_tls()`, so that clients can connect to `https://` endpoints with a CA certificate and a client identity. `ConnectOptions` prints the password and the TLS private key in its Debug output, which `Client.__repr__` uses. Print a fixed text instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Follow the existing tests: container fixtures live in `conftest.py`, async tests carry `pytest.mark.asyncio`, and no test imports from `conftest.py`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jopemachine
force-pushed
the
feat/tls-connect-options
branch
from
November 6, 2026 07:28
3d7cb14 to
31a3753
Compare
`ConnectOptions.with_timeout()` and `with_connect_timeout()` do not end a stalled TLS handshake, so a server that stops responding during it blocks the connection indefinitely. Expose the handshake timeout of `etcd-client` as `TlsOptions.with_handshake_timeout()`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📚 Stacked PRs
Part of the etcd TLS work (BA-8980). Merge in order (bottom-up):
chore: update dependenciesfeat(BA-8980): TLS connection options ← you are herePart of lablup/backend.ai#16640 (BA-8980). Backend.AI cannot connect to etcd over TLS until this is released.
Summary
tlsfeature ofetcd-client(rustls) and addTlsOptionswithwith_ca_certificate()andwith_identity(), plusConnectOptions.with_tls(). Certificates are passed as PEM bytes, and endpoints usehttps://.TlsOptions.with_handshake_timeout().ConnectOptions.with_timeout()andwith_connect_timeout()do not end a stalled TLS handshake, so without it a server that stops responding during the handshake blocks the connection indefinitely.Client.__repr__printed the Debug output ofConnectOptions, which includes the password and would include the TLS private key. It now printsConnectOptions { .. }.trustmeis added to thetestextra to issue the test certificates.Test plan
tests/test_tls.py: read and write on an etcd started with--client-cert-auth; a stalled handshake ends with an error;repr()hides the password and the private keycargo clippy,ruff check,mypyringdependency compiles C code🤖 Generated with Claude Code