Compare commits

...

1 Commits

Author SHA1 Message Date
firest f41f5fed6e chore: update change 2024-05-08 15:02:33 +08:00
2 changed files with 5 additions and 3 deletions

View File

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

View File

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