Merge pull request #8162 from terry-xiaoyu/deny_sub_wildcard_topic_acl_conf

fix: deny all subscribes to '#' topics in the default acl.conf
This commit is contained in:
Xinyu Liu 2022-06-10 14:23:14 +08:00 committed by GitHub
commit 45f2e4663b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 10 additions and 2 deletions

View File

@ -22,6 +22,8 @@ esac
echo "HOCON_ENV_OVERRIDE_PREFIX=EMQX_"
echo "EMQX_ZONES__DEFAULT__MQTT__RETRY_INTERVAL=2s"
echo "EMQX_ZONES__DEFAULT__MQTT__MAX_TOPIC_ALIAS=10"
echo "EMQX_AUTHORIZATION__SOURCES=[]"
echo "EMQX_AUTHORIZATION__NO_MATCH=allow"
} >> .ci/docker-compose-file/conf.cluster.env
is_node_up() {

View File

@ -186,6 +186,8 @@ jobs:
--set image.pullPolicy=Never \
--set emqxConfig.EMQX_ZONES__DEFAULT__MQTT__RETRY_INTERVAL=2s \
--set emqxConfig.EMQX_ZONES__DEFAULT__MQTT__MAX_TOPIC_ALIAS=10 \
--set emqxConfig.EMQX_AUTHORIZATION__SOURCES=[] \
--set emqxConfig.EMQX_AUTHORIZATION__NO_MATCH=allow \
deploy/charts/emqx \
--debug

View File

@ -26,3 +26,7 @@
{allow, {username, "^dashboard?"}, subscribe, ["$SYS/#"]}.
{allow, {ipaddr, "127.0.0.1"}, all, ["$SYS/#", "#"]}.
{deny, all, subscribe, ["$SYS/#", {eq, "#"}]}.
{allow, all}.

View File

@ -329,7 +329,7 @@ authorize(
'client.check_authz_complete',
[Client, PubSub, Topic, deny, AuthzSource]
),
?SLOG(info, #{
?SLOG(warning, #{
msg => "authorization_permission_denied",
username => Username,
ipaddr => IpAddress,

View File

@ -940,7 +940,7 @@ until the RPC connection is considered lost."""
log_file_handlers {
desc {
en: """file-based log handlers."""
en: """File-based log handlers."""
zh: """输出到文件的日志处理进程列表"""
}
label {