Merge pull request #9735 from kjellwinblad/kjell/fix/password_log_leak/EMQX-8718

fix: remove password from info logs
This commit is contained in:
Zaiming (Stone) Shi 2023-01-12 15:34:16 +01:00 committed by GitHub
commit 370b6b0d2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 9 additions and 7 deletions

View File

@ -209,7 +209,7 @@ on_start(
?SLOG(info, #{
msg => "starting_http_connector",
connector => InstId,
config => Config
config => emqx_misc:redact(Config)
}),
{Transport, TransportOpts} =
case Scheme of

View File

@ -65,7 +65,7 @@ on_start(
?SLOG(info, #{
msg => "starting_ldap_connector",
connector => InstId,
config => Config
config => emqx_misc:redact(Config)
}),
Servers = emqx_schema:parse_servers(Servers0, ?LDAP_HOST_OPTIONS),
SslOpts =

View File

@ -155,7 +155,7 @@ on_start(
rs -> "starting_mongodb_replica_set_connector";
sharded -> "starting_mongodb_sharded_connector"
end,
?SLOG(info, #{msg => Msg, connector => InstId, config => Config}),
?SLOG(info, #{msg => Msg, connector => InstId, config => emqx_misc:redact(Config)}),
NConfig = #{hosts := Hosts} = maybe_resolve_srv_and_txt_records(Config),
SslOpts =
case maps:get(enable, SSL) of

View File

@ -149,7 +149,7 @@ on_start(InstId, Conf) ->
?SLOG(info, #{
msg => "starting_mqtt_connector",
connector => InstanceId,
config => Conf
config => emqx_misc:redact(Conf)
}),
BasicConf = basic_config(Conf),
BridgeConf = BasicConf#{

View File

@ -91,7 +91,7 @@ on_start(
?SLOG(info, #{
msg => "starting_mysql_connector",
connector => InstId,
config => Config
config => emqx_misc:redact(Config)
}),
SslOpts =
case maps:get(enable, SSL) of

View File

@ -94,7 +94,7 @@ on_start(
?SLOG(info, #{
msg => "starting_postgresql_connector",
connector => InstId,
config => Config
config => emqx_misc:redact(Config)
}),
SslOpts =
case maps:get(enable, SSL) of

View File

@ -123,7 +123,7 @@ on_start(
?SLOG(info, #{
msg => "starting_redis_connector",
connector => InstId,
config => Config
config => emqx_misc:redact(Config)
}),
ConfKey =
case Type of

View File

@ -0,0 +1 @@
Password information has been removed from information log messages for http, ldap, mongo, mqtt, mysql, pgsql and redis.

View File

@ -0,0 +1 @@
密码信息已从http、ldap、mongo、mqtt、mysql、pgsql和redis的信息日志消息中删除。