I’m having a trouble implementing multi-domain URI and pattern based reg/sub
To give a quick explanation,
I have these two URIs
com.acmeco.devices.getserving devices for
com.customer1.devices.getserving devices for
com.customer2.devices.getserving devices for
devices service will only return devices that belong to each domain.
First I’ve tried with static authorizer with the following config
..devices with wildcard do not let
devices to register a procedure with
args: [ ‘session is not authorized to register procedure ‘…devices.get’’ ],
A way to solve this was through dynamic authorizer.
So, the first question, is
dynamic authorizer the only and right way to achieve the above scenario? if it is, no issue here just gotta use dynamic authorizer
Secondly, I wonder about the URI convention with serving multiple domains,
as far as I’m concerned, authorizer in CB does not deal with app logic, which excludes
domain in the CB’s authorization scope.
So what I’ll end up with would be
check authid and lookup DB to get user domain (because the domain in the URI can be manipulated…)
compare if the user belongs to the domain that’s being called in the URI
filter devices by domain, and return to user
This process makes actually
domain in the URI useless because the service will have to look up the DB anyways, which means
com.customer1.devices.get serving devices for
is same as
com.acmeco.devices.get serving devices for
acmeco.com with domain filter
in this scenario, should I give up on having the customer domain in the URI? or is it actually being used as it was meant to?