Commit Graph

245 Commits (385ddd7d869f17d560eabd4bfdd6307303c4876f)

Author SHA1 Message Date
Roger A. Light 68c002bc55 Plugin event counter example plugin. 4 years ago
Roger A. Light 14d1c32f9d Update changelog. Style, whitespace and, linker fixes. 4 years ago
Roger A. Light 96931643a4 Use strings.h for strcasecmp, except on Windows.
Closes #2420. Thanks to Frédéric Fauberteau.
4 years ago
Norbert Heusser e7e8b6e832 * Added list of connections to dynsec/getClient response
* Added new helper function mosquitto_apply_on_all_clients to broker
* Refactoring in dynamic-security plugin

Signed-off-by: Norbert Heusser <norbert.heusser@cedalo.com>
4 years ago
Roger A. Light 02d08b9889 wildcard-temp: Don't attempt to delete from an empty list. 4 years ago
Roger A. Light a0f58f20c3 Update threaded builds.
Most specifically use -pthread instead of -lpthread.
4 years ago
Roger A. Light ffb7661d86 Move shared code to common directory
This is currently limited to "utility" type functions and does not include code common to the library and broker that are protocol related.
4 years ago
Roger A. Light 5a3b42d4a4 Use path vars in Makefiles. 4 years ago
Roger A. Light aae7c406fe wildcard-temp plugin: Fix use after free. 4 years ago
Roger A. Light d3f0d28d65 Persist-sqlite: Default to "normal" synchronous mode. 4 years ago
Roger A. Light 374f547b64 Persist sqlite: Store client connection time. 4 years ago
Roger A. Light bc1adfd46d CMake fixes.
Builtin websockets support.
Persist sqlite plugin build.
Broker cJSON support
Add wildcard-temp plugin.
4 years ago
Roger A. Light 6b32cf61b2 CMake build fixes, including sqlite support. 4 years ago
Roger A. Light 8d073771c3 Make some plugin code shared for future use. 4 years ago
Roger A. Light d032c94d14 Remove global vars. 4 years ago
Roger A. Light 4adce6d0da Add anonymous group when generating dynsec config. 4 years ago
Roger A. Light 11c5cf039f Simplify memory use for dynsec. 4 years ago
Roger A. Light 34dc62be86 Document wildcard_temp plugin. 4 years ago
Roger A. Light dc906c5221 Sqlite persistence plugin. 4 years ago
Roger A. Light 5b2e181c9f Example client lifetime and payload size stat plugins. 4 years ago
Roger A. Light f43f136af8 Plugin for wildcard subscription blocking. 4 years ago
Roger A. Light cd28187e5e Minor refactor to separate files. 4 years ago
Roger A. Light 17fd1929eb Move config load/save to own file. 4 years ago
Roger A. Light 2501a64035 Merge branch 'master' into develop 4 years ago
Roger A. Light 2976dffa71 Plugin template CMakeLists. 4 years ago
Roger A. Light 34b41a3b01 Dynsec: Add ability to deny wildcard subscriptions for a role 4 years ago
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>
4 years ago
Roger Light cd07f1136b Bump copyrights. 4 years ago
Roger A. Light 8ac11929cc Merge branch 'master' into develop 4 years ago
Roger A. Light b9b065d2cc Compiler pedantry, and more checks in tests. 4 years ago
Roger A. Light 91e8344a3e Windows build fixes. 4 years ago
Roger A. Light 799cdead15 Experimental custom websockets support. 4 years ago
Roger A. Light a1a190b482 Pointless whitespace tidy. 4 years ago
Roger A. Light 55d5d2e5f2 Fix for building when uthash not available. 4 years ago
Roger A. Light 2bfc7e7cc8 Do plugin callback unregistering automatically. 4 years ago
Roger A. Light 6763d94962 Add plugin version helper. 4 years ago
Roger A. Light 0f2f77c945 Improve idle / mux timeout performance. 4 years ago
Roger Light dbd0d6f0d8 CMake build fixes. 4 years ago
Roger A. Light 7697406d3a Add topic modification example plugin. 4 years ago
Roger A. Light a25fc166a8 Add $CONTROL/broker/v1 control & the `getPluginInfo` command. 4 years ago
Roger A. Light 3413001d47 Add `mosquitto_plugin_set_info()`
This allows plugins to tell the broker their name and version.
4 years ago
Roger A. Light aa29b45e70 Merge branch 'master' into develop 4 years ago
Roger A. Light 76c9e44deb Test config and scripts for example plugins. 4 years ago
Roger A. Light 869016b831 Add print-ip-on-publish example plugin. 4 years ago
Roger Light c01ae67af7 Fix openssl not being linked to dynamic security plugin.
Closes #2277. Thanks to LeSuisse.
4 years ago
Roger A. Light c862ffec8b Allow mosquitto_ctrl dynsec module to update passwords in files 4 years ago
Roger Light 42b45e0c89 Build fixes. 4 years ago
Roger Light fe007b2fe2 Example plugin that forces all messages to be retained. 4 years ago
Roger A. Light 14993528ab Dynsec will generate a config file if it is not found. 4 years ago
Roger A. Light 182384440b Password salts are now 64 bytes long. 4 years ago
Roger A. Light 192a092d50 Add support for pattern ACLs to dynsec un/subscription ACLs. 4 years ago
Roger A. Light e0309acebc Add mosquitto_sub_matches_acl()
This moves the sub matching sub code from the dynsec plugin to the library and broker, and removes all of the malloc calls at the same time.
4 years ago
Roger A. Light 0cd2619401 Add %c and %u support to dynsec publish ACLs. 4 years ago
Roger A. Light 214feb8f6b Merge branch 'fixes' into develop 4 years ago
Roger A. Light 0d3870585b Plugin delayed authentication. 4 years ago
Roger Light 0a90e62f93 CMake tidy. 4 years ago
Roger A. Light b7b3a42e75 Strict build fixes. 4 years ago
Roger Light e1c8f09372 Remove C++ style comments. 4 years ago
Roger Light ef7662ca8e Merge branch 'master' into develop 4 years ago
Martin Hauke e21eaeca37 CMake: Fix undefined symbols in plugins 5 years ago
Roger Light 117e59b7cf Fix CMake cross compile builds not finding opensslconf.h.
Closes #2160. Thanks to Ozaq.
5 years ago
Roger A. Light c17c6a9028 Move example plugins to their own directory. 5 years ago
Roger Light a5d9986cbd More compiler warning fixes. 5 years ago
Roger Light 2de8c15bc9 Minor build fixes. 5 years ago
Simon Christmann 54ce48d1b6
plugin example: add user properties
Signed-off-by: Simon Christmann <simon@christmann.email>
5 years ago
Simon Christmann 182e294a4f
plugin example: printf
Signed-off-by: Simon Christmann <simon@christmann.email>
5 years ago
Roger A. Light fd036b9435 Merge branch 'fixes' into develop 5 years ago
Roger A. Light 2749b8c5b8 Merge branch 'fixes' 5 years ago
Roger A. Light 706a1f3f29 Fix more minor compiler warnings. 5 years ago
Roger A. Light a4389fc9ce Fix SPDX identifiers: EDL-1.0 -> BSD-3-Clause.
The two licenses are the same.
5 years ago
Roger A. Light 0087431bf4 Add MOSQ_EVT_CONNECT event.
This allows plugins to know when a client has successfully authenticated
to the broker.

