Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend dynsec_clients__process_get to return which client was not found #3177

Open
RoyBellingan opened this issue Dec 3, 2024 · 0 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@RoyBellingan
Copy link

RoyBellingan commented Dec 3, 2024

Currently a request like

mosquitto_pub -t '$CONTROL/dynamic-security/v1' -u "x" -P "y" -m '
{
    "commands": [
        {
            "command": "getClient",
            "username": "PeterPan"
        }
    ]
}'

Returns

{
    "responses": [
        {
            "command": "getClient",
            "error": "Client not found"
        }
    ]
}

Because is not possible to connect which request lead to which response, I suggest to change the line

dynsec__command_reply(j_responses, context, "getClient", "Client not found", correlation_data);

to contain also the username, in a somewhat similar way to what happens just a bit down below in case of a success full answer

If is ok, I can prepare the code and the PR

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

1 participant