Merge pull request #12596 from thalesmg/fix-header-logging-r55-20240226
fix: redact all headers from logs
This commit is contained in:
commit
8a204f2ac1
|
@ -88,7 +88,7 @@ t_http_api(_) ->
|
||||||
<<"method">> := <<"put">>,
|
<<"method">> := <<"put">>,
|
||||||
<<"body">> := #{<<"mqtt">> := #{<<"max_qos_allowed">> := 1}},
|
<<"body">> := #{<<"mqtt">> := #{<<"max_qos_allowed">> := 1}},
|
||||||
<<"bindings">> := _,
|
<<"bindings">> := _,
|
||||||
<<"headers">> := #{<<"authorization">> := <<"******">>}
|
<<"headers">> := "******"
|
||||||
},
|
},
|
||||||
<<"http_status_code">> := 200,
|
<<"http_status_code">> := 200,
|
||||||
<<"operation_result">> := <<"success">>,
|
<<"operation_result">> := <<"success">>,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{application, emqx_utils, [
|
{application, emqx_utils, [
|
||||||
{description, "Miscellaneous utilities for EMQX apps"},
|
{description, "Miscellaneous utilities for EMQX apps"},
|
||||||
% strict semver, bump manually!
|
% strict semver, bump manually!
|
||||||
{vsn, "5.0.15"},
|
{vsn, "5.0.16"},
|
||||||
{modules, [
|
{modules, [
|
||||||
emqx_utils,
|
emqx_utils,
|
||||||
emqx_utils_api,
|
emqx_utils_api,
|
||||||
|
|
|
@ -717,6 +717,9 @@ is_sensitive_key(<<"jwt">>) -> true;
|
||||||
is_sensitive_key(authorization) -> true;
|
is_sensitive_key(authorization) -> true;
|
||||||
is_sensitive_key("authorization") -> true;
|
is_sensitive_key("authorization") -> true;
|
||||||
is_sensitive_key(<<"authorization">>) -> true;
|
is_sensitive_key(<<"authorization">>) -> true;
|
||||||
|
is_sensitive_key(headers) -> true;
|
||||||
|
is_sensitive_key("headers") -> true;
|
||||||
|
is_sensitive_key(<<"headers">>) -> true;
|
||||||
is_sensitive_key(bind_password) -> true;
|
is_sensitive_key(bind_password) -> true;
|
||||||
is_sensitive_key("bind_password") -> true;
|
is_sensitive_key("bind_password") -> true;
|
||||||
is_sensitive_key(<<"bind_password">>) -> true;
|
is_sensitive_key(<<"bind_password">>) -> true;
|
||||||
|
@ -879,6 +882,7 @@ redact_test_() ->
|
||||||
secret_key,
|
secret_key,
|
||||||
secret_access_key,
|
secret_access_key,
|
||||||
security_token,
|
security_token,
|
||||||
|
headers,
|
||||||
token,
|
token,
|
||||||
bind_password
|
bind_password
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in New Issue