Skip to main content
Version: Mosquitto 2.7

Terminal

The terminal page allows to execute commands executed on the current broker connection to modify dynamic security settings or retrieve information about the existing settings. Simply type one of below listed commands to achieve that. You can also type 'help' to get a list of valid commands and if you add '--help' to a command, the help for that command is displayed.

See here for a detailed description of the concepts of the dynamic security feature.

The following commands are available in the terminal. Click on the command to get more information.

Clients

Groups

Roles


createClient

Create a new client.

Syntax

createClient <name> <password> <clientid> <rolename> <textname> <description>

Arguments

NameDescription
nameName of new client
passwordPassword of new client
clientidUnique client Id
textnameOptional. Additional name
descriptionOptional. Description for the client

deleteClient

Delete a client

Syntax

deleteClient <name>

Arguments

NameDescription
nameName of client to delete

disableClient

Disable or disconnect a client

Syntax

disableClient <name>

Arguments

NameDescription
nameName of client to disconnect

enableClient

Enable or connect a client

Syntax

enableClient <name>

Arguments

NameDescription
nameName of client to connect or enable

getClient

Get the details for a client

Syntax

getClient <name>

Arguments

NameDescription
nameName of client to retrieve infos for

Return

Returns name, textname, id, roles and groups of client, if client exists.


listClients

List all clients

Syntax

listClients

Arguments

None.

Return

List of all clients separated by line-feeds.


modifyClient

Apply changes to an existing client.

Syntax

modifyClient <name> <password> <clientid> <textname> <description>

Arguments

NameDescription
nameName of client to modify
passwordPassword of client
clientidUnique client Id
textnameOptional. Additional name
descriptionOptional. Description for the client

addGroupClient

Add a client to a group

Syntax

addGroupClient <name> <groupname> <priority>

Arguments

NameDescription
nameName of client to add
groupnameName of group to add client to
priorityTODO

addGroupRole

Add a role to a group

Syntax

addGroupRole <groupname> <rolename> <priority>

Arguments

NameDescription
groupnameName of group
rolenameName of role to assign to group
priorityTODO

createGroup

Create a new group.

Syntax

createGroup <name> <rolename> <textname> <description>

Arguments

NameDescription
nameName of new group
nameRole to assign to group
nameOptional. Additional text name for group
nameOptional. Description for group

deleteGroup

Delete a group

Syntax

deleteGroup <name>

Arguments

NameDescription
nameName of group to delete

getAnonymousGroup

Get anonymous group

Syntax

getAnonymousGroup

Arguments

None

Return

Name of current anonymous group.


getGroup

Get the details for a group

Syntax

getGroup <name>

Arguments

NameDescription
nameName of group to retrieve infos for

Return

Return name, textname, description, roles and clients of the group.


listGroups

List all groups

Syntax

listGroups

Arguments

None.

Return

List all groups separated by line-feeds.


modifyGroup

Modify a group

Syntax

modifyGroup <name> <textname> <description>

Arguments

NameDescription
nameName of group to modify
textnameNew additional text name for group
descriptionNew description for group

removeGroupClient

Remove a client from a group

Syntax

removeGroupClient <clientname> <name>

Arguments

NameDescription
clientnameName of client to remove from group
nameName of group to delete client from

removeGroupRole

Remove a role from a group

Syntax

removeGroupRole <name> <rolename>

Arguments

NameDescription
nameName of group to delete role from
rolenameName of group

setAnonymousGroup

Set anonymous group

Syntax

setAnonymousGroup <name>

Arguments

NameDescription
nameName of group to use for anonymous access

addRoleACL

Add Access control list to role.

Syntax

addRoleACL <name> <acltype> <topic filter> allow|deny <priority>

Arguments

NameDescription
nameName of role to add ACL to
acltypeValid acltypes are: 'publishClientSend', 'publishClientReceive', 'subscribeLiteral', 'subscribePattern', 'unsubscribeLiteral', 'unsubscribePattern'
topic filterTopic expression to apply ACL for
flag'allow' or 'deny'
priorityTODO

createRole

Create a new role

Syntax

createRole <name> <textname> <description>

Arguments

NameDescription
nameName of new role
textnameOptional. Additional Name of new role
descriptiomOptional. Description of new role

deleteRole

Delete a role

Syntax

deleteRole <name>

Arguments

NameDescription
nameName of role to delete

getDefaultACLAccess

Get the default ACL access

Syntax

getDefaultACLAccess

Arguments

None.

Return

ACL access flags for 'publishClientSend', 'publishClientReceive', 'subscribe', 'unsubscribe'


getRole

Get the details for a role

Syntax

getRole <name>

Arguments

NameDescription
nameName of role to get infos for

Return

Returns name, textname and description for a role and a list of all defined ACLs with their ACL-Type, Allow/Deny flag priority and topic.


listRoles

List all roles

Syntax

listRoles

Arguments

None

Return

List of defined roles separated by line-feeds.


modifyRole

Modify a role

Syntax

modifyRole <name> <textname> <textdescription>

Arguments

NameDescription
nameName of role to modify
textnameNew additional name of role
descriptionNew description of role

removeRoleACL

Remove an ACL from a role

Syntax

removeRoleACL <name> <acltype> <topic>

Arguments

NameDescription
nameName of role to change
acltypeValid acltypes are: 'publishClientSend', 'publishClientReceive', 'subscribeLiteral', 'subscribePattern', 'unsubscribeLiteral', 'unsubscribePattern'
topicTopic to change ACL for

setDefaultACLAccess

Set the default ACL access.

Syntax

setDefaultACLAccess <acltype> true|false

Arguments

NameDescription
acltypeType to change. Valid types are 'publishClientSend', 'publishClientReceive', 'subscribe', 'unsubscribe'
flagFlag to enable or disable access