Skip to content

Commit 00cf75d

Browse files
committed
Add v2.0.0 post.
1 parent 25d5b8c commit 00cf75d

File tree

1 file changed

+251
-0
lines changed

1 file changed

+251
-0
lines changed
Lines changed: 251 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,251 @@
1+
<!--
2+
.. title: Version 2.0.0 released.
3+
.. slug: version-2-0-0-released
4+
.. date: 2020-12-03 16:00:00 UTC+00:00
5+
.. tags: Releases
6+
.. category:
7+
.. link:
8+
.. description:
9+
.. type: text
10+
-->
11+
12+
The Mosquitto project is happy to announce the release of version 2.0! This is
13+
a big change with breaking behaviour changes in the broker. Users, packages and
14+
plugin authors should read [migrating from 1.x to 2.0] to help with the
15+
changes.
16+
17+
# Noteworthy changes
18+
19+
Mosquitto is now more secure by default and requires users to take an active
20+
decision in how they configure security on their broker, instead of possibly
21+
relying on the older very permissive behaviour, as well as dropping privileged
22+
access more quickly. More details are in [migrating from 1.x to 2.0].
23+
24+
A new plugin interface has been introduced which goes beyond the existing
25+
authentication and access control plugin interface to offer more plugin
26+
capabilities, whilst being easier to develop for and easier to extend. More
27+
details will follow. Existing plugins are still supported, although plugin
28+
authors should look at [migrating from 1.x to 2.0] to ensure their plugins
29+
remain compatible when compiled against Mosquitto 2.0 headers.
30+
31+
A new plugin has been introduced to provide client, group, and role based
32+
authentication and access control. The plugin configuration is managed over
33+
special topics and can be updated on the fly. It provides a flexible and
34+
straightforward means of configuring access to your broker. For more
35+
information, see [Dynamic Security plugin].
36+
37+
The broker performance has been improved, particularly for higher numbers of
38+
clients. We plan to run show some benchmarks to show the improvement.
39+
40+
A new utility, `mosquitto_ctrl` has been added for controlling aspects of a
41+
running broker. At the present this is limited to controlling the dynamic
42+
security plugin, but will be extended to other features in later releases.
43+
44+
Bridges now support MQTT v5.
45+
46+
The mosquitto command line clients have received a variety of small
47+
improvements. mosquitto_sub can now format its output in fixed column widths,
48+
for example, and filter its output randomly so you can keep an eye on the
49+
overall behaviour of a topic without having to see every message, for example.
50+
51+
# Breaking changes
52+
- When the Mosquitto broker is run without configuring any listeners it will
53+
now bind to the loopback interfaces 127.0.0.1 and/or ::1. This means that
54+
only connections from the local host will be possible.
55+
56+
Running the broker as `mosquitto` or `mosquitto -p 1883` will bind to the
57+
loopback interface.
58+
59+
Running the broker with a configuration file with no listeners configured
60+
will bind to the loopback interface with port 1883.
61+
62+
Running the broker with a listener defined will bind by default to `0.0.0.0`
63+
/ `::` and so will be accessible from any interface. It is still possible to
64+
bind to a specific address/interface.
65+
66+
If the broker is run as `mosquitto -c mosquitto.conf -p 1884`, and a
67+
listener is defined in the configuration file, then the port defined on the
68+
command line will be IGNORED, and no listener configured for it.
69+
- All listeners now default to `allow_anonymous false` unless explicitly set
70+
to true in the configuration file. This means that when configuring a
71+
listener the user must either configure an authentication and access control
72+
method, or set `allow_anonymous true`. When the broker is run without a
73+
configured listener, and so binds to the loopback interface, anonymous
74+
connections are allowed.
75+
- If Mosquitto is run on as root on a unix like system, it will attempt to
76+
drop privileges as soon as the configuration file has been read. This is in
77+
contrast to the previous behaviour where elevated privileges were only
78+
dropped after listeners had been started (and hence TLS certificates loaded)
79+
and logging had been started. The change means that clients will never be
80+
able to connect to the broker when it is running as root, unless the user
81+
explicitly sets it to run as root, which is not advised. It also means that
82+
all locations that the broker needs to access must be available to the
83+
unprivileged user. In particular those people using TLS certificates from
84+
Lets Encrypt will need to do something to allow Mosquitto to access
85+
those certificates. An example deploy renewal hook script to help with this
86+
is at `misc/letsencrypt/mosquitto-copy.sh`.
87+
The user that Mosquitto will change to are the one provided in the
88+
configuration, `mosquitto`, or `nobody`, in order of availability.
89+
- The `pid_file` option will now always attempt to write a pid file,
90+
regardless of whether the `-d` argument is used when running the broker.
91+
- The `tls_version` option now defines the *minimum* TLS protocol version to
92+
be used, rather than the exact version. Closes [#1258].
93+
- The `max_queued_messages` option has been increased from 100 to 1000 by
94+
default, and now also applies to QoS 0 messages, when a client is connected.
95+
- The mosquitto_sub, mosquitto_pub, and mosquitto_rr clients will now load
96+
OS provided CA certificates by default if `-L mqtts://...` is used, or if
97+
the port is set to 8883 and no other CA certificates are loaded.
98+
- Minimum support libwebsockets version is now 2.4.0
99+
100+
101+
# Broker features
102+
- New plugin interface which is more flexible, easier to develop for and
103+
easier to extend.
104+
- New dynamic security plugin, which allows clients, groups, and roles to be
105+
defined and updated as the broker is running.
106+
- Performance improvements, particularly for higher numbers of clients.
107+
- When running as root, if dropping privileges to the "mosquitto" user fails,
108+
then try "nobody" instead. This reduces the burden on users installing
109+
Mosquitto themselves.
110+
- Add support for Unix domain socket listeners.
111+
- Add `bridge_outgoing_retain` option, to allow outgoing messages from a
112+
bridge to have the retain bit completely disabled, which is useful when
113+
bridging to e.g. Amazon or Google.
114+
- Add support for MQTT v5 bridges to handle the "retain-available" property
115+
being false.
116+
- Allow MQTT v5.0 outgoing bridges to fall back to MQTT v3.1.1 if connecting
117+
to a v3.x only broker.
118+
- DLT logging is now configurable at runtime with `log_dest dlt`.
119+
Closes [#1735].
120+
- Add `mosquitto_plugin_publish()` function, which can be used by plugins to
121+
publish messages.
122+
- Add `mosquitto_client_protocol_version()` function which can be used by
123+
plugins to determine which version of MQTT a client has connected with.
124+
- Add `mosquitto_kick_client_by_clientid()` and `mosquitto_kick_client_by_username()`
125+
functions, which can be used by plugins to disconnect clients.
126+
- Add support for handling $CONTROL/ topics in plugins.
127+
- Add support for PBKDF2-SHA512 password hashing.
128+
- Enabling certificate based TLS encryption is now through certfile and
129+
keyfile, not capath or cafile.
130+
- Added support for controlling UNSUBSCRIBE calls in v5 plugin ACL checks.
131+
- Add "deny" acl type. Closes [#1611].
132+
- The broker now sends the receive-maximum property for MQTT v5 CONNACKs.
133+
- Add the `bridge_max_packet_size` option. Closes [#265].
134+
- Add the `bridge_bind_address` option. Closes [#1311].
135+
- TLS certificates for the server are now reloaded on SIGHUP.
136+
- Default for max_queued_messages has been changed to 1000.
137+
- Add `ciphers_tls1.3` option, to allow setting TLS v1.3 ciphersuites.
138+
Closes [#1825].
139+
- Bridges now obey MQTT v5 server-keepalive.
140+
- Add bridge support for the MQTT v5 maximum-qos property.
141+
- Log client port on new connections. Closes [#1911].
142+
143+
# Broker fixes
144+
- Send DISCONNECT with `malformed-packet` reason code on invalid PUBLISH,
145+
SUBSCRIBE, and UNSUBSCRIBE packets.
146+
- Document that X509_free() must be called after using
147+
mosquitto_client_certificate(). Closes [#1842].
148+
- Fix listener not being reassociated with client when reloading a persistence
149+
file and `per_listener_settings true` is set and the client did not set a
150+
username. Closes [#1891].
151+
- Fix bridge sock not being removed from sock hash on error. Closes [#1897].
152+
- mosquitto_password now forbids the : character. Closes [#1833].
153+
- Fix `log_timestamp_format` not applying to `log_dest topic`. Closes [#1862].
154+
- Fix crash on Windows if loading a plugin fails. Closes [#1866].
155+
- Fix file logging on Windows. Closes [#1880].
156+
- Report an error if the config file is set to a directory. Closes [#1814].
157+
- Fix bridges incorrectly setting Wills to manage remote notifications when
158+
`notifications_local_only` was set true. Closes [#1902].
159+
160+
# Client library features
161+
- Client no longer generates random client ids for v3.1.1 clients, these are
162+
now expected to be generated on the broker. This matches the behaviour for
163+
v5 clients. Closes [#291].
164+
- Add support for connecting to brokers through Unix domain sockets.
165+
- Add `mosquitto_property_identifier()`, for retrieving the identifier integer
166+
for a property.
167+
- Add `mosquitto_property_identifier_to_string()` for converting a property
168+
identifier integer to the corresponding property name string.
169+
- Add `mosquitto_property_next()` to retrieve the next property in a list, for
170+
iterating over property lists.
171+
- mosquitto_pub now handles the MQTT v5 retain-available property by never
172+
setting the retain bit.
173+
- Added MOSQ_OPT_TCP_NODELAY, to allow disabling Nagle's algorithm on client
174+
sockets. Closes [#1526].
175+
- Add `mosquitto_ssl_get()` to allow clients to access their SSL structure and
176+
perform additional verification.
177+
- Add MOSQ_OPT_BIND_ADDRESS to allow setting of a bind address independently
178+
of the `mosquitto_connect*()` call.
179+
- Add `MOSQ_OPT_TLS_USE_OS_CERTS` option, to instruct the client to load and
180+
trust OS provided CA certificates for use with TLS connections.
181+
182+
# Client library fixes
183+
- Fix send quota being incorrecly reset on reconnect. Closes [#1822].
184+
- Don't use logging until log mutex is initialised. Closes [#1819].
185+
- Fix missing mach/mach_time.h header on OS X. Closes [#1831].
186+
- Fix connect properties not being sent when the client automatically
187+
reconnects. Closes [#1846].
188+
189+
# Client features
190+
- Add timeout return code (27) for `mosquitto_sub -W <secs>` and
191+
`mosquitto_rr -W <secs>`. Closes [#275].
192+
- Add support for connecting to brokers through Unix domain sockets with the
193+
`--unix` argument.
194+
- Use cJSON library for producing JSON output, where available. Closes [#1222].
195+
- Add support for outputting MQTT v5 property information to mosquitto_sub/rr
196+
JSON output. Closes [#1416].
197+
- Add `--pretty` option to mosquitto_sub/rr for formatted/unformatted JSON
198+
output.
199+
- Add support for v5 property printing to mosquitto_sub/rr in non-JSON mode.
200+
Closes [#1416].
201+
- Add `--nodelay` to all clients to allow them to use the MOSQ_OPT_TCP_NODELAY
202+
option.
203+
- Add `-x` to all clients to all the session-expiry-interval property to be
204+
easily set for MQTT v5 clients.
205+
- Add `--random-filter` to mosquitto_sub, to allow only a certain proportion
206+
of received messages to be printed.
207+
- mosquitto_sub %j and %J timestamps are now in a ISO 8601 compatible format.
208+
- mosquitto_sub now supports extra format specifiers for field width and
209+
precision for some parameters.
210+
- Add `--version` for all clients.
211+
- All clients now load OS provided CA certificates if used with `-L
212+
mqtts://...`, or if port is set to 8883 and no other CA certificates are
213+
used. Closes [#1824].
214+
- Add the `--tls-use-os-certs` option to all clients.
215+
216+
# Client fixes
217+
- mosquitto_sub will now exit if all subscriptions were denied.
218+
- mosquitto_pub now sends 0 length files without an error when using `-f`.
219+
- Fix description of `-e` and `-t` arguments in mosquitto_rr. Closes [#1881].
220+
- mosquitto_sub will now quit with an error if the %U option is used on
221+
Windows, rather than just quitting. Closes [#1908].
222+
223+
[migrating from 1.x to 2.0]:/documentation/migrating-to-2-0/
224+
[#265]: https://github.com/eclipse/mosquitto/issues/265
225+
[#275]: https://github.com/eclipse/mosquitto/issues/275
226+
[#291]: https://github.com/eclipse/mosquitto/issues/291
227+
[#1222]: https://github.com/eclipse/mosquitto/issues/1222
228+
[#1258]: https://github.com/eclipse/mosquitto/issues/1258
229+
[#1311]: https://github.com/eclipse/mosquitto/issues/1311
230+
[#1416]: https://github.com/eclipse/mosquitto/issues/1416
231+
[#1526]: https://github.com/eclipse/mosquitto/issues/1526
232+
[#1611]: https://github.com/eclipse/mosquitto/issues/1611
233+
[#1735]: https://github.com/eclipse/mosquitto/issues/1735
234+
[#1814]: https://github.com/eclipse/mosquitto/issues/1814
235+
[#1819]: https://github.com/eclipse/mosquitto/issues/1819
236+
[#1822]: https://github.com/eclipse/mosquitto/issues/1822
237+
[#1824]: https://github.com/eclipse/mosquitto/issues/1824
238+
[#1825]: https://github.com/eclipse/mosquitto/issues/1825
239+
[#1831]: https://github.com/eclipse/mosquitto/issues/1831
240+
[#1833]: https://github.com/eclipse/mosquitto/issues/1833
241+
[#1842]: https://github.com/eclipse/mosquitto/issues/1842
242+
[#1846]: https://github.com/eclipse/mosquitto/issues/1846
243+
[#1862]: https://github.com/eclipse/mosquitto/issues/1862
244+
[#1866]: https://github.com/eclipse/mosquitto/issues/1866
245+
[#1880]: https://github.com/eclipse/mosquitto/issues/1880
246+
[#1881]: https://github.com/eclipse/mosquitto/issues/1881
247+
[#1891]: https://github.com/eclipse/mosquitto/issues/1891
248+
[#1897]: https://github.com/eclipse/mosquitto/issues/1897
249+
[#1902]: https://github.com/eclipse/mosquitto/issues/1902
250+
[#1908]: https://github.com/eclipse/mosquitto/issues/1908
251+
[#1911]: https://github.com/eclipse/mosquitto/issues/1911

0 commit comments

Comments
 (0)