> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/1-10-1/documentation/user-management/mqtt-users.md).

# MQTT Users

There are two ways to authenticate MQTT clients depending on the configuration of the Broker’s [environment variable](/1-10-1/documentation/environment-variables.md) *CYBUS\_BROKER\_USE\_MUTUAL\_TLS*. If set to `no` username and password need to be provided to the MQTT client; if set to `yes` then mutual TLS is activated in the Broker and MQTT clients need to provide an x.509 certificate that is valid for the CA cert installed for Connectware.

Mutual TLS works only over the MQTT connection scheme and needs a certificate created with a Common Name (CN) that matches a Connectware username with grant type *certificate*. When using Mutual TLS no username and password are required for authentication as the possession of the certificate implies the right to access the Broker.

The credentials of a User with grant type *password* can be used with an MQTT client to connect to Connectware and then subscribe topics and/or publish data on topics.

* *Subscriptions* are permitted on the topics with the `read` permission.
* *Publishing* is permitted on topics with the `write` permission.
* Topics with the `readWrite` permission are available for both *subscribing and publishing*.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cybus.io/1-10-1/documentation/user-management/mqtt-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
