Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relay enhancements #590

Merged
merged 1 commit into from
Sep 17, 2024
Merged

Relay enhancements #590

merged 1 commit into from
Sep 17, 2024

Conversation

cvaroqui
Copy link
Member

  • 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.

* 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.
@cvaroqui cvaroqui merged commit ad55560 into opensvc:main Sep 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant