Is there any documentation on how to use tenants where I can read more about this? I guess the follow up question is how the statistics are separated in this regard. How to differentiate between customer A and customer B
we will be using jwt auth for our customers, maybe this could be a way to differentiate which tenant they can use? Does the jwt hold this info today?
The plugin does not really impose any requirements on the API endpoint. As long as the API is reachable and accepts requests for the required paths, and that it responds in a timely fashion, it’s all good.
Off the top of my head, here are a few things to consider:
Endpoint auth – if your API endpoint is publicly accessible, then you’ll want to protect it with some form of auth so that a malicious actor cannot flood you with junk data. If you happen to use a header-based auth, then you can use the api_headers options and not have to modify the module.
Domain resolution – when specifying the URL of your API, make sure the hostname is resolvable via DNS server and not reliant on /etc/hosts. The underlying net.http lua module used for resolving IP address does not use take into account /etc/hosts .
Debugging and initial dev – before building your endpoint, you could first configure event_sync to post to something like webhook.site. That way, you can first confirm that the module is working and you can inspect the payload and endpoints being called.
To do this, visit https://webhook.site and you’ll get a unique URL e.g. https://webhook.site/<SOME_UUID>. You can then configure event_sync with:
api_prefix = "https://webhook.site/<SOME_UUID>"
IIRC, tenant-based rooms (e.g. client123/room123) would be represented in room_name payload as [client123]room123. So your API backend should be able to easily parse it and store the data accordingly.
Do have a play and double check. Also take into account how case is handled for room name and tenant. I suspect everything might be represented as lower case since it is extracted for room JID.
So if someone visits https://meet.yourdomain.com/CustomerX/MyRoom it might show up as [customerx]myroom. Maybe.