Repository navigation
Important Notes
This release fixes a security issue where WebSocket connections (wss://) used by Instance.execute() and Client.events() did not verify the server's TLS certificate, even when server verification was enabled on the HTTPS Client (via verify=True or a pinned certificate path). An active network attacker able to intercept WebSocket connections could read command stdin or replace stdout/stderr and event data.
WebSocket connections now enforce the same TLS verification policy as HTTP requests (CA/hostname verification for verify=True or a CA bundle, and SHA-256 fingerprint pinning for a pinned server certificate). When server verification is enabled, a custom websocket_client passed to Client.events() must be a ws4py.client.WebSocketBaseClient subclass so pylxd can apply TLS verification; otherwise ClientConnectionFailed is raised.
Thanks to Artur Chlebicki (@Artur12555) for reporting this issue. See GHSA-3wgp-hmvf-xj8h for full details.
This release also fixes a security issue where calling pylxd.client.get_session_for_url() for an https:// endpoint without specifying verify (or with verify=None) overwrote requests's default with session.verify = None, silently disabling TLS server certificate verification when neither REQUESTS_CA_BUNDLE nor CURL_CA_BUNDLE was set (including when passing that session into Client(..., session=session)). Regular Client("https://...") usage without a custom session= was not affected.
get_session_for_url() now treats verify=None as unspecified and preserves requests.Session's default verify=True. Callers using get_session_for_url() against an LXD server with a self-signed certificate should pass verify="/path/to/server.crt" to pin the server certificate (or verify=False to explicitly opt out of verification).
See GHSA-3797-r4pr-24mv for full details.
What's Changed
- build(deps): bump the actions group with 3 updates by @dependabot[bot] in #780
- build(deps): bump the actions group with 3 updates by @dependabot[bot] in #781
- build(deps): bump the actions group with 4 updates by @dependabot[bot] in #782
- AGENTS.md: add agent runbook and point Copilot instructions at it by @tugbataluy in #784
- Code quality (20260918) by @simondeziel in #783
- Code quality (20260921) by @simondeziel in #785
- build(deps): bump the actions group with 4 updates by @dependabot[bot] in #786
- build(deps): bump the actions group with 3 updates by @dependabot[bot] in #788
- RTD refresh by @simondeziel in #789
- Code quality (20291002) by @simondeziel in #790
- github: fix
setup-lxdpinning and manually bump the commit by @simondeziel in #791 - build(deps): bump the actions group across 1 directory with 3 updates by @dependabot[bot] in #794
- pylxd/models/cluster: add ClusterLink model by @tugbataluy in #795
- build(deps): bump actions/upload-artifact from 7.0.1 to 7.0.2 in the actions group by @dependabot[bot] in #798
- build(deps): bump the actions group with 3 updates by @dependabot[bot] in #801
- Type hints by @galacticaledge in #792
- Add image registry model by @tugbataluy in #796
- integration/test_image_registries: stop using images.lxd.canonical.com by @tugbataluy in #804
- CONTRIBUTORS: add Tuğba Taluy by @tugbataluy in #803
- Document that signed commits are required by @simondeziel in #802
- Add registry image sources by @tugbataluy in #797
- Declare new
Operationattributes and fail integration tests on pylxd warnings by @simondeziel in #805 - build(deps): bump the actions group with 5 updates by @dependabot[bot] in #806
- build(deps): bump the actions group with 6 updates by @dependabot[bot] in #808
- build(deps): bump the actions group with 5 updates by @dependabot[bot] in #809
- Send Content-Type: application/octet-stream for raw request bodies by @abdull-ah-med in #799
- Don't let REQUESTS_CA_BUNDLE override an explicit verify by @abdull-ah-med in #800
- build(deps): bump the actions group with 4 updates by @dependabot[bot] in #810
- Quality fixes by @simondeziel in #811
- pylxd/models/_model: sync the object after save(wait=True) by @18Abhinav07 in #812
- Quality fixes for client TLS/connection/events handling and model tests by @simondeziel in #813
- pylxd: verify server TLS certificates on WebSocket connections by @simondeziel in #816
- pylxd/client: keep verify=True by default in get_session_for_url() by @simondeziel in #817
- pyproject.toml: bump version to 2.4.3 by @simondeziel in #815
New Contributors
- @galacticaledge made their first contribution in #792
- @abdull-ah-med made their first contribution in #799
- @18Abhinav07 made their first contribution in #812
Full Changelog: 2.4.2...2.4.3