• Post Reply Bookmark Topic Watch Topic
  • New Topic

Give authorization on Jms  RSS feed

 
Massimo Pascale
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I' m using j2ee, and I'm building an application
that lookup TopicConnectionFactory and Topic from a Context
without authentication.
But I would want cofigure J2ee or Jms (?) to give permissions
to only I want.
I have seen that there is a file named auth.properties
in which probably I must to change something
but I don' t know what.
This is the file :
realms=default,certificate
realm.default=config/realms/default.properties
realm.certificate=config/realms/certificate.properties
default.principal.name=guest
default.principal.password=guest123
anyone.role.name=Prova.java
audit=false
If you can help me, thanks
 
Dipti Alurkar
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want to restrict the subscribers to a particular topic, then a username and password can be used to establish the unique identity of the subscriber.
This can be done as follows.
j2eeadmin -addJmsFactory MY_CON_FAC topic -props clientId=MyID
here, MY_CON_FAC is the name of the ConnectionFactory you create for a topic.
set the property 'clientId' to that of the authorized subscriber.
In the subscriber program, when you create a durable subscriber using the createDurableSubscriber() method with two arguments, the topic and a string that specifies the name of the subscription:
String subName = "MySub";
TopicSubscriber topicSubscriber =
topicSession.createDurableSubscriber(myTopic, subName);
Hope this helps.

Dipti
 
Massimo Pascale
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excuse me but for the Publisher?
How can I avoid that it publishes on my Topic?
If you can help me
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!