• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nats-io / nats-server / 16640185520
83%

Build:
DEFAULT BRANCH: main
Ran 31 Jul 2025 05:54AM UTC
Jobs 1
Files 59
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Jul 2025 10:22AM UTC coverage: 85.919% (+0.09%) from 85.828%
16640185520

push

github

web-flow
(2.12) [FIXED] Leaf node without auth doesn't default to global account (#7116)

A leafnode could connect to a server without any credentials and be
assigned to the global account. Even if the server we're connecting to
requires auth, the leafnode connection would bypass that and connect it
to the global account, even if a global account is not configured and
nobody is listening in that account.

This is not an issue for decentralized auth or when using auth callout,
as they will reject if respectively no valid JWT or credentials are
passed. In other setups we need to also respect authentication and
require the leafnode to have the proper credentials. This resolves
confusing situations where accounts and authentication is defined, but a
leafnode is able to connect without creds, connects to the global
account, and proceeds to not be usable at all.

Either the leafnode requires proper credentials to be passed when
connecting, or `no_auth_user` can be used to allow the leafnode to not
specify credentials.

Resolves https://github.com/nats-io/nats-server/issues/6972

Signed-off-by: Maurice van Veen <github@mauricevanveen.com>

71498 of 83216 relevant lines covered (85.92%)

356798.84 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
94.38
0.0% src/github.com/nats-io/nats-server/server/gateway.go
2
82.89
0.13% src/github.com/nats-io/nats-server/server/jetstream.go
2
98.11
-1.89% src/github.com/nats-io/nats-server/server/jetstream_versioning.go
2
85.93
0.04% src/github.com/nats-io/nats-server/server/stream.go
3
81.19
0.18% src/github.com/nats-io/nats-server/server/opts.go
5
73.01
0.09% src/github.com/nats-io/nats-server/server/jetstream_api.go
6
86.51
0.7% src/github.com/nats-io/nats-server/server/raft.go
9
86.7
-0.15% src/github.com/nats-io/nats-server/server/accounts.go
11
95.06
-0.18% src/github.com/nats-io/nats-server/server/client.go
12
86.11
-0.47% src/github.com/nats-io/nats-server/server/events.go
14
87.55
-0.14% src/github.com/nats-io/nats-server/server/consumer.go
14
81.98
0.52% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
49
88.84
-0.03% src/github.com/nats-io/nats-server/server/auth.go
189
87.25
0.92% src/github.com/nats-io/nats-server/server/memstore.go
427
84.53
0.0% src/github.com/nats-io/nats-server/server/filestore.go
Jobs
ID Job ID Ran Files Coverage
1 16640185520.1 31 Jul 2025 05:54AM UTC 59
85.92
GitHub Action Run
Source Files on build 16640185520
  • Tree
  • List 59
  • Changed 20
  • Source Changed 3
  • Coverage Changed 20
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #16640185520
  • 78a80ee1 on github
  • Prev Build on main (#16613790579)
  • Next Build on main (#16666696644)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc