fhmq / hmq

High performance mqtt broker
Apache License 2.0
1.32k stars 273 forks source link

auth fail?if dont have authed,but also can receive and publish! #84

Open excxapp opened 4 years ago

excxapp commented 4 years ago

1.One client dont have topic t/ok/pub ,but can pub if someone sub this topic.

  1. can sub topic dont have right.
excxapp commented 4 years ago

{"level":"error","timestamp":"2020-04-20T16:19:50.650+0800","logger":"broker","caller":"broker/client.go:256","msg":"Pub Topics Auth failed, ","topic":"iotxcx/state/x03d41gn457/tele/STATE","ClientID":"x03d41gn457_client_B73AE0","stacktrace":"goauth/packages/hmq/broker.(*client).processClientPublish\n\t/Users/chen/Documents/github.com/go_micro/packages/hmq/broker/client.go:256\ngoauth/packages/hmq/broker.(*client).ProcessPublish\n\t/Users/chen/Documents/github.com/go_micro/packages/hmq/broker/client.go:203\ngoauth/packages/hmq/broker.ProcessMessage\n\t/Users/chen/Documents/github.com/go_micro/packages/hmq/broker/client.go:177\ngoauth/packages/hmq/broker.(*Broker).SubmitWork.func1\n\t/Users/chen/Documents/github.com/go_micro/packages/hmq/broker/broker.go:110\ngoauth/packages/hmq/pool.startWorker.func1\n\t/Users/chen/Documents/github.com/go_micro/packages/hmq/pool/fixpool.go:55"} but can still receive

excxapp commented 4 years ago

I think, this wil do ,if i dont have right for topic, should close this connect, and cant push to suber