Add connection-state example plugin to demonstrate MOSQ_EVT_CONNECT.
5 years ago
Roger A. Light 9f9f92104b Add trivial basic authentication plugin based on IP. 5 years ago
Roger A. Light 5927778ae5 Improve logging in dynsec addGroupClient command.
Closes #2008. Thanks to Willem Eradus.
5 years ago
Roger Light c4f4fae5a0 dynsec: Improve logging in addGroupRole.
Close #2005. Thanks to Willem Eradus.
5 years ago
Roger A. Light 370cec5edd Fixes for lots of minor build warnings highlighted by Visual Studio. 5 years ago
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.
5 years ago
Roger A. Light 7fc472232c Merge branch 'fixes' 5 years ago
Roger A. Light b8962cc040 Add more log messages for dynsec load/save error conditions. 5 years ago
Roger A. Light c6a6165f3b Fix dynamic security configuration possibly not being reloaded on Windows only.
Closes #1962. Thanks to martgeier.
5 years ago
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>
5 years ago
Roger A. Light f7dc138157 Fix `install` target when using WITH_CJSON=no.
Closes #1938. Thanks to apple3306 and JulianCaruso.
5 years ago
Roger A. Light f54360d228 Don't install example plugins. 5 years ago
Roger A. Light 3047374693 Drop hard coded linker flags. 5 years ago
Roger A. Light 791c63372b Fix cjson include paths. 5 years ago
Roger A. Light 26ffe1300a Various Windows build fixes. 5 years ago
Roger A. Light 550c54701e Fix cmake build when cjson not available. 5 years ago
Roger A. Light 42f09b8add Build fixes 5 years ago
Roger A. Light 3731535298 Add SPDX license identifiers. 5 years ago
Roger A. Light 0a7afd22c4 dynsec: Fix logging args. 5 years ago
Roger A. Light 692fa5537d dynsec: Reply with error on add role fail. 5 years ago
Roger A. Light 0605fd402a dynsec: Command logging. 5 years ago
Roger A. Light e5af6def25 dynsec: Simplify 5 years ago
Roger A. Light d0d36b7c33 dynsec: Remove unused code 5 years ago
Roger A. Light 31e3fa4d07 dynsec: Invalid UTF-8 tests, plus some fixes. 5 years ago
Roger A. Light c303c67461 dynsec: Return group not found on getGroup. 5 years ago
Roger A. Light 423e1a00d2 dynsec: Tests for group commands with invalid params, plus fixes. 5 years ago
Roger A. Light 6739152fda dynsec: Various minor fixes. 5 years ago
Roger A. Light 598b1d7b00 dynsec: Fix free on modifyClient. 5 years ago
Roger A. Light ba8e888e41 dynsec: Refactor some cJSON adding code to reduce redundancy 5 years ago
Roger A. Light d8775b7d9c dynsec: Consistent behaviour when setting clientid. 5 years ago
Roger A. Light c1489fc704 dynsec: Refactor duplicate group kick code. 5 years ago
Roger A. Light 7dc739a11e Disable dynsec build if cJSON or TLS not available. 5 years ago
Roger A. Light 782696c8e4 Simplify, remove duplication. 5 years ago
Roger A. Light c3daa247c2 dynsec: Cover setClientId in 14-dynsec-auth test. 5 years ago
Roger A. Light 584cf51ba7 Update to EPL-2.0 5 years ago
Roger A. Light 69f7fcae82 Support cJSON < 1.7.13. 5 years ago
Roger A. Light 5db971a0e9 dynsec: Client id is optional in setClientID. 5 years ago
Roger A. Light 0c6365726f Coverity Scan issues.
1436823
1436837
1436843
1432792
1436847
1436848
1436849
5 years ago
Roger A. Light f83fcc8535 Fix Coverity Scan issues.
1436866
1436865
1436864
1436862
1436857
1436856
1436852
1436851
5 years ago
Roger A. Light d1bf2c0d13 dynsec: Fix missing correlationData for getDefaultACLAccess. 5 years ago
Roger A. Light 7791d882c2 dynsec: Allow empty anonymous group. 5 years ago
Roger A. Light 5314bae1e2 dynsec: getAnonymousGroup should include correlation data in response. 5 years ago
Roger A. Light 4150b2f233 dynsec: Ignore empty passwords on setClientPassword/modifyClient. 5 years ago
Roger A. Light e94cf19989 dynsec: Ignore zero length clientid. 5 years ago
Roger A. Light 4f9fe4df4d dynsec: Rolelist as own file for consistency. 5 years ago
Roger A. Light fe436cda95 dynsec: Fix potential grouplist leaks. 5 years ago
Roger A. Light 20bf6e706e dynsec: Fix role clientlists not being freed. 5 years ago
Roger A. Light 67fbe5cc7e dynsec: Fix some keys being accessed even if they don't exist. 5 years ago
Roger A. Light 63277aad0b dynsec: setClientId should cope with missing/empty client id. 5 years ago
Roger A. Light eac0c3bac0 dynsec: modifyClient can now change clientid and password. 5 years ago
Roger A. Light dbcf945518 dynsec: Kick clients after password changes. 5 years ago
Roger A. Light b06c5cd88f dynsec: Add setClientId command. 5 years ago
Roger A. Light 91584a90a2 Fix dynsec plugin cmake build 5 years ago
Roger A. Light c5fe1fc36b Dynsec: Fix loading of clients with no password. 5 years ago
Roger A. Light 95139cccff Dynsec: If priority is equal when ordering, use group/role name as well. 5 years ago
Roger A. Light 4d6384c758 Build and conversion fixes for build variants. 5 years ago
Roger A. Light 801e31efda Dynsec: Validate user/group/role names as UTF-8. 5 years ago
Roger A. Light 7462fec1c8 Dynsec: Check ACLs are valid topic filters. 5 years ago
Roger A. Light 3486f0e546 Dynsec: Kick affected clients on role change. 5 years ago
Roger A. Light bb840ed55b Conversion fixes. 5 years ago
Roger A. Light 866c395dcc Dynsec: Add "disabled" property for getClient/listClients. 5 years ago
Roger A. Light 5b28fac61d Dynsec: Kick clients on access changes
This works in the following circumstances:

