165 lines
5.5 KiB
Protocol Buffer
165 lines
5.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package controller.api.resources.targets.v1;
|
|
|
|
option go_package = "github.com/hashicorp/boundary/internal/gen/controller/api/resources/targets;targets";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "google/protobuf/wrappers.proto";
|
|
import "google/protobuf/struct.proto";
|
|
import "controller/api/resources/scopes/v1/scope.proto";
|
|
import "controller/custom_options/v1/options.proto";
|
|
|
|
message HostSet{
|
|
string id = 10;
|
|
string host_catalog_id = 20;
|
|
}
|
|
|
|
// Target contains all fields related to a Target resource
|
|
message Target {
|
|
// The ID of the resource
|
|
// Output only.
|
|
string id = 10;
|
|
|
|
// The id of the parent of this resource. This must be defined for creation of this resource, but is otherwise
|
|
// read only.
|
|
string scope_id = 20 [json_name="scope_id"];
|
|
|
|
// Scope information for this resource
|
|
// Output only.
|
|
resources.scopes.v1.ScopeInfo scope = 30;
|
|
|
|
// Required name for identification purposes
|
|
google.protobuf.StringValue name = 40 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"name" that: "name"}];
|
|
|
|
// Optional user-set description for identification purposes
|
|
google.protobuf.StringValue description = 50 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"description" that: "description"}];
|
|
|
|
// The time this resource was created
|
|
// Output only.
|
|
google.protobuf.Timestamp created_time = 60 [json_name="created_time"];
|
|
|
|
// The time this resource was last updated.
|
|
// Output only.
|
|
google.protobuf.Timestamp updated_time = 70 [json_name="updated_time"];
|
|
|
|
// The version can be used in subsequent write requests to ensure this
|
|
// resource has not changed and to fail the write if it has.
|
|
uint32 version = 80;
|
|
|
|
string type = 90;
|
|
|
|
// The ids of the host sets that make up this target.
|
|
repeated string host_set_ids = 100;
|
|
|
|
// The host sets that make up this target.
|
|
// Output only.
|
|
repeated HostSet host_sets = 110;
|
|
|
|
// Maximum total lifetime of a created session, in seconds
|
|
google.protobuf.UInt32Value session_max_seconds = 120 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"session_max_seconds" that: "SessionMaxSeconds"}];
|
|
|
|
// Maximum number of connections in a session
|
|
google.protobuf.Int32Value session_connection_limit = 130 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"session_connection_limit" that: "SessionConnectionLimit"}];
|
|
|
|
// The attributes that are applied for the specific Target type.
|
|
google.protobuf.Struct attributes = 200 [(custom_options.v1.generate_sdk_option) = true];
|
|
}
|
|
|
|
message TcpTargetAttributes {
|
|
google.protobuf.UInt32Value default_port = 10 [(custom_options.v1.generate_sdk_option) = true, (custom_options.v1.mask_mapping) = {this:"attributes.default_port" that: "DefaultPort"}];
|
|
}
|
|
|
|
// WorkerInfo contains information about workers, returned in
|
|
// SessionAuthorization
|
|
message WorkerInfo {
|
|
// The address of the worker
|
|
string address = 10;
|
|
}
|
|
|
|
// SessionAuthorization contains all fields related to authorization for a
|
|
// session. It's in the Targets API because it's returned by a target authorize
|
|
// action.
|
|
message SessionAuthorizationData {
|
|
// The ID of the session
|
|
// Output only.
|
|
string session_id = 10;
|
|
|
|
// The id of the target authorizing this session. This must be defined for
|
|
// creation of this resource, but is otherwise read only.
|
|
// Output only.
|
|
string target_id = 20 [json_name="target_id"];
|
|
|
|
// Scope information for this resource
|
|
// Output only.
|
|
resources.scopes.v1.ScopeInfo scope = 30;
|
|
|
|
// The time this resource was created
|
|
// Output only.
|
|
google.protobuf.Timestamp created_time = 40 [json_name="created_time"];
|
|
|
|
// Type of the session (e.g. tcp, ssh, etc.)
|
|
// Output only.
|
|
string type = 80;
|
|
|
|
// Connection limit. -1 means unlimited. This is not actually enforced on
|
|
// the client side but it provides for better listener handling by including
|
|
// it.
|
|
// Output only.
|
|
int32 connection_limit = 90;
|
|
|
|
// The certificate to use when connecting (or if using custom certs, to
|
|
// serve as the "login"). Raw DER bytes.
|
|
// Output only.
|
|
bytes certificate = 120;
|
|
|
|
// The private key to use when connecting (or if using custom certs, to pass
|
|
// as the "password"). We are using Ed25519 so this is purely raw bytes, no
|
|
// marshaling.
|
|
// Output only.
|
|
bytes private_key = 130 [json_name="private_key"];
|
|
|
|
// Worker information. The first worker in the array should be prioritized.
|
|
// Output only.
|
|
repeated WorkerInfo worker_info = 150 [json_name="worker_info"];
|
|
}
|
|
|
|
message SessionAuthorization {
|
|
// The ID of the session
|
|
// Output only.
|
|
string session_id = 10;
|
|
|
|
// The id of the target authorizing this session. This must be defined for
|
|
// creation of this resource, but is otherwise read only.
|
|
// Output only.
|
|
string target_id = 20 [json_name="target_id"];
|
|
|
|
// Scope information for this resource
|
|
// Output only.
|
|
resources.scopes.v1.ScopeInfo scope = 30;
|
|
|
|
// The time this resource was created
|
|
// Output only.
|
|
google.protobuf.Timestamp created_time = 40 [json_name="created_time"];
|
|
|
|
// The user ID associated with the resource
|
|
// Output only.
|
|
string user_id = 50;
|
|
|
|
// The host set ID associated with the resource
|
|
// Output only.
|
|
string host_set_id = 60;
|
|
|
|
// The host ID associated with the resource.
|
|
// Output only.
|
|
string host_id = 70;
|
|
|
|
// Type of the session (e.g. tcp, ssh, etc.)
|
|
// Output only.
|
|
string type = 80;
|
|
|
|
// The marshaled SessionAuthorizationData message containing all information
|
|
// that the proxy needs.
|
|
// Output only.
|
|
string authorization_token = 90;
|
|
} |