Files
threshold/internal/proto/controller/api/resources/sessions/v1/session.proto
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

116 lines
5.2 KiB
Protocol Buffer
Raw Normal View History

2020-10-07 18:37:30 -07:00
// Copyright (c) HashiCorp, Inc.
2020-09-26 08:30:27 -04:00
// SPDX-License-Identifier: MPL-2.0
2023-02-02 17:15:17 -08:00
syntax = "proto3";
package controller.api.resources.sessions.v1;
import "controller/api/resources/scopes/v1/scope.proto";
import "google/protobuf/timestamp.proto";
option go_package = "github.com/hashicorp/boundary/sdk/pbs/controller/api/resources/sessions;sessions";
message SessionState {
2020-09-26 08:30:27 -04:00
// The status of the Session, e.g. "pending", "active", "canceling", "terminated".
2023-07-28 12:41:55 -07:00
string status = 10; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The time the Session entered this state.
2023-07-28 12:41:55 -07:00
google.protobuf.Timestamp start_time = 20 [json_name = "start_time"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The time the Session stopped being in this state.
2023-07-28 12:41:55 -07:00
google.protobuf.Timestamp end_time = 30 [json_name = "end_time"]; // @gotags: `class:"public" eventstream:"observation"`
}
// Connection contains information about a specific connection in a session
message Connection {
// client_tcp_address of the connection
string client_tcp_address = 3; // @gotags: `class:"public"`
// client_tcp_port of the connection
uint32 client_tcp_port = 4; // @gotags: `class:"public"`
// endpoint_tcp_address of the connection
string endpoint_tcp_address = 5; // @gotags: `class:"public"`
// endpoint_tcp_port of the connection
uint32 endpoint_tcp_port = 6; // @gotags: `class:"public"`
// bytes_up of the connection
int64 bytes_up = 7; // @gotags: `class:"public"`
// bytes_down of the connection
int64 bytes_down = 8; // @gotags: `class:"public"`
// closed_reason of the connection
string closed_reason = 9; // @gotags: `class:"public"`
}
// Session contains all fields related to a Session resource
message Session {
// Worker info previously contained only the worker's address but was never
// populated either in the database or on the API. While worker id information
// may become helpful on a session in the future, the worker id seems the most
// relevant information since the address can change between the time the
// session is created and a session connection is made through that worker.
reserved "worker_info";
2020-09-26 08:30:27 -04:00
// Output only. The ID of the Session.
2023-07-28 12:41:55 -07:00
string id = 10; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The ID of the Target that created this Session.
2023-07-28 12:41:55 -07:00
string target_id = 20 [json_name = "target_id"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. Scope information for this resource.
resources.scopes.v1.ScopeInfo scope = 30;
2020-09-26 08:30:27 -04:00
// Output only. The time this resource was created.
2023-07-28 12:41:55 -07:00
google.protobuf.Timestamp created_time = 60 [json_name = "created_time"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The time this resource was last updated.
2023-07-28 12:41:55 -07:00
google.protobuf.Timestamp updated_time = 70 [json_name = "updated_time"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Version is used when canceling this Session to ensure that the operation is acting on a known session state.
uint32 version = 80; // @gotags: `class:"public"`
2020-09-26 08:30:27 -04:00
// Output only. Type of the Session (e.g. tcp).
2023-07-28 12:41:55 -07:00
string type = 90; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. After this time the connection will be expired, e.g. forcefully terminated.
2023-07-28 12:41:55 -07:00
google.protobuf.Timestamp expiration_time = 100 [json_name = "expiration_time"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The ID of the Auth Token used to authenticate.
string auth_token_id = 110 [json_name = "auth_token_id"]; // @gotags: `class:"public"`
2020-09-26 08:30:27 -04:00
// Output only. The ID of the User that requested the Session.
2023-07-28 12:41:55 -07:00
string user_id = 120 [json_name = "user_id"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The Host Set sourcing the Host for this Session.
2023-07-28 12:41:55 -07:00
string host_set_id = 130 [json_name = "host_set_id"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The Host used by the Session.
2023-07-28 12:41:55 -07:00
string host_id = 140 [json_name = "host_id"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The Scope of the Session.
2023-07-28 12:41:55 -07:00
string scope_id = 150 [json_name = "scope_id"]; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The endpoint of the Session; that is, the address to which the worker is proxying data.
string endpoint = 160; // @gotags: `class:"public"`
2020-09-26 08:30:27 -04:00
// Output only. The states of this Session in descending order from the current state to the first.
repeated SessionState states = 170;
2020-09-26 08:30:27 -04:00
// Output only. The current status of this Session.
2023-07-28 12:41:55 -07:00
string status = 180; // @gotags: `class:"public" eventstream:"observation"`
2020-09-26 08:30:27 -04:00
// Output only. The certificate generated for the session. Raw DER bytes.
bytes certificate = 200; // @gotags: `class:"public"`
2020-10-07 18:37:30 -07:00
// Output only. If the session is terminated, this provides a short description as to why.
2023-07-28 12:41:55 -07:00
string termination_reason = 210 [json_name = "termination_reason"]; // @gotags: `class:"public" eventstream:"observation"`
// Output only. The available actions on this resource for this user.
repeated string authorized_actions = 300 [json_name = "authorized_actions"]; // @gotags: `class:"public"`
// Output only. The associated connections with this session.
repeated Connection connections = 310;
}