-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
cannot create role using dynamic security API #2982
Comments
I see this in the response. So I am not sure how to format the request apparently. { |
I was able to get it to work.
|
using php dynamic security plugin to build new roles.
$mqtt->publish( '$CONTROL/dynamic-security/v1', '[{ "commands":[ { "command": "createRole", "rolename": "'.$devkey.'", "textname": "", "textdescription": "", "acls": [ { "acltype": "subscribePattern", "topic": "'.$appkey.'/'.$devkey.'/#", "priority": -1, "allow": true} ] } ] } ]', 2, true );
I have viewed the tcpdump for the docker container in wireshark. I am getting a published received message back, I see it in the log too.
1705830107: New connection from 192.168.0.210:41152 on port 1883. 1705830107: New client connected from 192.168.0.210:41152 as php_admin (p2, c0, k60, u'PHPadmin'). 1705830107: No will message specified. 1705830107: Sending CONNACK to php_admin (1, 0) 1705830107: Received PUBLISH from php_admin (d0, q2, r1, m1, '$CONTROL/dynamic-security/v1', ... (496 bytes)) 1705830107: Sending PUBREC to php_admin (m1, rc0) 1705830108: Received DISCONNECT from php_admin 1705830108: Client php_admin disconnected.
I do not see these roles being created. I am running a cedalo / MQTT docker container.
I cannot get info out of the docker container for some reason it says the -u option is not recognized.
docker exec -it d53b6546e29f mosquitto_ctrl dynsec -u -P listRoles
Command '-u' not recognised.
The text was updated successfully, but these errors were encountered: