* Attempt canceling sessions by the client In some circumstances (like a Ctrl-C), the client knows it's shutting down and the TOFU token will be lost. In this case it makes sense to cancel the session rather than have it time out. This introduces a command enum to the handshake message which can be used for the client to send commands to the worker -- in this case the only specified command is to cancel the session. It doesn't occur if the session is already timed out or if we can't authorize connections as this generally means the session is already invalid.
24 lines
637 B
Protocol Buffer
24 lines
637 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package worker.proxy.v1;
|
|
option go_package = "github.com/hashicorp/boundary/internal/proxy;proxy";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
enum HANDSHAKECOMMAND {
|
|
// Note: Unspecified is the desired zero value based on protolint, but for
|
|
// our purposes it simply means a normal connection.
|
|
HANDSHAKECOMMAND_UNSPECIFIED = 0;
|
|
HANDSHAKECOMMAND_SESSION_CANCEL = 1;
|
|
}
|
|
|
|
message ClientHandshake {
|
|
string tofu_token = 10;
|
|
HANDSHAKECOMMAND command = 20;
|
|
}
|
|
|
|
message HandshakeResult {
|
|
google.protobuf.Timestamp expiration = 10;
|
|
int32 connection_limit = 20;
|
|
int32 connections_left = 30;
|
|
} |