Replies: 1 comment 1 reply
-
Hi @paraskun, thanks for reporting. Looks a lot like a bug, likely needs to be fixed on the EMQX side. Shouldn't take much time to fix but I'd appreciate if you file a bug report anyway. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
When dialing with both ExHook and ExProto, ExHook refuses to authorize messages from ExProto, but it can process them in general. Here is the error log:
[error] clientid: g1h3D2VtcXhAMTcyLjE4LjAuMgAADdQAAAAAAAAABA==, msg: failed_to_execute, peername: 172.18.0.1:54662, reason: function_clause, stacktrace: [{emqx_exhook_handler,clientinfo,[#{peername => {{172,18,0,1},54662},protocol => 'MQTT',password => <<>>,username => <<"g1h3D2VtcXhAMTcyLjE4LjAuMgAADdQAAAAAAAAABA==">>,listener => 'exproto:tcp:default',clientid => <<"g1h3D2VtcXhAMTcyLjE4LjAuMgAADdQAAAAAAAAABA==">>,peerhost => {172,18,0,1},zone => default,enable_authn => true,is_superuser => false,is_bridge => false,mountpoint => <<>>,sockport => 20041,auth_expire_at => undefined}],[{file,"emqx_exhook_handler.erl"},{line,318}]},{emqx_exhook_handler,on_client_authorize,4,[{file,"emqx_exhook_handler.erl"},{line,144}]},{emqx_hooks,safe_execute,2,[{file,"emqx_hooks.erl"},{line,205}]},{emqx_hooks,do_run_fold,3,[{file,"emqx_hooks.erl"},{line,185}]},{emqx_access_control,do_authorize,3,[{file,"emqx_access_control.erl"},{line,224}]},{emqx_access_control,check_authorization_cache,3,[{file,"emqx_access_control.erl"},{line,139}]},{emqx_access_control,authorize,3,[{file,"emqx_access_control.erl"},{line,106}]},{emqx_exproto_channel,handle_call,3,[{file,"emqx_exproto_channel.erl"},{line,435}]},{emqx_gateway_conn,handle_call,3,[{file,"emqx_gateway_conn.erl"},{line,646}]},{emqx_gateway_conn,handle_msg,2,[{file,"emqx_gateway_conn.erl"},{line,467}]},{emqx_gateway_conn,process_msg,2,[{file,"emqx_gateway_conn.erl"},{line,427}]},{emqx_gateway_conn,handle_recv,3,[{file,"emqx_gateway_conn.erl"},{line,390}]},{proc_lib,wake_up,3,[{file,"proc_lib.erl"},{line,251}]}], exception: error, failed_call: {emqx_exhook_handler,on_client_authorize,[#{peername => {{172,18,0,1},54662},protocol => 'MQTT',password => <<>>,username => <<"g1h3D2VtcXhAMTcyLjE4LjAuMgAADdQAAAAAAAAABA==">>,listener => 'exproto:tcp:default',clientid => <<"g1h3D2VtcXhAMTcyLjE4LjAuMgAADdQAAAAAAAAABA==">>,peerhost => {172,18,0,1},zone => default,enable_authn => true,is_superuser => false,is_bridge => false,mountpoint => <<>>,sockport => 20041,auth_expire_at => undefined},#{retain => false,action_type => publish,qos => 0},<<"test">>,#{result => allow,from => default}]}
Messages from ExProto are successfully transmitted to the broker, and ExHook successfully authorizes MQTT clients, but they don't work together (in case of authorization, because ExHook processes 'message.publish' hooked messages from ExProto).
I would be grateful for any advice!
Beta Was this translation helpful? Give feedback.
All reactions