简体   繁体   中英

ems tibco and credentials for sending message

I want to forbid the user to send the message to a specific queue(jms). I am using tibco ems server, tibco administration tool.

I did the following:

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

Further, I want to check that the "test" user haven't credentials to send message on "in.queue". The java code is below:

> String user = "test";
>         String password = "test";
>         try {
>             connection = qcf.createQueueConnection(user, password);

But final this user sent the message.

textMessage.setText("Hi!"); sender.send(textMessage);

As a result in the my queue I have the new message.

What I am doing wrong?

The solving is

tcp://localhost:7222> set server authorization=enabled
Server parameters have been changed

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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