Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 91855 invoked from network); 12 Oct 2006 08:40:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 08:40:58 -0000 Received: (qmail 98398 invoked by uid 500); 12 Oct 2006 08:40:58 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 98384 invoked by uid 500); 12 Oct 2006 08:40:57 -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 98375 invoked by uid 99); 12 Oct 2006 08:40:57 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 01:40:57 -0700 X-ASF-Spam-Status: No, hits=4.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,HTML_10_20,HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [217.12.10.242] (HELO web26205.mail.ukl.yahoo.com) (217.12.10.242) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 12 Oct 2006 01:40:56 -0700 Received: (qmail 67727 invoked by uid 60001); 12 Oct 2006 08:40:18 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=4i2aTXVyrJQfji8gW1oYi9C0lfPD7fYGxmWMkVeFIhddCJ5sRMb+niKaZmeCf0MRazaRsKFUtiQXX96NJ4IyaI87lX9IA6zib6Lc3vdHay4kMmH4wXl4tpf1d57WdK1fhEWo4/MR80m5PMi2eWysElonMzL1ZN3eHb2u6wv13Ks= ; Message-ID: <20061012084018.67725.qmail@web26205.mail.ukl.yahoo.com> Received: from [86.121.29.145] by web26205.mail.ukl.yahoo.com via HTTP; Thu, 12 Oct 2006 09:40:17 BST Date: Thu, 12 Oct 2006 09:40:17 +0100 (BST) From: Pico Florin Subject: Re: Security - how to? To: activemq-users@geronimo.apache.org In-Reply-To: <653849d10610110522n53def616wea233bdb771063e2@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1287548143-1160642417=:67310" Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --0-1287548143-1160642417=:67310 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Hi! Thank you for your response. I am afraid that I don't understand the security mechanism both on the client side and the server side. Can you explain me what set up do I need in the client code and what I have to do in the server side (do I need something else than setting up the borker with the populateJMSXUserID to true)? Remeber that I have many clients each of them with their own credentials that have to be authorized into the server DB. Regards, Florin Kelly Campbell wrote: I don't have an example for the second one yet, but the first one is simple. You don't want clients to be able to set that header or property because then clients could spoof another client. It is set by the broker based on the authentication of the sender. If you're using username/password authentication and you turn that feature on in the broker, then you should be able to see that header in sent messages. You probably need to use the latest version built from source code because of issue AMQ-940. (Or wait for a 4.1 RC build to be released) -Kelly On 10/11/06, Pico Florin wrote: > > Hi! > Thank you Kelly for your quick response! > I would like to ask you if there is any example with the 2 solutions > that you gave me. > In the documentation recommended in the solution 1, it is said that: > " Once enabled this feature adds the JMS property JMSXUserID to each JMS > message so that a consumer can know exactly who the sender was using the > broker's authentication policy." > I was trying to do something like this (on the client > side): ((ObjectMessage)message).setJMSXUserIDProperty() but I didn't found. > Then I was thinking to ((ObjectMessage)message).setObjectProperty() > but what string property should I use to set up this JMSXUserID? > > > For the socond solution, I have no idea how to implement this. I > have no knowlege regarding the SSL connection, maybe a good example for > both server and client will reveal me how it realy works. > Thank you, > Florin > > Kelly Campbell wrote: Hi Pico, > > There is a feature where ActiveMQ can set the JMSXUserId header to the > userid of the sender of the message. You can use that on the server side > to > determine what client is requesting it. The only issue with this is that > the > server has to trust the broker. Does that work for what you need? > Documentation is here: http://activemq.org/site/jmsxuserid.html > > There's also now the option to authenticate and secure a connection using > client SSL certificates in the 4.1 codebase. I'm working on some changes > in > my spare time to allow increased flexibility of this so you can do things > like have the JMS client check the broker's certificate as well to ensure > it > is as expected. > > -Kelly > > On 10/10/06, Pico Florin > wrote: > > > > Hi! > > I have a P2P architecture where many clients send messages to JMS > > server installed on a web server (Resin). The messages that the client > send > > to be persisted in DB installed on on the server side. Before that > > operation the client should be authenticated against this database > > installed on the server side. The client should send its credentials in > > order to be authorized. > > Now the problem: > > I have seen that in the JMS API exists a method: > > ConnectionFactory.createConnection(String userName, String password) > > but I think that these credentials are for the service installed on > > the server in order to be connected to it, but I am afraid I cannot use > > the client's credentials for the application.(E.g. user1/pw1 authorized > > to be connected to the JMS server and use the service, > > user2/pw2 authorized to be connected to the JMS server and use the > service, > > etc). These credentials are also on the DB server installed on the > > server. The question is: am I wrong with this opinion or not? If yes, > > what should I write in the server side in order to accept many clients > to > > be connected? > > Another solution is to set up a object property in header of the > > message, where I put my credentials encrypted. But is that ok(is this a > > real solution)? > > Any ideas and suggestions are appreciated. > > Florin > > > > > > > > > > --------------------------------- > > Yahoo! Photos � NEW, now offering a quality print service from just 8p a > > photo. > > > > > > > --------------------------------- > All new Yahoo! Mail "The new Interface is stunning in its simplicity and > ease of use." - PC Magazine > Send instant messages to your online friends http://uk.messenger.yahoo.com --0-1287548143-1160642417=:67310--