chore: update change

This commit is contained in:
firest 2024-05-07 16:52:37 +08:00
parent e4e53844d5
commit 92d26ff27b
3 changed files with 6 additions and 4 deletions

View File

@ -289,7 +289,7 @@ fields("ctx_check_authn_complete") ->
{"event", event_sc(Event)},
{"clientid", sc(binary(), #{desc => ?DESC("event_clientid")})},
{"username", sc(binary(), #{desc => ?DESC("event_username")})},
{"peerhost", sc(binary(), #{desc => ?DESC("event_peerhost")})},
{"peername", sc(binary(), #{desc => ?DESC("event_peername")})},
{"is_anonymous", sc(boolean(), #{desc => ?DESC("event_is_anonymous")})},
{"is_superuser", sc(boolean(), #{desc => ?DESC("event_is_superuser")})}
];

View File

@ -455,7 +455,8 @@ eventmsg_check_authn_complete(
_ClientInfo = #{
clientid := ClientId,
username := Username,
peerhost := PeerHost
peerhost := PeerHost,
peerport := PeerPort
},
#{is_anonymous := IsAnonymous} = Result
) ->
@ -465,7 +466,7 @@ eventmsg_check_authn_complete(
#{
clientid => ClientId,
username => Username,
peerhost => ntoa(PeerHost),
peername => ntoa({PeerHost, PeerPort}),
is_anonymous => IsAnonymous,
is_superuser => IsSuperuser
},
@ -1077,7 +1078,7 @@ columns_with_exam('client.check_authn_complete') ->
{<<"event">>, 'client.check_authz_complete'},
{<<"clientid">>, <<"c_emqx">>},
{<<"username">>, <<"u_emqx">>},
{<<"peerhost">>, <<"192.168.0.10">>},
{<<"peername">>, <<"192.168.0.10:56431">>},
{<<"is_superuser">>, true},
{<<"is_anonymous">>, false},
{<<"timestamp">>, erlang:system_time(millisecond)},

View File

@ -0,0 +1 @@
Add new rule engine event `$events/client_check_authn_complete` for authentication completion event.