|
1 | 1 | # Introduction
|
2 | 2 |
|
3 |
| -Authentication is an important part of most applications. MQTT protocol supports username/password authentication. Enabling authentication can effectively prevent illegal client connections. |
| 3 | +Authentication is an important part of most applications. MQTT protocol supports username/password authentication as |
| 4 | +well as some enhanced methods, like SCRAM authentication. Enabling authentication can effectively prevent illegal client connections. |
4 | 5 |
|
5 |
| -Authentication in EMQX Broker means that when a client connects to EMQX Broker, the server configuration is used to control the client's permission to connect to the server. |
| 6 | +Authentication in EMQX Broker means that when a client connects to EMQX Broker, the server configuration is used to control the client's permission to connect to the server. |
6 | 7 |
|
7 | 8 | EMQX Broker's authentication support includes two levels:
|
8 | 9 |
|
9 |
| -- The MQTT protocol specifies the user name and password in the CONNECT packet by itself. EMQX Broker supports multiple forms of authentication based on Username, ClientID, HTTP, JWT, LDAP, and various databases such as MongoDB, MySQL, PostgreSQL, Redis through plugins. |
| 10 | +- The MQTT protocol itself specifies authentication primitives. EMQX Broker supports multiple variants of MQTT-level authentication: |
| 11 | + * username/password authentication with various backends (MongoDB, MySQL, PostgreSQL, Redis and built-in database); |
| 12 | + * SCRAM authentication with built-in database; |
| 13 | + * JWT authentication; |
| 14 | + * authentication via custom HTTP API. |
10 | 15 | - At the transport layer, TLS guarantees client-to-server authentication using client certificates and ensures that the server verifies the server certificate to the client. PSK-based TLS/DTLS authentication is also supported.
|
11 | 16 |
|
12 |
| -This authentication methods supported by EMQX and the configuration methods of the corresponding plugins are introduced in this article. |
| 17 | +In this article we describe EMQX authentication and its configuration concepts. |
13 | 18 |
|
14 |
| -## Authentication method |
| 19 | +## Authentication sources and authentication chains |
| 20 | + |
| 21 | +Authentication source is an EMQX module that implements authentication. The following authentication sources are |
| 22 | +available by default: |
| 23 | + |
| 24 | +| mechanism | backend | description | |
| 25 | +| ---- | ------------------ | ----------- | |
| 26 | +| password_based | built_in_database | |
| 27 | +| password_based | mysql | |
| 28 | +| password_based | postgresql | |
| 29 | +| password_based | mongodb | |
| 30 | +| password_based | redis | |
| 31 | +| password_based | http | |
| 32 | +| jwt | | |
| 33 | +| scram | built_in_database | |
15 | 34 |
|
16 | 35 | EMQX supports the use of built-in data sources (files, built-in databases), JWT, external mainstream databases, and custom HTTP APIs as authentication data sources.
|
17 | 36 |
|
@@ -218,7 +237,7 @@ The cipher list supported by the server needs to be specified explicitly. The de
|
218 | 237 | listener.ssl.external.ciphers = ECDHE-ECDSA-AES256-GCM-SHA384,ECDHE-RSA-AES256-GCM-SHA384,ECDHE-ECDSA-AES256-SHA384,ECDHE-RSA-AES256-SHA384,ECDHE-ECDSA-DES-CBC3-SHA,ECDH-ECDSA-AES256-GCM-SHA384,ECDH-RSA-AES256-GCM-SHA384,ECDH-ECDSA-AES256-SHA384,ECDH-RSA-AES256-SHA384,DHE-DSS-AES256-GCM-SHA384,DHE-DSS-AES256-SHA256,AES256-GCM-SHA384,AES256-SHA256,ECDHE-ECDSA-AES128-GCM-SHA256,ECDHE-RSA-AES128-GCM-SHA256,ECDHE-ECDSA-AES128-SHA256,ECDHE-RSA-AES128-SHA256,ECDH-ECDSA-AES128-GCM-SHA256,ECDH-RSA-AES128-GCM-SHA256,ECDH-ECDSA-AES128-SHA256,ECDH-RSA-AES128-SHA256,DHE-DSS-AES128-GCM-SHA256,DHE-DSS-AES128-SHA256,AES128-GCM-SHA256,AES128-SHA256,ECDHE-ECDSA-AES256-SHA,ECDHE-RSA-AES256-SHA,DHE-DSS-AES256-SHA,ECDH-ECDSA-AES256-SHA,ECDH-RSA-AES256-SHA,AES256-SHA,ECDHE-ECDSA-AES128-SHA,ECDHE-RSA-AES128-SHA,DHE-DSS-AES128-SHA,ECDH-ECDSA-AES128-SHA,ECDH-RSA-AES128-SHA,AES128-SHA
|
219 | 238 | ```
|
220 | 239 |
|
221 |
| -## PSK authentication |
| 240 | +## PSK authentication |
222 | 241 | If you want to use PSK authentication, you need to comment out `listener.ssl.external.ciphers` in [TLS Authentication](#auth-tls), and then configure ` listener.ssl.external.psk_ciphers`:
|
223 | 242 |
|
224 | 243 | ```bash
|
|
0 commit comments