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

Charles E. Rolke commented on DISPATCH-1585:
--------------------------------------------

What do you get if you enable trace logging for the POLICY module in the router?

I translated the config into this. I've substituted hostname 'unused' that will 
work with my setup.
{code:java}
router {
        defaultDistribution: unavailable
}

listener {
    host: 0.0.0.0
        port: 5672
        authenticatePeer: false
        saslMechanisms: ANONYMOUS
        multiTenant: true
}

policy {
    enableVhostPolicy: true
        defaultVhost: $default
}

vhost {
    hostname: myprefix
        aliases: unused
        allowUnknownUser: true
        groups: {
            "$default": {
                    "remoteHosts":"*",
                        "sources":"*",
                        "targets":"*",
                        "allowDynamicSource":true,
                        "allowAnonymousSender":true}
        }
}

log {
    module: POLICY
        enable: trace+
}

address {
        prefix: myprefix/foo
}
{code}
and it seems to work. Router log shows amqp Open hostname 'unused'. Policy 
translates that to use the 'myprefix' ruleset.
{code:java}
[0x7faf28013610]: AMQP:FRAME:  <- AMQP
[0x7faf28013610]: AMQP:FRAME:0 <- @open(16) 
[container-id="7c4e2d07-d355-4764-abb0-872eabadc913", hostname="unused", 
channel-max=32767]
[0x7faf28013610]: AMQP:FRAME:0 <- @begin(17) [next-outgoing-id=0, 
incoming-window=2147483647, outgoing-window=2147483647]
[0x7faf28013610]: AMQP:FRAME:0 <- @attach(18) 
[name="83006374-5f74-4d5b-aa4c-af55ff9bbe0e", handle=0, role=false, 
snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, 
dynamic=false], target=@target(41) [address="foo", durable=0, timeout=0, 
dynamic=false], initial-delivery-count=0, max-message-size=0]
2020-07-08 16:58:36.562192 -0400 POLICY (debug) AMQP Open for user 'anonymous', 
rhost '192.168.1.17', vhost 'unused': proceeds using vhost 'myprefix' ruleset
2020-07-08 16:58:36.562296 -0400 POLICY (trace) [C1] ALLOW AMQP Open 
lookup_user: anonymous, rhost: 192.168.1.17, vhost: unused, connection: 
192.168.1.17:41378. Usergroup: '$default'
2020-07-08 16:58:36.562366 -0400 POLICY (debug) AMQP Open lookup settings for 
vhost 'unused': proceeds using vhost 'myprefix' ruleset
2020-07-08 16:58:36.562636 -0400 ROUTER (info) [C1] Connection Opened: dir=in 
host=192.168.1.17:41378 vhost=myprefix encrypted=no auth=ANONYMOUS 
user=anonymous container_id=7c4e2d07-d355-4764-abb0-872eabadc913 props=
2020-07-08 16:58:36.562692 -0400 POLICY (trace) [C1] ALLOW AMQP Begin Session. 
user: anonymous, rhost: 192.168.1.17, vhost: unused
2020-07-08 16:58:36.562720 -0400 POLICY (trace) [C1] ALLOW AMQP Attach sender 
link 'foo' for user 'anonymous', rhost '192.168.1.17', vhost 'unused' based on 
link target name
{code}
Simple send and receive go to _*-a amqp://unused:amqp/foo*_  and exchange 
messages. I don't know that clients operating like this are supposed to 
interact with the multitenant prefix.

> Allow defining address prefix shared by different multitenant listeners
> -----------------------------------------------------------------------
>
>                 Key: DISPATCH-1585
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1585
>             Project: Qpid Dispatch
>          Issue Type: Wish
>            Reporter: Ulf Lilleengen
>            Assignee: Charles E. Rolke
>            Priority: Major
>             Fix For: 1.13.0
>
>
> At present, a multitenant router listener will prefix addresses with the 
> hostname in the AMQP Open. However, given a configuration where it is 
> desirable to expose a router address space for multiple DNS names, any 
> address, linkRoute and autoLink configuration will need to be duplicated for 
> each DNS name. This complicates router configuration significantly.
>  
> Instead, having a way to specify which prefix to apply for a multitenant 
> listener would allow reusing the same address, autoLink and linkRoute 
> configuration for multiple listeners.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to