From 068e1c7e9261d49f33a10f8c8368c3c04c564054 Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Mon, 12 Dec 2022 22:52:11 +0100 Subject: [PATCH] docs: update release note for authn env override fix --- changes/v5.0.12-en.md | 6 ++++++ changes/v5.0.12-zh.md | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/changes/v5.0.12-en.md b/changes/v5.0.12-en.md index d1c09fd57..88d967835 100644 --- a/changes/v5.0.12-en.md +++ b/changes/v5.0.12-en.md @@ -36,6 +36,12 @@ 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). + 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` + but we want to disable it, we can do it with `env EMQX_AUTHENTICATION__1__ENABLE=false`. + ## Bug fixes - Fix that the obsolete SSL files aren't deleted after the ExHook config update [#9432](https://github.com/emqx/emqx/pull/9432). diff --git a/changes/v5.0.12-zh.md b/changes/v5.0.12-zh.md index 61ab2e0e8..4de6776ad 100644 --- a/changes/v5.0.12-zh.md +++ b/changes/v5.0.12-zh.md @@ -35,6 +35,12 @@ 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)。 + 例如,现在可以用如下环境变量来创建一个 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 认证,那么可以使用如下方法来将它禁用: + `env EMQX_AUTHENTICATION__1__ENABLE=false`。 + ## 修复 - 修复 ExHook 更新 SSL 相关配置后,过时的 SSL 文件没有被删除的问题 [#9432](https://github.com/emqx/emqx/pull/9432)。