简体   繁体   English

WSO2消息代理-授权

[英]WSO2 Message Broker - Authorization

I am trying to implement an authorization mechanism on WSO2 Message Broker, but I am pretty new to WSO2 products. 我正在尝试在WSO2 Message Broker上实现授权机制,但是对于WSO2产品我还是很陌生。 My goal is to implement MQTT Topic Authorization in the same manner it is implemented for JMS topics. 我的目标是以与JMS主题相同的方式实现MQTT主题授权。 Actually I am looking the code on the "andes" repository and "carbon-business-messaging" repository, and I would be very grateful if you can suggest me where to start. 实际上,我正在看“ andes”存储库和“ carbon-business-messaging”存储库中的代码,如果您能建议我从哪里开始,我将不胜感激。 (that's a lot of code to look at) (要看的代码很多)

What I want to do is to allow a particular user to publish/subscribe topics using the User Role permissions, so that even if someone connects to the Broker, he/she can't subscribe or publish without permission. 我想做的是允许特定的用户使用“用户角色”权限来发布/订阅主题,这样,即使有人连接到代理,他/她也无法未经许可就订阅或发布。

You can see how the Authentication is happening in MQTT from here . 您可以从此处查看 MQTT中身份验证的过程。

You can look at the following method in ProtocolProcessor.java class. 您可以在ProtocolProcessor.java类中查看以下方法。 This is located in andes core. 这位于安第斯山脉的核心。

processSubscribe(ServerChannel session, SubscribeMessage msg, String clientID, boolean cleanSession)

Also to get an idea about the how authorization Done in JMS messaging you can refer AndesAuthorizationHandler.java Class from here . 另外,还可以了解如何在JMS消息传递中完成授权,可以从此处引用AndesAuthorizationHandler.java类。 This is located in carbon-business-messaging repository. 这位于碳业务消息存储库中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM