diff --git a/changes/v5.0.12-en.md b/changes/v5.0.12-en.md index 51b1bb9de..c99b1bb95 100644 --- a/changes/v5.0.12-en.md +++ b/changes/v5.0.12-en.md @@ -36,7 +36,7 @@ Please note, the request body of `/bridges` API to configure MQTT brdige is chan - Return `204` instead of `200` for `POST /gateway/lwm2m/clients/{clientid}/{read,write,observe}` [#9480](https://github.com/emqx/emqx/pull/9480). -- Make possible to create an authentication entirely from environment variable [#9437](https://github.com/emqx/emqx/pull/9437). +- Make possible to create an authentication entirely from environment variable [#9547](https://github.com/emqx/emqx/pull/9547). As an example, one can now enable MySQL auth with: `env EMQX_AUTHENTICATION__1='{mechanism="password_based",backend="mysql",server="localhost:3306",database="emqx",username="emqx",password="******",query="SELECT password_hash,salt FROM mqtt_user WHERE username=${username} LIMIT 1",enable=true}'`. Prior to this change, overrides only work on top of existing authentication, for example, if there is already MySQL auth configured in `emqx.conf` diff --git a/changes/v5.0.12-zh.md b/changes/v5.0.12-zh.md index 2cf1a6476..6d8ed4643 100644 --- a/changes/v5.0.12-zh.md +++ b/changes/v5.0.12-zh.md @@ -35,7 +35,7 @@ v5.0.11 或更早版本创建的配置文件,在新版本中会被自动转换 - 现在调用 `POST /gateway/lwm2m/clients/{clientid}/{read,write,observe}` 时,将会返回 204,而不再是 200 [#9480](https://github.com/emqx/emqx/pull/9480)。 -- 允许使用环境变量来创建一个认证配置 [#9437](https://github.com/emqx/emqx/pull/9437)。 +- 允许使用环境变量来创建一个认证配置 [#9547](https://github.com/emqx/emqx/pull/9547)。 例如,现在可以用如下环境变量来创建一个 MySQL 认证: `env EMQX_AUTHENTICATION__1='{mechanism="password_based",backend="mysql",server="localhost:3306",database="emqx",username="emqx",password="******",query="SELECT password_hash,salt FROM mqtt_user WHERE username=${username} LIMIT 1",enable=true}'`。 在此之前,环境变量的重载仅作用于已经存在的配置之上,例如,当 `emqx.conf` 中已经配置了一个 MySQL 认证,那么可以使用如下方法来将它禁用: