Builtin database authentication/ACL

Builtin database authentication uses EMQX builtin Mnesia database to store the client’s Clientid/Username and password, and supports management of authentication data through HTTP API.

The builtin database authentication does not rely on external data sources and is simple and lightweight enough to use.

Create module

Open EMQX DashboardBuiltin DB AUTH/ACL - 图1 (opens new window), click the “Modules” tab on the left, and choose to add:

image-20200928161310952

Click “Select”, and then select the builtin database authentication module

image-20200928141305205

Configure related parameters

image-20200927213049265

Finally, click the “Add” button to add the module successfully.

image-20200928141558866

Manage data

The builtin database can manage authentication and access control data through the dashboard

image-20200928141558866

Authentication data

The authentication data can be managed through the dashboard

image-20200928141558866

When the client connects to EMQX, the builtin database authentication will obtain the Clientid and Username in the CONNENT message, and then match the password recorded in the database. Once the match is successful, the authentication is successful.

The builtin database authentication also supports HTTP API operations. For details, please refer to Mnesia AuthenticationBuiltin DB AUTH/ACL - 图8 (opens new window).

Access control data

Access control data can be managed through the dashboard

image-20200928141558866

When the client publishes, subscribes, or unsubscribes to EMQX, the access control can allow or deny the operation according to the rules set in advance in the builtin database.

The builtin database access control also supports HTTP API operations. For details, please see Mnesia ACLBuiltin DB AUTH/ACL - 图10 (opens new window).