[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-14 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16126432#comment-16126432
 ] 

ASF subversion and git services commented on DISPATCH-803:
--

Commit 49c1269fc0363c4c14f611eb4516cec856e80605 in qpid-dispatch's branch 
refs/heads/master from [~ganeshmurthy]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-dispatch.git;h=49c1269 ]

DISPATCH-808 - Allow router to respond to addresses with 
non-QD_TREATMENT_UNAVAILABLE treatment. This must have been part of fix to 
DISPATCH-803


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16121844#comment-16121844
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ganeshmurthy closed the pull request at:

https://github.com/apache/qpid-dispatch/pull/185


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-10 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16121837#comment-16121837
 ] 

ASF subversion and git services commented on DISPATCH-803:
--

Commit 1ca80b6e29d105a3de43a57aa800855276c64caf in qpid-dispatch's branch 
refs/heads/master from [~ganeshmurthy]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-dispatch.git;h=1ca80b6 ]

DISPATCH-803 - The following changes were made to support unavailable 
distribution
1. Added a new attribute to the router entity called called defaultDistribution 
which defaults to balanced
but can be set to unavailable
2. Attaches to addresses with distribution unavailable are rejected and the 
link is detached
3. Anonymous senders sending to unavailable addresses will be sent back a 
disposition of PN_REJECTED but link will not be closed
4. Added system test system_tests_default_distribution.py to test the above 
cases

(cherry picked from commit 49f643e9fabfe381934b26b679b4f2bda39f2e4a)


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120662#comment-16120662
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132308131
  
--- Diff: python/qpid_dispatch/management/qdrouter.json ---
@@ -504,6 +504,13 @@
 "deprecated": true,
 "description": "(DEPRECATED) This value is no longer 
used in the router.",
 "create": true
+},
+"defaultDistribution": {
+"type": ["multicast", "closest", "balanced", 
"forbidden"],
+"description": "Default forwarding treatment for any 
address without a specified treatment. multicast - one copy of each message 
delivered to all subscribers; closest - messages delivered to only the closest 
subscriber; balanced - messages delivered to one subscriber with load balanced 
across subscribers; linkBalanced - for link-routing, link attaches balanced 
across destinations; forbidden - this address is forbidden, link attaches to an 
address of forbidden distribution will be rejected.",
--- End diff --

Removed linkBalanced from comment


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120649#comment-16120649
 ] 

Alan Conway commented on DISPATCH-803:
--

