我想禁止用户将消息发送到特定队列(jms)。我正在使用 tibco ems 服务器,tibco 管理工具。
我做了以下事情:
tcp://localhost:7222> create user test "Test user" password=test
> tcp://localhost:7222> create group admin
> Group 'admin' has been created
> tcp://localhost:7222> create group users
> Group 'users' has been created
> tcp://localhost:7222> add member users test
> Group 'users' has been modified
> tcp://localhost:7222> add member admin admin
> Group 'admin' has been modified
> tcp://localhost:7222> add member admin EMS-SERVER
> Group 'admin' has been modified
> tcp://localhost:7222> add member admin EMS-SERVER2
> Group 'admin' has been modified
> tcp://localhost:7222> show users
> User Name Description
> admin Administrator
> EMS-SERVER Main Server
> EMS-SERVER2 Route Server
> test Test user
> tcp://localhost:7222> grant queue in.queue group=admin all
> Permissions have been changed
> tcp://localhost:7222> showacl queue in.queue
> Principal Permissions for queue 'in.queue'
> Group=admin receive,send,browse
此外,我想检查“测试”用户是否没有在“in.queue”上发送消息的凭据。 java代码如下:
> String user = "test";
> String password = "test";
> try {
> connection = qcf.createQueueConnection(user, password);
但最终该用户发送了消息。
textMessage.setText("Hi!"); sender.send(textMessage);
因此,我的队列中收到了新消息。
我做错了什么?
最佳答案
解决办法是
tcp://localhost:7222> set server authorization=enabled
Server parameters have been changed
关于java - ems tibco 和发送消息的凭据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28237760/