Merge pull request #12542 from thalesmg/fix-http-bridge-logging-r55-20240220

fix(http_bridge): redact headers
This commit is contained in:
Thales Macedo Garitezi 2024-02-20 14:07:29 -03:00 committed by GitHub
commit 67328ba73f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View File

@ -1,6 +1,6 @@
{application, emqx_bridge_http, [
{description, "EMQX HTTP Bridge and Connector Application"},
{vsn, "0.2.2"},
{vsn, "0.2.3"},
{registered, []},
{applications, [kernel, stdlib, emqx_resource, ehttpc]},
{env, [{emqx_action_info_modules, [emqx_bridge_http_action_info]}]},

View File

@ -876,9 +876,9 @@ redact(Data) ->
%% and we also can't know the body format and where the sensitive data will be
%% so the easy way to keep data security is redacted the whole body
redact_request({Path, Headers}) ->
{Path, Headers};
{Path, redact(Headers)};
redact_request({Path, Headers, _Body}) ->
{Path, Headers, <<"******">>}.
{Path, redact(Headers), <<"******">>}.
clientid(Msg) -> maps:get(clientid, Msg, undefined).

View File

@ -0,0 +1 @@
Redacted authorization headers from debug logs from HTTP bridge.