[~gsim] et al. I retract my retraction. Ignore [#16120352] and carry on. Been 
on holiday too long.

> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread Gordon Sim (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120513#comment-16120513
 ] 

Gordon Sim commented on DISPATCH-803:
-

[~aconway]:
> The original requirement is to prevent auto-creation of addresses. This 
> proposal sounds like the router will auto-create forbidden addresses which is 
> quite different

I think the requirement is simply that clients get some visible error signaled 
when trying to use an address for which no semantics have been configured. At 
present this is handled by treating such addresses as balanced. I don't 
personally view this as auto-creating the addresses, just as a way of inferring 
the semantics if none have been explicitly configured.

I'm not sure how your suggested config works. Are the two option - autoLink & 
autoCreateDistribution -scoped to the router? or a given address? For the 
latter, I don't think that helps with the original requirement, unless you come 
up with some special prefix that matches anything for which there is no more 
specific match. For thr former, I don't understand what autLink would do. In 
the former, the autoCreateDistribution is effectively just a different name for 
defaultDistribution, and personally I find defaultDistribution a bit more 
obvious.

> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120503#comment-16120503
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user grs commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132281323
  
--- Diff: src/router_core/transfer.c ---
@@ -634,6 +634,23 @@ static void qdr_link_forward_CT(qdr_core_t *core, 
qdr_link_t *link, qdr_delivery
 addr->deliveries_ingress++;
 link->total_deliveries++;
 }
+//
+// There is no address that we can send this delivery to, which means 
the addr was not found in our hastable. This
+// can be because there were no receivers or because the address was 
not defined in the config file.
+// If the treatment for such addresses is set to be forbidden, we send 
back a rejected disposition and detach the link
+//
+else if (core->qd->treatment == QD_TREATMENT_LINK_FORBIDDEN) {
+dlv->disposition = PN_REJECTED;
+dlv->error = qdr_error("qd:forbidden", "Sending deliveries to this 
address is forbidden");
--- End diff --

Or perhaps even better would be amqp:not-found, since we are really saying 
that this is not a recognised address?


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120497#comment-16120497
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user grs commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132280889
  
--- Diff: python/qpid_dispatch/management/qdrouter.json ---
@@ -504,6 +504,13 @@
 "deprecated": true,
 "description": "(DEPRECATED) This value is no longer 
used in the router.",
 "create": true
+},
+"defaultDistribution": {
+"type": ["multicast", "closest", "balanced", 
"forbidden"],
+"description": "Default forwarding treatment for any 
address without a specified treatment. multicast - one copy of each message 
delivered to all subscribers; closest - messages delivered to only the closest 
subscriber; balanced - messages delivered to one subscriber with load balanced 
across subscribers; linkBalanced - for link-routing, link attaches balanced 
across destinations; forbidden - this address is forbidden, link attaches to an 
address of forbidden distribution will be rejected.",
--- End diff --

linkBalanced should be removed from the comment


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120463#comment-16120463
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132275399
  
--- Diff: src/dispatch_private.h ---
@@ -52,6 +52,7 @@ struct qd_dispatch_t {
 qd_connection_manager_t *connection_manager;
 qd_policy_t *policy;
 void*dl_handle;
+qd_address_treatment_t   treatment;
--- End diff --

Changed treatment to default_treatment


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120462#comment-16120462
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ganeshmurthy commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132275310
  
--- Diff: include/qpid/dispatch/router.h ---
@@ -42,7 +42,8 @@ typedef enum {
 QD_TREATMENT_MULTICAST_ONCE   = 1,
 QD_TREATMENT_ANYCAST_CLOSEST  = 2,
 QD_TREATMENT_ANYCAST_BALANCED = 3,
-QD_TREATMENT_LINK_BALANCED= 4
+QD_TREATMENT_LINK_BALANCED= 4,
+QD_TREATMENT_LINK_FORBIDDEN   = 5
--- End diff --

Changed QD_TREATMENT_LINK_FORBIDDEN to QD_TREATMENT_FORBIDDEN


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120385#comment-16120385
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132261405
  
--- Diff: src/router_core/transfer.c ---
@@ -634,6 +634,23 @@ static void qdr_link_forward_CT(qdr_core_t *core, 
qdr_link_t *link, qdr_delivery
 addr->deliveries_ingress++;
 link->total_deliveries++;
 }
+//
+// There is no address that we can send this delivery to, which means 
the addr was not found in our hastable. This
+// can be because there were no receivers or because the address was 
not defined in the config file.
+// If the treatment for such addresses is set to be forbidden, we send 
back a rejected disposition and detach the link
+//
+else if (core->qd->treatment == QD_TREATMENT_LINK_FORBIDDEN) {
+dlv->disposition = PN_REJECTED;
+dlv->error = qdr_error("qd:forbidden", "Sending deliveries to this 
address is forbidden");
--- End diff --

You should be using one of the AMQP-specified error conditions that is in 
the amqp.[ch] files.  It seems that the appropriate error condition is 
"amqp:not-allowed", not "forbidden" (which is an error code only for the 
management protocol).


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120386#comment-16120386
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132259033
  
--- Diff: include/qpid/dispatch/router.h ---
@@ -42,7 +42,8 @@ typedef enum {
 QD_TREATMENT_MULTICAST_ONCE   = 1,
 QD_TREATMENT_ANYCAST_CLOSEST  = 2,
 QD_TREATMENT_ANYCAST_BALANCED = 3,
-QD_TREATMENT_LINK_BALANCED= 4
+QD_TREATMENT_LINK_BALANCED= 4,
+QD_TREATMENT_LINK_FORBIDDEN   = 5
--- End diff --

This constant should not have "_LINK_" in it.  That implies that this is 
only for link-routing.  You should rename it "QD_TREATMENT_FORBIDDEN" because 
this feature is not relevant for link-routing.


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120384#comment-16120384
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132260270
  
--- Diff: src/router_core/connections.c ---
@@ -1300,9 +1310,15 @@ static void 
qdr_link_inbound_first_attach_CT(qdr_core_t *core, qdr_action_t *act
 //
 // This link has a target address
 //
-bool   link_route;
-qdr_address_t *addr = qdr_lookup_terminus_address_CT(core, 
dir, conn, target, true, true, _route);
-if (!addr) {
+bool  link_route;
+bool  forbidden;
+qdr_address_t *addr = qdr_lookup_terminus_address_CT(core, 
dir, conn, target, true, true, _route, );
+if (forbidden) {
+qdr_link_outbound_detach_CT(core, link, 0, 
QDR_CONDITION_FORBIDDEN, true);
--- End diff --

Does this do the right thing protocol-wise?  Does the router send an attach 
with NULL terminus followed by a detach?


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120383#comment-16120383
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

Github user ted-ross commented on a diff in the pull request:

https://github.com/apache/qpid-dispatch/pull/185#discussion_r132259545
  
--- Diff: src/dispatch_private.h ---
@@ -52,6 +52,7 @@ struct qd_dispatch_t {
 qd_connection_manager_t *connection_manager;
 qd_policy_t *policy;
 void*dl_handle;
+qd_address_treatment_t   treatment;
--- End diff --

Shouldn't this be called default_treatment?


> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread Alan Conway (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120352#comment-16120352
 ] 

Alan Conway commented on DISPATCH-803:
--

I want to back up a bit, I think my suggestion was not right. The original 
requirement is to prevent auto-creation of addresses. This proposal sounds like 
the router will auto-create *forbidden* addresses which is quite different: Not 
auto-creating address X means client connecting/sending to X gets a 'not-found' 
error.  Creating X with {distribution=forbidden} creates a permanently unusable 
address named X, which would have to be explicitly deleted or modified to use 
it later.  We could make a special case meaning for 
defaultDistribution=forbidden but that is confusing. I think separate config is 
better:

autoLink = True|False # default True
autoCreateDistribution # default balanced

With these two attributes we don't need "forbidden" for this JIRA (but can 
still introduce it later if we want to)

Sorry for leading the conversation astray. 

> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16120344#comment-16120344
 ] 

ASF GitHub Bot commented on DISPATCH-803:
-

GitHub user ganeshmurthy opened a pull request:

https://github.com/apache/qpid-dispatch/pull/185

DISPATCH-803 - The following changes were made to support forbidden d…

…istribution

1. Added a new attribute to the router entity called called 
defaultDistribution which defaults to balanced
but can be set to forbidden
2. Attaches to forbidden addresses are rejected and the link is detached
3. Anonymous senders sending to forbidden addresses will be sent back a 
disposition of PN_REJECTED but link will not be closed
4. Added system test system_tests_default_distribution.py to test the above 
cases

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ganeshmurthy/qpid-dispatch DISPATCH-803

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/qpid-dispatch/pull/185.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #185


commit 6ddee464d11e570fdfe8f2599e1587c3f4fc0c42
Author: Ganesh Murthy 
Date:   2017-08-09T17:41:08Z

DISPATCH-803 - The following changes were made to support forbidden 
distribution
1. Added a new attribute to the router entity called called 
defaultDistribution which defaults to balanced
but can be set to forbidden
2. Attaches to forbidden addresses are rejected and the link is detached
3. Anonymous senders sending to forbidden addresses will be sent back a 
disposition of PN_REJECTED but link will not be closed
4. Added system test system_tests_default_distribution.py to test the above 
cases




> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-08 Thread Ganesh Murthy (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118648#comment-16118648
 ] 

Ganesh Murthy commented on DISPATCH-803:


I talked to [~tr...@redhat.com] about this and this is what we are proposing -

Add a new attribute called *defaultDistribution* to the *router* entity. This 
attribute is optional and will default to *balanced*. It can have a value of 
*forbidden* (we will introduce a new distribution called *forbidden*)

{noformat}
router {
mode: standalone
id: Router.A
defaultDistribution: forbidden
}
{noformat}

If a sender or receiver, whose source/target address is not explicitly defined 
in the router config file (or via qdmanage), is trying to attach, it would be 
refused if the defaultDistribution is set to forbidden  

> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
>Assignee: Ganesh Murthy
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Commented] (DISPATCH-803) refuse attach to undefined addresses

2017-08-08 Thread Ted Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/DISPATCH-803?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16118573#comment-16118573
 ] 

Ted Ross commented on DISPATCH-803:
---

This breaks down into two new requirements:
# Add a new distribution called "forbidden" that causes links attached to 
matching addresses to be detached with an error.  Messages delivered to 
matching addresses on an anonymous link shall be rejected with the same error.
# Add a way to configure the default distribution for non-configured addresses. 
 This default defaults to "balanced" for backward compatibility.

> refuse attach to undefined addresses
> 
>
> Key: DISPATCH-803
> URL: https://issues.apache.org/jira/browse/DISPATCH-803
> Project: Qpid Dispatch
>  Issue Type: Improvement
>Reporter: Gordon Sim
> Fix For: 1.0.0
>
>
> At present, if you attach to an address in the router whose semantics have 
> not been specifically defined, you get balanced message routing semantics.
> It would be useful to be able to configure the router such that it would 
> refuse links whose source/target was not explicitly defined. E.g. by being 
> able to configure the default semantics to be of type 'invalid' (or anything 
> similar). (Being able to explicitly blacklist certain addresses might also be 
> nice, but is a more exotic use case I think).
> Messages sent through an anonymous link to these 'invalid' addresses would be 
> rejected.
>  



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org