fix(emqx_schema): handshake_timeout is common for all listeners
This commit is contained in:
parent
85f54220b0
commit
61da68ff40
|
@ -1942,7 +1942,6 @@ common_ssl_opts_schema(Defaults) ->
|
||||||
].
|
].
|
||||||
|
|
||||||
%% @doc Make schema for SSL listener options.
|
%% @doc Make schema for SSL listener options.
|
||||||
%% When it's for ranch listener, an extra field `handshake_timeout' is added.
|
|
||||||
-spec server_ssl_opts_schema(map(), boolean()) -> hocon_schema:field_schema().
|
-spec server_ssl_opts_schema(map(), boolean()) -> hocon_schema:field_schema().
|
||||||
server_ssl_opts_schema(Defaults, IsRanchListener) ->
|
server_ssl_opts_schema(Defaults, IsRanchListener) ->
|
||||||
D = fun(Field) -> maps:get(to_atom(Field), Defaults, undefined) end,
|
D = fun(Field) -> maps:get(to_atom(Field), Defaults, undefined) end,
|
||||||
|
@ -1981,8 +1980,7 @@ server_ssl_opts_schema(Defaults, IsRanchListener) ->
|
||||||
default => Df("client_renegotiation", true),
|
default => Df("client_renegotiation", true),
|
||||||
desc => ?DESC(server_ssl_opts_schema_client_renegotiation)
|
desc => ?DESC(server_ssl_opts_schema_client_renegotiation)
|
||||||
}
|
}
|
||||||
)}
|
)},
|
||||||
| [
|
|
||||||
{"handshake_timeout",
|
{"handshake_timeout",
|
||||||
sc(
|
sc(
|
||||||
duration(),
|
duration(),
|
||||||
|
@ -1991,7 +1989,6 @@ server_ssl_opts_schema(Defaults, IsRanchListener) ->
|
||||||
desc => ?DESC(server_ssl_opts_schema_handshake_timeout)
|
desc => ?DESC(server_ssl_opts_schema_handshake_timeout)
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
|| IsRanchListener
|
|
||||||
] ++
|
] ++
|
||||||
[
|
[
|
||||||
{"gc_after_handshake",
|
{"gc_after_handshake",
|
||||||
|
@ -2000,7 +1997,6 @@ server_ssl_opts_schema(Defaults, IsRanchListener) ->
|
||||||
desc => ?DESC(server_ssl_opts_schema_gc_after_handshake)
|
desc => ?DESC(server_ssl_opts_schema_gc_after_handshake)
|
||||||
})}
|
})}
|
||||||
|| not IsRanchListener
|
|| not IsRanchListener
|
||||||
]
|
|
||||||
].
|
].
|
||||||
|
|
||||||
%% @doc Make schema for SSL client.
|
%% @doc Make schema for SSL client.
|
||||||
|
|
|
@ -37,11 +37,11 @@ ssl_opts_dtls_test() ->
|
||||||
ssl_opts_tls_1_3_test() ->
|
ssl_opts_tls_1_3_test() ->
|
||||||
Sc = emqx_schema:server_ssl_opts_schema(#{}, false),
|
Sc = emqx_schema:server_ssl_opts_schema(#{}, false),
|
||||||
Checked = validate(Sc, #{<<"versions">> => [<<"tlsv1.3">>]}),
|
Checked = validate(Sc, #{<<"versions">> => [<<"tlsv1.3">>]}),
|
||||||
?assertNot(maps:is_key(handshake_timeout, Checked)),
|
|
||||||
?assertMatch(
|
?assertMatch(
|
||||||
#{
|
#{
|
||||||
versions := ['tlsv1.3'],
|
versions := ['tlsv1.3'],
|
||||||
ciphers := []
|
ciphers := [],
|
||||||
|
handshake_timeout := _
|
||||||
},
|
},
|
||||||
Checked
|
Checked
|
||||||
).
|
).
|
||||||
|
|
|
@ -28,6 +28,8 @@ Please note, the request body of `/bridges` API to configure MQTT brdige is chan
|
||||||
|
|
||||||
- HTTP client library `ehttpc` upgraded from `0.4.0` to `0.4.2` [#9520](https://github.com/emqx/emqx/pull/9520).
|
- HTTP client library `ehttpc` upgraded from `0.4.0` to `0.4.2` [#9520](https://github.com/emqx/emqx/pull/9520).
|
||||||
|
|
||||||
|
- Add `handshake_timeout` option to MQTT SSL listener [#9502](https://github.com/emqx/emqx/pull/9502).
|
||||||
|
|
||||||
- Upgrade dashboard to [v1.1.3](https://github.com/emqx/emqx-dashboard-web-new/releases/tag/v1.1.3).
|
- Upgrade dashboard to [v1.1.3](https://github.com/emqx/emqx-dashboard-web-new/releases/tag/v1.1.3).
|
||||||
|
|
||||||
## Bug fixes
|
## Bug fixes
|
||||||
|
@ -40,11 +42,9 @@ Please note, the request body of `/bridges` API to configure MQTT brdige is chan
|
||||||
|
|
||||||
- Fix some potential MQTT packet parse errors [#9477](https://github.com/emqx/emqx/pull/9477).
|
- Fix some potential MQTT packet parse errors [#9477](https://github.com/emqx/emqx/pull/9477).
|
||||||
|
|
||||||
- Fixed EMQX Helm Chart deployment error [#9509](https://github.com/emqx/emqx/pull/9509)
|
- Fixed EMQX Helm Chart deployment error [#9509](https://github.com/emqx/emqx/pull/9509).
|
||||||
|
|
||||||
- Fixed the `Discovery error: no such service` error occurred during helm chart deployment, resulting in an abnormal discovery of cluster nodes.
|
- Fixed the `Discovery error: no such service` error occurred during helm chart deployment, resulting in an abnormal discovery of cluster nodes.
|
||||||
|
- Fixed issue that caused EMQX Helm Chart to fail when modifying some of EMQX's configuration items via environment variables.
|
||||||
- Fixed that caused EMQX Helm Chart to fail when modifying some of EMQX's configuration items via environment variables
|
|
||||||
|
|
||||||
- Fix shadowing `'client.authenticate'` callbacks by `emqx_authenticator`. Now `emqx_authenticator`
|
- Fix shadowing `'client.authenticate'` callbacks by `emqx_authenticator`. Now `emqx_authenticator`
|
||||||
passes execution to the further callbacks if none of the authenticators matches [#9496](https://github.com/emqx/emqx/pull/9496).
|
passes execution to the further callbacks if none of the authenticators matches [#9496](https://github.com/emqx/emqx/pull/9496).
|
||||||
|
|
|
@ -27,6 +27,8 @@ v5.0.11 或更早版本创建的配置文件,在新版本中会被自动转换
|
||||||
|
|
||||||
- HTTP 客户端库 `ehttpc` 从 `0.4.0` 升级到 `0.4.2` [#9520](https://github.com/emqx/emqx/pull/9520)。
|
- HTTP 客户端库 `ehttpc` 从 `0.4.0` 升级到 `0.4.2` [#9520](https://github.com/emqx/emqx/pull/9520)。
|
||||||
|
|
||||||
|
- 为 MQTT SSL 监听器增加配置 `handshake_timeout` [#9502](https://github.com/emqx/emqx/pull/9502)。
|
||||||
|
|
||||||
- Dashboard 更新到 [v1.1.3](https://github.com/emqx/emqx-dashboard-web-new/releases/tag/v1.1.3)。
|
- Dashboard 更新到 [v1.1.3](https://github.com/emqx/emqx-dashboard-web-new/releases/tag/v1.1.3)。
|
||||||
|
|
||||||
## 修复
|
## 修复
|
||||||
|
@ -39,11 +41,9 @@ v5.0.11 或更早版本创建的配置文件,在新版本中会被自动转换
|
||||||
|
|
||||||
- 修复了一些 MQTT 协议包的潜在解析错误 [#9477](https://github.com/emqx/emqx/pull/9477)。
|
- 修复了一些 MQTT 协议包的潜在解析错误 [#9477](https://github.com/emqx/emqx/pull/9477)。
|
||||||
|
|
||||||
- 修复了 EMQX Helm Chart 部署的一些问题 [#9509](https://github.com/emqx/emqx/pull/9509)
|
- 修复了 EMQX Helm Chart 部署的一些问题 [#9509](https://github.com/emqx/emqx/pull/9509)。
|
||||||
|
|
||||||
- 修复了 EMQX Helm Chart 部署时出现 `Discovery error: no such service` 错误,导致集群节点发现异常。
|
- 修复了 EMQX Helm Chart 部署时出现 `Discovery error: no such service` 错误,导致集群节点发现异常。
|
||||||
|
- 修复了 EMQX Helm Chart 通过环境变量修改部分 EMQX 的配置项时的错误。
|
||||||
- 修复了 EMQX Helm Chart 通过环境变量修改部分 EMQX 的配置项时的错误
|
|
||||||
|
|
||||||
- 通过 `emqx_authenticator` 修复隐藏 `'client.authenticate'` 回调。 现在 `emqx_authenticator` 如果没有任何验证器匹配,则将执行传递给进一步的回调 [#9496](https://github.com/emqx/emqx/pull/9496)。
|
- 通过 `emqx_authenticator` 修复隐藏 `'client.authenticate'` 回调。 现在 `emqx_authenticator` 如果没有任何验证器匹配,则将执行传递给进一步的回调 [#9496](https://github.com/emqx/emqx/pull/9496)。
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue