Procházet zdrojové kódy

Merge pull request #7918 from lafirest/fix/authz_info

fix(authz): add authz source type into the authorize logger
lafirest před 3 roky
rodič
revize
941307c101
1 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 4 2
      apps/emqx_authz/src/emqx_authz.erl

+ 4 - 2
apps/emqx_authz/src/emqx_authz.erl

@@ -308,7 +308,8 @@ authorize(
                 msg => "authorization_permission_allowed",
                 username => Username,
                 ipaddr => IpAddress,
-                topic => Topic
+                topic => Topic,
+                source => AuthzSource
             }),
             emqx_metrics_worker:inc(authz_metrics, AuthzSource, allow),
             emqx_metrics:inc(?METRIC_ALLOW),
@@ -322,7 +323,8 @@ authorize(
                 msg => "authorization_permission_denied",
                 username => Username,
                 ipaddr => IpAddress,
-                topic => Topic
+                topic => Topic,
+                source => AuthzSource
             }),
             emqx_metrics_worker:inc(authz_metrics, AuthzSource, deny),
             emqx_metrics:inc(?METRIC_DENY),