Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3E5E4D6C7 for ; Thu, 13 Dec 2012 14:10:57 +0000 (UTC) Received: (qmail 86126 invoked by uid 500); 13 Dec 2012 14:10:56 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 86057 invoked by uid 500); 13 Dec 2012 14:10:55 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 85936 invoked by uid 99); 13 Dec 2012 14:10:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 14:10:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [5.9.88.166] (HELO hydra.jive-videos.net) (5.9.88.166) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2012 14:10:47 +0000 Received: from [82.16.22.157] (helo=[192.168.107.17]) by hydra.jive-videos.net with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76) (envelope-from ) id 1Tj9UU-0002wN-St for users@activemq.apache.org; Thu, 13 Dec 2012 14:10:25 +0000 Message-ID: <50C9E1C6.6050308@jive-videos.net> Date: Thu, 13 Dec 2012 14:10:14 +0000 From: Rob Coward User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: users@activemq.apache.org Subject: Re: Broker-to-broker Authentication with LDAP Broker Discovery References: <50C5FAB3.9070504@jive-videos.net> In-Reply-To: Content-Type: multipart/mixed; boundary="------------030509040706090703080106" X-Spam-Score: -2.9 (--) X-Spam-Report: Spam detection software, running on the system "monster.jive-videos.net", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. X-Virus-Checked: Checked by ClamAV on apache.org Content preview: Hi Dejan, Many thanks for your reply. I decided to take a stab at the code myself and the attached patch not only seems to now allow me to authenticate the connection, but also solves the problem of the discovered connector not registering in JMX. I hope others might find it useful - is it worth trying to push it up into trunk for future releases ? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] --------------030509040706090703080106 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi Dejan, Many thanks for your reply. I decided to take a stab at the code myself and the attached patch not only seems to now allow me to authenticate the connection, but also solves the problem of the discovered connector not registering in JMX. I hope others might find it useful - is it worth trying to push it up into trunk for future releases ? Regards, Rob On 11/12/2012 12:51, Dejan Bosanac wrote: > Hi Rob, > > unfortunately ldap network connector is not used much and so there > were no much development on it. > > Alternatively, you can check http://fuse.fusesource.org/mq/docs/mq-fabric.html > > which uses ZooKeeper for broker discovery. > > > Regards > -- > Dejan Bosanac > ---------------------- > Red Hat, Inc. > FuseSource is now part of Red Hat > dbosanac@redhat.com > Twitter: @dejanb > Blog: http://sensatic.net > ActiveMQ in Action: http://www.manning.com/snyder/ > > > On Mon, Dec 10, 2012 at 4:07 PM, Rob Coward wrote: >> http://activemq.apache.org/ldap-broker-discovery-mechanism.html --------------030509040706090703080106 Content-Type: text/plain; charset=windows-1252; name="LdapNetworkConnector.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="LdapNetworkConnector.patch" diff -aurN activemq-5.7.0-orig/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java activemq-5.7.0/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java --- activemq-5.7.0-orig/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java 2012-12-11 22:49:45.000000000 +0000 +++ activemq-5.7.0/activemq-core/src/main/java/org/apache/activemq/network/LdapNetworkConnector.java 2012-12-13 10:41:07.000000000 +0000 @@ -295,7 +295,11 @@ // want to map/manage these differently in the future // boolean useJMX = getBrokerService().isUseJmx(); // getBrokerService().setUseJmx(false); - NetworkConnector connector = getBrokerService().addNetworkConnector(connectorURI); + NetworkConnector discoveryconnector = new DiscoveryNetworkConnector(connectorURI); + discoveryconnector.setName(uuid); + discoveryconnector.setUserName(getUserName()); + discoveryconnector.setPassword(this.password); + NetworkConnector connector = getBrokerService().addNetworkConnector(discoveryconnector); // getBrokerService().setUseJmx(useJMX); // Propagate standard connector properties that may have been set via XML --------------030509040706090703080106--