Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add the GET /relay/status handler
Report the list of slot metadata (replace the message with its size).
Use that handler to implement "o[mx] daemon relay status"
om node relay status
RELAY USERNAME CLUSTER_ID CLUSTER_NAME NODENAME NODE_ADDR UPDATED_AT MSG_LEN
dev1n1 relay 82e47bfb-182f-413b-b5dd-9de8164095d5 reliable-leopard dev2n1 11.29.0.11:45280 2024-09-17T10:03:49+02:00 908
dev1n1 relay 82e47bfb-182f-413b-b5dd-9de8164095d5 reliable-leopard dev2n2 11.29.0.12:59096 2024-09-17T10:03:49+02:00 908
dev1n1 relay 82e47bfb-182f-413b-b5dd-9de8164095d5 reliable-leopard dev2n3 11.29.0.13:41290 2024-09-17T10:03:49+02:00 1164
GET /relay/status?remote=true reports the slot metadata of relays the requested node is client of.
Use that to implement "o[mx] node relay status"
root@dev2n1:~/dev/om3# om daemon relay status
RELAY USERNAME CLUSTER_ID CLUSTER_NAME NODENAME NODE_ADDR UPDATED_AT MSG_LEN
dev2n1 relay 19462276-f24b-486c-8f8e-7ffcca366fba dreamy-eel dev1n2 11.28.0.12:35288 2024-09-17T10:04:26+02:00 902
dev2n1 relay 19462276-f24b-486c-8f8e-7ffcca366fba dreamy-eel dev1n3 11.28.0.13:37832 2024-09-17T10:04:26+02:00 902
dev2n1 relay 19462276-f24b-486c-8f8e-7ffcca366fba dreamy-eel dev1n1 11.28.0.11:46104 2024-09-17T10:04:26+02:00 1434
Change GET /relay/message to respond with a simple dict instead of a list. Also make the nodename and cluster_id query parameters required.
The relay implementation now supports per-user partitions: A slot filled by user usr1 is not data nor meta readable by usr2 if usr2 is not granted root.
This prevents leaking encrypted message data and clear-text metadata to other consumers of the same relay.