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

nats-io / nats-server / 20202872873
85%

Build:
DEFAULT BRANCH: main
Ran 14 Dec 2025 05:55AM UTC
Jobs 1
Files 61
Run time 1min
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

12 Dec 2025 04:21PM UTC coverage: 84.896% (+1.2%) from 83.736%
20202872873

push

github

web-flow
[CHANGED] MQTT: Permissions to "$MQTT." are now implicit (#7637)

When the server has to create a subscription for a JetStream consumer
(in case of QoS1/2), it would do it with a `$MQTT_sub.` prefix. This
then required users to explicitly add this subject prefix when users had
subscribe permissions.
In more complex setups, there would likely be other permissions to be
granted.

Since the server already checks that a MQTT client is allowed to publish
or subscribe on a given topic/subject based on the user's permissions
set, then the internal need to subscribe to a `$MQTT_sub.xxx` subject
should not be checked. In other words, the server would not create a
subscription on that internal subject if the user is not allowed to
subscribe on "foo" for instance.

So the change in this PR implicitly allows MQTT clients (not regular
NATS core clients) or non client connections (say routes, leaf, etc..)
to pub/sub on any "$MQTT." prefixed subject. Note that the change still
allows "deny" clause to be applied in case the user would want to
explicitly restrict some of the MQTT related subjects to be exchanged.

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>

74277 of 87492 relevant lines covered (84.9%)

339173.73 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
72.46
0.0% src/github.com/nats-io/nats-server/server/avl/seqset.go
2
94.83
1.17% src/github.com/nats-io/nats-server/server/client.go
2
98.52
-1.48% src/github.com/nats-io/nats-server/server/jetstream_versioning.go
2
87.16
0.0% src/github.com/nats-io/nats-server/server/monitor.go
2
90.96
-0.19% src/github.com/nats-io/nats-server/server/parser.go
3
79.93
1.45% src/github.com/nats-io/nats-server/server/opts.go
4
94.25
0.24% src/github.com/nats-io/nats-server/server/gateway.go
6
86.37
-0.03% src/github.com/nats-io/nats-server/server/stream.go
7
86.4
0.05% src/github.com/nats-io/nats-server/server/events.go
9
86.91
-0.26% src/github.com/nats-io/nats-server/server/accounts.go
15
83.24
0.63% src/github.com/nats-io/nats-server/server/filestore.go
18
73.32
-0.31% src/github.com/nats-io/nats-server/server/jetstream_api.go
21
82.28
-0.09% src/github.com/nats-io/nats-server/server/jetstream_cluster.go
22
87.74
0.51% src/github.com/nats-io/nats-server/server/raft.go
26
82.99
-0.52% src/github.com/nats-io/nats-server/server/memstore.go
38
87.77
-0.73% src/github.com/nats-io/nats-server/server/consumer.go
Jobs
ID Job ID Ran Files Coverage
1 20202872873.1 14 Dec 2025 05:55AM UTC 61
84.9
GitHub Action Run
Source Files on build 20202872873
  • Tree
  • List 61
  • Changed 27
  • Source Changed 0
  • Coverage Changed 27
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #20202872873
  • 5aafd3a6 on github
  • Prev Build on main (#20187010333)
  • Next Build on main (#20220893943)
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

© 2025 Coveralls, Inc