Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 89291 invoked from network); 12 Sep 2006 06:25:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 06:25:23 -0000 Received: (qmail 98740 invoked by uid 500); 12 Sep 2006 06:25:23 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 98723 invoked by uid 500); 12 Sep 2006 06:25:23 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 98710 invoked by uid 99); 12 Sep 2006 06:25:23 -0000 Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org) (140.211.166.84) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Sep 2006 23:25:23 -0700 Authentication-Results: idunn.apache.osuosl.org header.from=james.strachan@gmail.com; domainkeys=good Authentication-Results: idunn.apache.osuosl.org smtp.mail=james.strachan@gmail.com; spf=pass X-ASF-Spam-Status: No, hits=0.4 required=5.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP Received-SPF: pass (idunn.apache.osuosl.org: domain gmail.com designates 66.249.82.229 as permitted sender) DomainKey-Status: good X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 Received: from ([66.249.82.229:5017] helo=wx-out-0506.google.com) by idunn.apache.osuosl.org (ecelerity 2.1 r(10620)) with ESMTP id 23/20-00788-CD256054 for ; Mon, 11 Sep 2006 23:25:32 -0700 Received: by wx-out-0506.google.com with SMTP id i27so1918480wxd for ; Mon, 11 Sep 2006 23:25:17 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SlLtC77h9UXmWIMzY6wFJbDoEPc5GyLT8yh1Ib4ZMOWICu9SZmO/f7oa2jCcsF/+drgJHN3cH+iqiHgtXpoaCQKYPaNeCrR1QtpFof4av+5ulKWxr4IRTKWmcXg6quqXoFHMoQeHHwlFGJ4e+3HHIidp4KfgpuHHZcv34VFoncY= Received: by 10.90.84.17 with SMTP id h17mr1977761agb; Mon, 11 Sep 2006 23:25:17 -0700 (PDT) Received: by 10.90.86.4 with HTTP; Mon, 11 Sep 2006 23:25:17 -0700 (PDT) Message-ID: Date: Tue, 12 Sep 2006 07:25:17 +0100 From: "James Strachan" To: activemq-users@geronimo.apache.org Subject: Re: ActiveMQConnectionFactory username/password question In-Reply-To: <6257410.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6241697.post@talk.nabble.com> <6257410.post@talk.nabble.com> X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N We don't yet have a security plugin for JBoss - though we welcome patches :) http://incubator.apache.org/activemq/contributing.html details of the current plugins available here http://incubator.apache.org/activemq/security.html On 9/12/06, wallace wrote: > > Thanks for the pointer. I am actually integrating activemq with jboss. > > What I am trying archieve is, > 1) define valid username/password pair(s) in jboss, probably in > application-policy > 2) send amessage to a topic in code,probably servlet, running within jboss > 3) a standalone consumer app listening to the broker should not be able to > creation connection unless it passes the right username/password to create > connection > > I've tried the following approaches > > a) Use default > JmsXARealm > for the topic in -ds.xml > > result : both connectionFactory.createTopicConnection() and > connectionFactory.createTopicConnection("guest", "guest") > gave the classic principal=null error > > b) use an application-polcy like > > > > flag = "required"> > guest > guest > guest > "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA > > > > > result: the listening app can still get messages from the topic with passing > junks to the createConnection function. > > Do I miss something here? > > Thanks, > -Wallace > > > James.Strachan wrote: > > > > On 9/11/06, wallace wrote: > >> > >> I am using activemq 4.0 and running the examples. It seems no matter if > >> I am > >> running the topic/queue, persist/non-persistent, durable/non-durable. > >> Username and password do not seem to matter. > > > > The default out of the box install doesn't use a security plugin to > > restrict access. > > > > For an example see... > > > > http://incubator.apache.org/activemq/security.html > > > > James > > > >> > >> I changed the createConnection() function to two separate functions for > >> producer and consumer > >> > >> protected Connection createConnection-rpoducer() throws JMSException, > >> Exception { > >> ActiveMQConnectionFactory connectionFactory = new > >> ActiveMQConnectionFactory("producer-username", "producer-passwd", url); > >> .......... > >> > >> protected Connection createConnection-consumer() throws JMSException, > >> Exception { > >> ActiveMQConnectionFactory connectionFactory = new > >> ActiveMQConnectionFactory("consumer-username", "consumer-passwd", url); > >> .......... > >> > >> > >> Why does it seem like the example would run even if I use different > >> username > >> and password for producer and consumer? > >> > >> Thank you, > >> -Wallace Wong > >> > >> -- > >> View this message in context: > >> http://www.nabble.com/ActiveMQConnectionFactory-username-password-question-tf2250509.html#a6241697 > >> Sent from the ActiveMQ - User forum at Nabble.com. > >> > >> > > > > > > -- > > > > James > > ------- > > http://radio.weblogs.com/0112098/ > > > > > > -- > View this message in context: http://www.nabble.com/ActiveMQConnectionFactory-username-password-question-tf2250509.html#a6257410 > Sent from the ActiveMQ - User forum at Nabble.com. > > -- James ------- http://radio.weblogs.com/0112098/