You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en_US/access-control/authn/ldap.md
+25-24Lines changed: 25 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -13,29 +13,27 @@ Knowledge about [basic EMQX authentication concepts](../authn/authn.md)
13
13
EMQX's LDAP integration includes two distinct authentication methods:
14
14
-**LDAP Bind Authentication**
15
15
16
-
EMQX directly uses LDAP binding to authenticate usernames and passwords. When a client connects, EMQX receives the provided username and password, then constructs a Distinguished Name (DN) using the configured `base_dn` and `filter`. It then attempts to bind (log in) to the LDAP server as the client using these credentials. If the bind operation succeeds, the authentication is accepted; otherwise, the connection is rejected.
16
+
EMQX directly uses LDAP binding to authenticate usernames and passwords. When a client connects, EMQX receives the provided username and password, then constructs a Distinguished Name (DN) using the configured `base_dn` and `filter`. It then attempts to bind (log in) to the LDAP server as the client using these credentials. If the bind operation succeeds, the authentication is accepted; otherwise, the connection is rejected.
17
17
18
-
This method relies solely on the existing LDAP user entries and does not require EMQX to retrieve or process any sensitive data like password hashes. It is simple to set up and does not require modifying the LDAP schema.
18
+
This method relies solely on the existing LDAP user entries and does not require EMQX to retrieve or process any sensitive data like password hashes. It is simple to set up and does not require modifying the LDAP schema.
19
19
20
-
This approach is suitable for situations where:
20
+
This approach is suitable for situations where:
21
21
22
-
- User accounts already exist in the LDAP server.
23
-
- The LDAP schema cannot be changed or extended.
24
-
- You prefer minimal setup, and the LDAP server handles authentication directly.
22
+
- User accounts already exist in the LDAP server.
23
+
- The LDAP schema cannot be changed or extended.
24
+
- You prefer minimal setup, and the LDAP server handles authentication directly.
25
25
26
26
-**Local Password Comparison**
27
27
28
-
EMQX connects to the LDAP server using the bind account specified by the `username` and `password` configuration options (i.e., the bind DN). It then locates the client’s LDAP entry and retrieves the stored password (usually in a hashed format) from a specific attribute. The provided client password is then compared with the retrieved hash locally within EMQX.
28
+
EMQX connects to the LDAP server using the bind account specified by the `username` and `password` configuration options (i.e., the bind DN). It then locates the client’s LDAP entry and retrieves the stored password (usually in a hashed format) from a specific attribute. The provided client password is then compared with the retrieved hash locally within EMQX.
29
29
30
-
This method provides greater flexibility and control over the authentication process. It supports various password hash algorithms, allows retrieval of additional user attributes, and can be integrated with custom authentication logic or security policies.
30
+
This method provides greater flexibility and control over the authentication process. It supports more complex validation logic and security strategies, and handles additional user attributes. For example, EMQX can retrieve the user's `isSuperUser` flag while querying the user's password, which means EMQX can determine whether the user has superuser privileges while authenticating, thereby providing different levels of access and operational capabilities based on the user's permission level.
31
31
32
-
This approach is suitable for situations where:
32
+
This approach is suitable for situations where:
33
33
34
-
- You need to store or process custom authentication attributes (e.g., `isSuperuser`, ACL rules).
35
-
- You have permission to configure schemas and data on the LDAP server.
36
-
- More advanced security or validation logic is required beyond simple LDAP binding.
37
-
38
-
In both methods, EMQX can retrieve additional attributes such as the `isSuperuser` flag or ACL rules from the LDAP entry, using the `base_dn` and `filter` configuration. These attributes can be used to determine administrative permissions or enforce fine-grained access control. For detailed information, see [Retrieve ACL Rules from LDAP](#retrieve-acl-rules-from-ldap).
34
+
- You need to store or process custom authentication attributes (e.g., `isSuperuser`, ACL rules).
35
+
- You have permission to configure schemas and data on the LDAP server.
36
+
- More advanced security or validation logic is required beyond simple LDAP binding.
4. Follow the instructions below for the configuration:
160
160
161
161
- Enter the information needed to connect to the LDAP server.
162
162
163
-
-**Server**: Specify the server address that EMQX connects to (`host:port`).
163
+
-**Server**: Specify the server address that EMQX is to connect (`host:port`).
164
+
164
165
-**Username**: Specifies the account name EMQX uses to bind to the LDAP server (i.e., the bind DN), for example: `cn=root,dc=emqx,dc=io`. This account must have permission to read user entries and is typically the same as the `rootdn` defined in the LDAP configuration file (e.g., `slapd.conf`).
166
+
165
167
-**Password**: The plaintext password corresponding to the above username, used to complete the bind operation. This value should match the actual password of the `rootpw` defined in the LDAP configuration.
166
168
167
169
-**Authentication configuration**: Fill in the authentication-related settings.
@@ -170,6 +172,7 @@ You can configure how to use LDAP for password authentication in the EMQX Dashbo
170
172
171
173
-**Bind Password**: Specifies the password that EMQX uses to authenticate itself to the LDAP server before it can perform any operations or queries. It is referenced through a placeholder `${password}` that will be resolved at runtime with the actual password defined in the configuration option **Password**.
172
174
175
+
173
176
-**Base DN**: Specifies the starting point (i.e., base DN) for LDAP search operations. EMQX begins searching for user entries that match the configured filter from this DN. Placeholders such as `${username}` are supported for dynamically constructing the client identity. For more information, see, see [RFC 4511 Search Request](https://datatracker.ietf.org/doc/html/rfc4511#section-4.5.1).
174
177
175
178
::: tip
@@ -180,19 +183,17 @@ You can configure how to use LDAP for password authentication in the EMQX Dashbo
180
183
181
184
-**Password Hash Attribute**: Specifies the attribute representing the user's password, applicable when `Local Password Comparison` is selected as the authentication method. The value of this attribute should follow [RFC 3112](#https://datatracker.ietf.org/doc/html/rfc3112), the supported algorithms are `md5`, `sha`, `sha256`, `sha384`, `sha512`, and `ssha`.
182
185
186
+
183
187
-**Is Superuser Attribute**: Identifies the attribute that indicates whether a user is a superuser, applicable when `Local Password Comparison` is selected as the authentication method. The value of this attribute should be in boolean, if absent is equal to `false`.
184
-
185
-
-**Precondition**: A [Variform expression](../../configuration/configuration.md#variform-expressions) used to control whether this LDAP authenticator should be applied to a client connection. The expression is evaluated against attributes from the client (such as `username`, `clientid`, `listener`, etc.). The authenticator will only be invoked if the expression evaluates to the string `"true"`. Otherwise, it will be skipped. For more information about the precondition, see [Authentication Preconditions](./authn.md#authentication-preconditions).
186
-
188
+
189
+
-**Precondition**: A [Variform expression](../../configuration/configuration.md#variform-expressions) used to control whether this LDAP authenticator should be applied to a client connection. The expression is evaluated against attributes from the client (such as `username`, `clientid`, `listener`, etc.). The authenticator will only be invoked if the expression evaluates to the string `"true"`. Otherwise, it will be skipped. For more information about the precondition, see [Authentication Preconditions](./authn.md#authentication-preconditions).
190
+
187
191
-**Enable TLS**: Turn on the toggle switch if you want to enable TLS. For more information on enabling TLS, see [Network and TLS](../../network/overview.md).
188
-
189
-
-**Filter**: Defines the criteria for the LDAP query. The filter sets conditions that an entry must meet to be considered a match.
190
-
The syntax of the filter follows [RFC 4515](#https://www.rfc-editor.org/rfc/rfc4515) and also supports placeholders.
191
-
192
+
-**Filter**: Defines the criteria for the LDAP query. The filter sets conditions that an entry must meet to be considered a match. The syntax of the filter follows [RFC 4515](#https://www.rfc-editor.org/rfc/rfc4515) and also supports placeholders.
192
193
-**Advanced Settings**: Set the concurrent connections and waiting time before a connection is timed out.
193
194
-**Connection Pool size** (optional): Input an integer value to define the number of concurrent connections from an EMQX node to LDAP. Default: `8`.
194
195
-**Query Timeout** (optional): Specify the waiting period before EMQX assumes the query is timed out. Default: `5` seconds.
195
-
196
+
196
197
5. After you finish the settings, click **Create**.
197
198
198
199
## Configure LDAP Authentication via Configuration Items
Copy file name to clipboardExpand all lines: en_US/access-control/authz/mongodb.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -12,11 +12,11 @@ Knowledge about [basic EMQX authorization concepts](./authz.md)
12
12
13
13
MongoDB authorizer supports storing authorization rules as MongoDB documents. Users need to provide a query template to make sure that the result contains the following fields:
14
14
15
-
*`permission` value specifies the applied action if the rule matches. It should be one of`deny` or `allow`.
16
-
*`action` value specifies the request for which the rule is relevant. Should be one of`publish`, `subscribe`, or `all`.
17
-
*`topic`value specifies the topic filter for topics relevant to the rule. Should be a string that supports wildcards and [topic placeholders](./authz.md#topic-placeholders).
18
-
*`qos` (Optional) value specifies the QoS levels that the current rule applies to. Value options are `0`, `1`, `2`. It can also be a number array to specify multiple QoS levels. The default is all QoS levels.
19
-
*`retain` (Optional) value specifies whether the current rule supports retained messages. Value options are `0`, `1,` or `true`, `false`. The default is to allow retained messages.
15
+
*`permission`: Specifies the applied action if the rule matches. Available values are`deny` or `allow`.
16
+
*`action`: Specifies the request for which the rule is relevant. Possible values are`publish`, `subscribe`, or `all`.
17
+
*`topic`/ `topics`: Specifies one or a list of topics the rule applies to. Supports topic filters and [topic placeholders](./authz.md#topic-placeholders).
18
+
*`qos` (optional): Specifies the QoS levels that the current rule applies to. Value options are `0`, `1`, `2`. It can also be a number array to specify multiple QoS levels. The default is all QoS levels.
19
+
*`retain` (optional): Indicates whether the rule allows publishing retained messages. Value options are `0`, `1,` or `true`, `false`. By default, retained messages are allowed.
20
20
21
21
Deny client with username `emqx_u` to publish to topic `t/1` with QoS 1:
22
22
@@ -50,7 +50,7 @@ When there is a significant number of users in the system, optimize and index th
50
50
51
51
For this MongoDB data schema, the corresponding Dashboard configuration parameter is **Filter**: `{ username = "${username}" }`.
52
52
53
-
## Configurate with Dashboard
53
+
## Configure with Dashboard
54
54
55
55
You can use EMQX Dashboard to configure how to use MongoDB for user authorization.
Copy file name to clipboardExpand all lines: en_US/changes/changes-ee-v4.md
+66Lines changed: 66 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,71 @@
1
1
# EMQX Enterprise Version 4
2
2
3
+
## e4.4.32
4
+
5
+
*Release Date: 2025-07-25*
6
+
7
+
### Enhancements
8
+
9
+
- Support for placeholders in HTTP headers in the HTTP AUTH/ACL module.
10
+
11
+
The HTTP AUTH/ACL module now supports using placeholders (such as `%u`, `%c`, etc.) in the values of HTTP request headers, allowing dynamic insertion of client information.
12
+
13
+
- Optimized default Erlang VM parameters.
14
+
15
+
-`+sbwt none +sbwtdcpu none +sbwtdio none`: Disables scheduler busy-waiting to reduce CPU consumption.
16
+
-`+sbt db`: Configures scheduler threads to use the default binding strategy to CPU cores.
17
+
-`+zdbbl 32768`: Increases the buffer size for distributed channels.
18
+
19
+
- Periodic global garbage collection (GC) is disabled by default.
20
+
21
+
The default value of the `node.global_gc_interval` configuration is now set to `Disabled`.
22
+
23
+
### Bug Fixes
24
+
25
+
- Fixed an issue where Kafka resources failed to authenticate using the "SCRAM_SHA_256" method.
26
+
27
+
## e4.4.31
28
+
29
+
*Release Date: 2025-07-15*
30
+
31
+
### Enhancements
32
+
33
+
- Improved performance of the Username Quota module.
34
+
35
+
When the Username Quota feature is enabled in a multi-node cluster, EMQX nodes need to frequently synchronize username state (i.e., mappings between usernames and client IDs) with other nodes, which can cause performance overhead. This version introduces batch synchronization, reducing CPU usage.
To prevent inconsistencies in the username quota table across nodes under certain extreme conditions, this version adds a scheduled refresh mechanism. EMQX will periodically fetch username status from other nodes to update the local quota table. The default interval is 15 minutes, and the minimum configurable value is 30 seconds.
40
+
41
+
- Added “Send Undefined Properties” option to the Republish action.
42
+
43
+
This option controls whether undefined MQTT properties and user properties are included in republished messages. When enabled, such properties are added with the string `"undefined"` as their value. When disabled, they will be omitted from the message.
44
+
45
+
- Improved HTTP API stability under high-latency network conditions.
46
+
47
+
Parts of the HTTP API implementation that relied on RPC have been refactored to use `gen_rpc`, avoiding contention for Erlang’s distributed RPC channels and reducing the risk of blocking.
48
+
49
+
- Optimized the query performance of the built-in database authentication (`auth_mnesia`).
50
+
51
+
Previously, the query performance of the built-in authentication database would degrade as the number of records increased, leading to high CPU consumption during periods of high-frequency or concurrent client logins. After the optimization, query performance is no longer affected by the number of records, resulting in improved authentication efficiency and overall system stability.
52
+
53
+
### Bug Fixes
54
+
55
+
- Fixed inconsistent routing tables or client global registries after cluster healing.
56
+
57
+
In cases where a network partition causes the cluster to split into overlapping subgroups, simply restarting the minority partition might not fully restore consistency. This could lead to issues such as messages not being routed to subscribers on other nodes, or failure to kick out clients via the HTTP API.
58
+
59
+
This version adjusts the cluster healing logic by ensuring that all nodes in both the minority partition and the overlapping group are restarted, ensuring consistency is restored across the cluster.
60
+
61
+
- Fixed ETS memory leak caused by exceptions in HTTP API calls.
62
+
63
+
Resolved an issue where exceptions during certain HTTP API calls could result in memory leaks in ETS tables.
64
+
65
+
- Fixed an issue where listeners could not be added to gateway modules via the Dashboard.
66
+
67
+
Previously, after creating a protocol gateway module, adding a listener through the module update interface had no effect. Affected protocols included CoAP, GB/T 32960, JT/T 808, LwM2M, MQTT-SN, STOMP, and TCP.
Copy file name to clipboardExpand all lines: en_US/design/emqx-essentials.md
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,5 +2,6 @@
2
2
3
3
This chapter serves as a comprehensive guide to understanding the essential components and concepts of MQTT and EMQX. In this chapter, you will learn the fundamental knowledge and practical insights about the MQTT protocol and the EMQX broker. Let's take a closer look at what you can expect to learn:
4
4
5
-
-[MQTT Guide](https://www.emqx.com/en/mqtt-guide) provides all you need to learn about MQTT.
6
-
-[Design and Implementation](../design/overview.md) introduce the design principles of some key EMQX features.
5
+
-[MQTT Guide](./mqtt-guide.md) provides all you need to learn about MQTT, from basics to advanced.
6
+
-[Design and Implementation](../design/overview.md) introduces the design principles of some key EMQX features.
0 commit comments