* client is deleted
* client is modified
* client has role added
* client has role removed
* group is deleted
* group is modified
* group has role added
* group has role removed
* group has client added
* group has client removed
* anonymous group is changed

The following circumstances are not yet fixed:

* role is deleted
* role is modified
* role has ACL added
* role has ACL removed
5 years ago
Roger A. Light 30bf47b0d1 Fix printing of ints in dynsec json. 5 years ago
Roger A. Light 66d16280d8 dynsec: Add enableClient disableClient commands. 5 years ago
Roger A. Light 31b1cbb23f dynsec: Clients can be created with no password.
They will be unable to log in until a password is created.
5 years ago
Roger A. Light df30b6c9d4 Dynsec: add getAnonymousGroup and getDefaultACLAccess commands 5 years ago
Roger A. Light c9cb10a079 ctrl: get* output for dynsec. 5 years ago
Roger A. Light a1ad4cfcc4 Dynsec: Rename ACL types for clarity.
publishBrokerToClient -> publishClientReceive
publishClientToBroker -> publishClientSend
5 years ago
Roger A. Light fdff255916 New dynamic security plugin. 5 years ago
Roger A. Light b36247cb10 Fix payload example mosquitto_plugin_version() calls. 5 years ago
Roger A. Light af99071c1e Add example payload modification plugin. 5 years ago
Roger A. Light 7bd3822817 Consistent use of config.mk. 5 years ago
Roger A. Light 687ca36c07 Makefile build fixes for message-timestamp plugin. 5 years ago
Roger A. Light 89733138bb CMake build fixes. 5 years ago
Roger A. Light 6c6542a8fa Example plugin for adding timestamp properties to MQTT v5 messages.
For #1225.
5 years ago