-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Description
I am currently developing a tool that interacts with the Dynamic Security Plugin via its JSON API.
To ensure compatibility and provide a seamless user experience, my application needs to know which version of the plugin is currently running. This is crucial because features and behaviors change across releases.
Example Case:
Support for %c and %u patterns was introduced in version 2.1. If my application intends to use these patterns, it currently has no way to programmatically verify if the running plugin instance actually supports them. Without this information, the application might send commands that result in errors or unexpected behavior on older versions.
Suggested Implementation
It would be ideal if the version information could be retrieved directly via the Dynamic Security API.
Although this information could theoretically be exposed via $CONTROL/broker/v1, I believe it should be part of the Dynamic Security Plugin's command set. Reason: A user/client with permissions to manage dynamic security may not necessarily have administrative access to the broader Control API.
Proposed command example:
{
"commands": [
{
"command": "getVersion"
}
]
}Proposed response example:
{
"responses": [
{
"command": "getVersion",
"version": "2.1.2",
}
]
}Alternative suggestions:
- Publish the version via the
$CONTROL/broker/v1topic. - Publish the Mosquitto version via the
$CONTROL/broker/v1topic (if it can be assumed that the versions of the Dynamic Security plugin and Mosquitto always match).
I would appreciate your feedback.
C is not my everyday language, but I would also attempt to implement it if there is interest.