nats-go @ v1.56.0
integrity
- size
- 956.4 KiB
- downloaded
- last checked
- overlays
- go
- detected
- go module github.com/nats-io/nats.go
release notes
Changelog
This release fixes security issues in how the client decides to use TLS and which servers it takes from the cluster. Some of these fixes change how the client connects: read BREAKING CHANGES below before upgrading.
BREAKING CHANGES
- Core NATS:
-
TLS settings now require TLS.
Options.TLSConfig,RootCAsCBorTLSCertCBset directly now act likeSecure(). Against a server without TLS, the connection fails. Against a server where TLS is optional (allow_non_tls,InProcessServer()), the client now uses TLS, so the certificate must verify. To connect without TLS, drop the TLS settings (#2245) -
ErrSecureConnWantedis wrapped. Compare witherrors.Is(err, nats.ErrSecureConnWanted).==no longer matches (#2245) -
With TLS after INFO, discovered servers come only from the INFO received inside TLS. The plaintext INFO before the handshake no longer adds servers, and neither does a failed attempt. A TLS client configured with a single server URL therefore:
- has nothing to fail over to against nats-server before 2.12, until the server sends a later INFO.
- fails
Connect()when that server fails it after its INFO, for example atmax_connections(reported as a TLS handshake error, not the server's reason), or with a certificate that doesn't match a server configured by IP.
Configure more than one server URL to keep fail-over. For a server configured by IP, set
TLSConfig.ServerNameto a name in its certificate (#2245) -
SetServerPool()with atls://URL turns TLS on for the connection, as it does atConnect(). Plaintext servers in that pool can no longer be reached. Over WebSocket, servers listed on awss://connection are dialed withwss://(#2245)
-
FIXED
- Core NATS:
- User info in a
connect_urlsentry (x@host:port) used as the credentials for that server. Discovered servers now always get the credentials the client used for the server that reported them (#2245) - Report TLS verification failures during reconnect. Thanks @cr7258 for the contribution (#2229)
- Draining subscriptions resubscribed on reconnect (#2232)
- Keep TLS server name for IPs discovered via an IP entry. Thanks @igor-kupczynski for the contribution (#2217)
- Require a separator before inline header status. Thanks @ViktorBystrov72 for the contribution (#2237)
- WebSocket frame handling (#2225)
- Treat malformed WS close frames as protocol errors (#2226)
- User info in a
- JetStream:
- Release the JetStream reconnect watcher after publisher cleanup. Thanks @Grivn for the contribution (#2216)
- Reduce JetStream fetch buffering allocations. Thanks @manenim for the contribution (#2205)
- Preserve options when following object links. Thanks @Grivn for the contribution (#2220)
- Legacy JetStream:
- Legacy JetStream reconnect watcher cleanup (#2218)
- Preserve options when following object links. Thanks @Grivn for the contribution (#2220)
IMPROVED
- Core NATS:
- Reuse header encoding buffers in
PublishMsg. Thanks @Grivn for the contribution (#2219)
- Reuse header encoding buffers in
- JetStream:
- Remove duplicated word in
MemoryMaxStreamBytescomment. Thanks @ninglinLiu for the contribution (#2242)
- Remove duplicated word in
- Remove stale
go.modversion notes from docs. Thanks @nik-6174 for the contribution (#2233) - Bump ntf-client to v0.0.5 to fix nightly tester failures (#2243)
Complete Changes
https://github.com/nats-io/nats.go/compare/v1.55.0...v1.56.0
download
curl -fL -o v1.56.0.zip https://ratatoskr.space/pkg/nats-go/v1.56.0.zip
printf '%s %s\n' 'f4ee6ec53b91b2af691cb4952bb127ca5aa25163997c1fe7caeb4f0c90869a72' 'v1.56.0.zip' | sha256sum -c -
$url = "https://ratatoskr.space/pkg/nats-go/v1.56.0.zip"
$out = "v1.56.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "f4ee6ec53b91b2af691cb4952bb127ca5aa25163997c1fe7caeb4f0c90869a72") { throw "sha256 mismatch" }
curl -fL -o v1.56.0.tar.gz https://ratatoskr.space/pkg/nats-go/v1.56.0.tar.gz
printf '%s %s\n' 'cb3d976f5d657ff601f880dd5c5b485edfef8b9064346eac7635fc790145a894' 'v1.56.0.tar.gz' | sha256sum -c -
$url = "https://ratatoskr.space/pkg/nats-go/v1.56.0.tar.gz"
$out = "v1.56.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "cb3d976f5d657ff601f880dd5c5b485edfef8b9064346eac7635fc790145a894") { throw "sha256 mismatch" }
download via yggdrasil mesh
curl -fL -o v1.56.0.zip http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.56.0.zip
printf '%s %s\n' 'f4ee6ec53b91b2af691cb4952bb127ca5aa25163997c1fe7caeb4f0c90869a72' 'v1.56.0.zip' | sha256sum -c -
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.56.0.zip"
$out = "v1.56.0.zip"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "f4ee6ec53b91b2af691cb4952bb127ca5aa25163997c1fe7caeb4f0c90869a72") { throw "sha256 mismatch" }
curl -fL -o v1.56.0.tar.gz http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.56.0.tar.gz
printf '%s %s\n' 'cb3d976f5d657ff601f880dd5c5b485edfef8b9064346eac7635fc790145a894' 'v1.56.0.tar.gz' | sha256sum -c -
$url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.56.0.tar.gz"
$out = "v1.56.0.tar.gz"
Invoke-WebRequest -Uri $url -OutFile $out
if ((Get-FileHash $out -Algorithm SHA256).Hash.ToLowerInvariant() -ne "cb3d976f5d657ff601f880dd5c5b485edfef8b9064346eac7635fc790145a894") { throw "sha256 mismatch" }
| artifact | format | size | hashes |
|---|---|---|---|
| v1.56.0.zip | zip | 946.2 KiB |
blake3-24 b400bff88156af95d81c3141e71b73386b82c0371a5814fa
sha256 f4ee6ec53b91b2af691cb4952bb127ca5aa25163997c1fe7caeb4f0c90869a72
sha1 bb7ff85972867ae09db4497e5020bbefd521f768
|
| v1.56.0.tar.gz | tar.gz | 795.7 KiB |
blake3-24 e9503544fde986179aacd32d4d51cb9115574fb80b9b1c37
sha256 cb3d976f5d657ff601f880dd5c5b485edfef8b9064346eac7635fc790145a894
sha1 28e6214a2f7ff0690b2cbece842dc12dbf698be8
|
go module archive
module zip with the module path rewritten to this mirror; fetched by go get through the
GOPROXY route
| artifact | format | size | hashes |
|---|---|---|---|
| v1.56.0.zip | zip | 952.2 KiB |
blake3-24 a2a5d873999234d32f47ab91c4ee7611c2cb16c19a938ed9
sha256 cd18a2cbce18a65669032512e49534e6c4cfc7721388432956c6dc86c48501f2
sha1 38c55af24bf0f8b95d254ac714c1294586ba2629
|
install
http_archive(
name = "nats-go",
urls = ["https://ratatoskr.space/pkg/nats-go/v1.56.0.tar.gz"],
integrity = "sha256-yz2Xb11lf/YB+IDdXFtIXt/vi5BkNG6sdjX8eQFFqJQ=",
strip_prefix = "nats-go-v1.56.0",
)
.url = "https://ratatoskr.space/pkg/nats-go/v1.56.0.tar.gz",
GOPROXY=https://ratatoskr.space GOSUMDB=off go get ratatoskr.space/pkg/nats-go@v1.56.0
install via yggdrasil mesh
http_archive(
name = "nats-go",
urls = ["http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.56.0.tar.gz"],
integrity = "sha256-yz2Xb11lf/YB+IDdXFtIXt/vi5BkNG6sdjX8eQFFqJQ=",
strip_prefix = "nats-go-v1.56.0",
)
.url = "http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go/v1.56.0.tar.gz",
GOPROXY=http://14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg GOSUMDB=off GOINSECURE=14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/* go get 14cc7d57b5e70f679b851fe5b272ce17c70632ff4beb5b35ab64bc706b2485af.pk.ygg/pkg/nats-go@v1.56.0