Bug 808396 - cluster-url should not allow localhost addresses
Summary: cluster-url should not allow localhost addresses
Keywords:
Status: NEW
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-cpp
Version: 2.1
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: messaging-bugs
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-30 10:30 UTC by Zdenek Kraus
Modified: 2020-11-04 19:14 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 808411 0 low NEW cluster-url should be checked for syntax errors 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 808415 0 unspecified CLOSED cluster-url should provide only existing addresses 2021-02-22 00:41:40 UTC

Internal Links: 808411 808415

Description Zdenek Kraus 2012-03-30 10:30:19 UTC
Description of problem:
option cluster-url allows to specify failover address localhost that tells client to failover to his localhost and that is not right.

all localhost variants are allowed:

    tcp:127.0.0.1:5672
    tcp:localhost:5672
    tcp:[::1]:5672
    tcp:localhost6:5672
    tcp:127.1:5672 

Domain name resolution may be done for Names like "localhost.localdomain", which could be specified by /etc/hosts. 

Version-Release number of selected component (if applicable):
qpid-cpp-server-0.14-10.el6.x86_64
qpid-cpp-server-ssl-0.14-10.el6.x86_64
qpid-cpp-server-xml-0.14-10.el6.x86_64
qpid-cpp-server-store-0.14-10.el6.x86_64
qpid-cpp-server-devel-0.14-10.el6.x86_64
qpid-cpp-server-cluster-0.14-10.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1. set up cluster-name and cluster-url to some localhost address in /etc/qpidd.conf
cluster-name=mycluster
cluster-url=amqp:tcp:127.0.0.1:5672,tcp:localhost:5672,tcp:[::1]:5671,tcp:localhost6,tcp:127.1
2. start openais/corosync for clustering and broker
3. run qpid-cluster and observer that all localhost addresses are provided as URL
  
Actual results:
  Cluster Name: mycluster
Cluster Status: ACTIVE
  Cluster Size: 1
       Members: ID=126.39.0.0:5500 URL=amqp:tcp:127.0.0.1:5672,tcp:localhost:5672,tcp:[::1]:5671,tcp:localhost6:5672,tcp:127.1:5672


Expected results:
qpidd fails with error message like: "Localhost addresses is not allowed for cluster-url"

or prints warning, and will not provide such localhost addresses to clients if there is some other correct addresss (Note that second result is subject of disscution) 

Additional info:


Note You need to log in before you can comment on or make changes to this bug.