diff --git a/shared/protos/identity_tunnelbroker.proto b/shared/protos/identity_tunnelbroker.proto new file mode 100644 --- /dev/null +++ b/shared/protos/identity_tunnelbroker.proto @@ -0,0 +1,25 @@ +syntax = "proto3"; + +package identity.tunnelbroker; + +// gRPC service for identity (client) to issue requests to tunnelbroker (server) +// for Comm Services. +// +// Authentication between services are expected to be validated outside of the +// rpc call. +service CommTunnelbrokerService { + // Sends a stringified JSON payload to device + // + // Tunnelbroker will enqueue the message, and send it next time the device + // connects to tunnelbroker and flushes the queue. + rpc SendMessageToDevice(MessageToDevice) returns (Empty) {} +} + +message Empty {} + +message MessageToDevice { + // The primary identity key of a device + string deviceID = 1; + // JSON encoded message, see shared/tunnelbroker_messages for valid payloads + string payload = 2; +}