Commit Graph

102 Commits

Author SHA1 Message Date
Roger A. Light
4ca294fd9c Warn on lax permissions on sensitive files.
- Broker will log warnings if sensitive files are world readable/writable, or
  if the owner/group is not the same as the user/group the broker is running
  as. In future versions the broker will refuse to open these files.
2023-08-16 14:01:21 +01:00
Roger A. Light
4f9c5567ba Fix example plugin incorrect callback unregister.
Closes #2673. Thanks to Karl Palsson.
2023-04-01 22:36:38 +01:00
Roger A. Light
1195dd991e Clearer len calculation. 2023-04-01 08:50:03 +01:00
Roger Light
ec6a56d759
Merge pull request #2734 from axos88/patch-1
Fix malloc size for file path
2023-04-01 08:48:30 +01:00
Akos Vandra-Meyer
e0d8ef20fa
Fix malloc size for file path
We need 4 more characters to store the suffix.
2023-01-20 21:13:54 +01:00
Roger Light
a54e5e3abc
Merge pull request #2689 from zivillian/patch-1
fix example JSON
2022-12-07 22:42:45 +00:00
zivillian
a562c93079 fix example JSON
Signed-off-by: zivillian <devel@zivillian.de>
2022-11-22 20:26:38 +01:00
Roger Light
db114fa1d3
Merge pull request #2614 from HashimJVZ/patch-1
Correct a wrong example
2022-10-10 11:26:01 +01:00
Roger A. Light
9d9469cbec Merge branch 'fixes' 2022-08-16 13:13:06 +01:00
Roger A. Light
4d1b587e29 dynsec: Forbid deleting the anon group. 2022-08-16 12:55:48 +01:00
Roger A. Light
df317ff71f Dynamic security: Fix the plugin being able to be loaded twice.
Currently only a single plugin can interact with a unique $CONTROL
topic. Using multiple instances of the plugin would produce duplicate
entries in the config file.

Closes #2601.
Closes #2470.
2022-08-16 01:27:55 +01:00
Roger A. Light
436f0b9348 dynsec: Fix modifyClient and modifyGroup commands
They will now not modify the client/group if a new group/client being
added is not valid, or on other failures.

Closes #2598. Thanks to Sebastian Szczepański.
2022-08-16 00:48:02 +01:00
Roger A. Light
b22df5140e Clear errno before check. 2022-08-16 00:23:06 +01:00
Muhammed Hashim
b3e26c21d7
Correct a wrong example
mosquitto_ctrl example for setClientId was provided with wrong example (duplicate of setClientPassword).
2022-08-13 11:24:59 +05:30
Roger A. Light
80c7726d5c Fix confusing error message when dynamic security config file was a directory.
Closes #2520. Thanks to sezanzeb
2022-08-12 08:34:56 +01:00
Roger A. Light
4ac8c0bcc3 Add deny-protocol-version example plugin, for 2.0 only. 2022-05-17 21:11:46 +01:00
Roger A. Light
96931643a4 Use strings.h for strcasecmp, except on Windows.
Closes #2420. Thanks to Frédéric Fauberteau.
2022-02-24 12:02:16 +00:00
Konstantin Podsvirov
c4d51f0835 Fix DESTINATION for mosquitto_dynamic_security MODULE
On Windows MODULE will be installed as LIBRARY component
to `lib` folder that is not prefer for dynamic loaded modules
but can be found in RUNTIME DESTINATION (`bin` folder) too.

Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 17:11:09 +03:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger Light
c01ae67af7 Fix openssl not being linked to dynamic security plugin.
Closes #2277. Thanks to LeSuisse.
2021-08-21 09:45:26 +01:00
Roger Light
e1c8f09372 Remove C++ style comments. 2021-04-25 22:26:12 +01:00
Martin Hauke
e21eaeca37 CMake: Fix undefined symbols in plugins 2021-04-06 21:15:08 +02:00
Roger Light
117e59b7cf Fix CMake cross compile builds not finding opensslconf.h.
Closes #2160. Thanks to Ozaq.
2021-04-01 21:53:13 +01:00
Roger Light
a5d9986cbd More compiler warning fixes. 2021-03-21 22:50:48 +00:00
Roger Light
2de8c15bc9 Minor build fixes. 2021-03-21 09:18:43 +00:00
Roger A. Light
2749b8c5b8 Merge branch 'fixes' 2021-01-28 12:28:53 +00:00
Roger A. Light
706a1f3f29 Fix more minor compiler warnings. 2021-01-21 13:33:54 +00:00
Roger A. Light
a4389fc9ce Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
The two licenses are the same.
2021-01-20 11:46:18 +00:00
Roger A. Light
9f9f92104b Add trivial basic authentication plugin based on IP. 2021-01-12 22:51:33 +00:00
Roger A. Light
5927778ae5 Improve logging in dynsec addGroupClient command.
Closes #2008. Thanks to Willem Eradus.
2021-01-11 13:28:20 +00:00
Roger Light
c4f4fae5a0 dynsec: Improve logging in addGroupRole.
Close #2005. Thanks to Willem Eradus.
2021-01-10 23:04:01 +00:00
Roger A. Light
370cec5edd Fixes for lots of minor build warnings highlighted by Visual Studio. 2021-01-09 21:06:08 +00:00
Roger Light
7e1a818c54 Fix invalid behaviour in dynsec plugin.
This occurred if a group or client was deleted before a role that was
attached to the group or client is deleted.

Closes #1998. Thanks to Willem Eradus.
2021-01-08 00:01:10 +00:00
Roger A. Light
7fc472232c Merge branch 'fixes' 2020-12-22 16:56:29 +00:00
Roger A. Light
b8962cc040 Add more log messages for dynsec load/save error conditions. 2020-12-22 10:00:23 +00:00
Roger A. Light
c6a6165f3b Fix dynamic security configuration possibly not being reloaded on Windows only.
Closes #1962. Thanks to martgeier.
2020-12-20 23:02:19 +00:00
Peter Robinson
9d7580fdb6 Use libdir as the install prefix for plugins
Use the libdir variable from config.mk just like lib/ uses to ensure
that the plugins are installed into the same location as the library.
This fixes systems that use lib64 for libraries like most 64 bit
Linux distributions.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2020-12-18 08:05:06 +00:00
Roger A. Light
f7dc138157 Fix install target when using WITH_CJSON=no.
Closes #1938. Thanks to apple3306 and JulianCaruso.
2020-12-11 00:07:11 +00:00
Roger A. Light
f54360d228 Don't install example plugins. 2020-12-09 22:37:55 +00:00
Roger A. Light
3047374693 Drop hard coded linker flags. 2020-12-06 07:43:59 +00:00
Roger A. Light
791c63372b Fix cjson include paths. 2020-12-04 22:15:19 +00:00
Roger A. Light
26ffe1300a Various Windows build fixes. 2020-12-02 19:49:14 +00:00
Roger A. Light
550c54701e Fix cmake build when cjson not available. 2020-12-02 15:50:33 +00:00
Roger A. Light
42f09b8add Build fixes 2020-12-02 10:36:00 +00:00
Roger A. Light
3731535298 Add SPDX license identifiers. 2020-12-01 20:46:56 +00:00
Roger A. Light
0a7afd22c4 dynsec: Fix logging args. 2020-11-30 13:13:48 +00:00
Roger A. Light
692fa5537d dynsec: Reply with error on add role fail. 2020-11-30 10:32:09 +00:00
Roger A. Light
0605fd402a dynsec: Command logging. 2020-11-30 10:10:12 +00:00
Roger A. Light
e5af6def25 dynsec: Simplify 2020-11-29 23:26:57 +00:00
Roger A. Light
d0d36b7c33 dynsec: Remove unused code 2020-11-29 23:17:39 +00:00