2022-03-22 11:03:15 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package pubapi;
|
|
|
|
|
|
|
|
option go_package = "github.com/edgelesssys/constellation/coordinator/pubapi/pubproto";
|
|
|
|
|
|
|
|
service API {
|
|
|
|
rpc GetState(GetStateRequest) returns (GetStateResponse);
|
|
|
|
rpc ActivateAsCoordinator(ActivateAsCoordinatorRequest) returns (stream ActivateAsCoordinatorResponse);
|
2022-04-20 11:06:47 -04:00
|
|
|
rpc ActivateAsNode(stream ActivateAsNodeRequest) returns (stream ActivateAsNodeResponse);
|
2022-03-22 11:03:15 -04:00
|
|
|
rpc ActivateAdditionalNodes(ActivateAdditionalNodesRequest) returns (stream ActivateAdditionalNodesResponse);
|
2022-04-13 06:39:55 -04:00
|
|
|
rpc ActivateAsAdditionalCoordinator(ActivateAsAdditionalCoordinatorRequest) returns (ActivateAsAdditionalCoordinatorResponse);
|
|
|
|
rpc ActivateAdditionalCoordinator(ActivateAdditionalCoordinatorRequest) returns (ActivateAdditionalCoordinatorResponse);
|
2022-03-22 11:03:15 -04:00
|
|
|
rpc JoinCluster(JoinClusterRequest) returns (JoinClusterResponse);
|
|
|
|
rpc TriggerNodeUpdate(TriggerNodeUpdateRequest) returns (TriggerNodeUpdateResponse);
|
2022-04-13 06:39:55 -04:00
|
|
|
rpc TriggerCoordinatorUpdate(TriggerCoordinatorUpdateRequest) returns (TriggerCoordinatorUpdateResponse);
|
2022-04-25 11:21:09 -04:00
|
|
|
rpc GetPeerVPNPublicKey(GetPeerVPNPublicKeyRequest) returns (GetPeerVPNPublicKeyResponse);
|
2022-04-12 08:24:36 -04:00
|
|
|
rpc RequestStateDiskKey(RequestStateDiskKeyRequest) returns (RequestStateDiskKeyResponse);
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message GetStateRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetStateResponse {
|
|
|
|
uint32 state = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAsCoordinatorRequest {
|
|
|
|
bytes admin_vpn_pub_key = 1;
|
2022-04-13 06:39:55 -04:00
|
|
|
repeated string node_public_ips = 2;
|
2022-04-25 11:21:09 -04:00
|
|
|
repeated string coordinator_public_ips = 3;
|
|
|
|
repeated string autoscaling_node_groups = 4;
|
|
|
|
bytes master_secret = 5;
|
|
|
|
string kms_uri = 6;
|
|
|
|
string storage_uri = 7;
|
|
|
|
string key_encryption_key_id = 8;
|
|
|
|
bool use_existing_kek = 9;
|
|
|
|
string cloud_service_account_uri = 10;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAsCoordinatorResponse {
|
|
|
|
oneof content {
|
|
|
|
AdminConfig admin_config = 1;
|
|
|
|
Log log = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAsNodeRequest {
|
2022-04-20 11:06:47 -04:00
|
|
|
oneof request {
|
|
|
|
ActivateAsNodeInitialRequest initial_request = 1;
|
|
|
|
bytes state_disk_key = 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAsNodeInitialRequest {
|
2022-03-22 11:03:15 -04:00
|
|
|
string node_vpn_ip = 1;
|
|
|
|
repeated Peer peers = 2;
|
|
|
|
bytes owner_id = 3;
|
|
|
|
bytes cluster_id = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAsNodeResponse {
|
2022-04-20 11:06:47 -04:00
|
|
|
oneof response {
|
|
|
|
bytes node_vpn_pub_key = 1;
|
|
|
|
string state_disk_uuid = 2;
|
|
|
|
}
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAdditionalNodesRequest {
|
2022-04-13 06:39:55 -04:00
|
|
|
repeated string node_public_ips = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAdditionalNodesResponse {
|
|
|
|
Log log = 1;
|
|
|
|
}
|
|
|
|
|
2022-04-13 06:39:55 -04:00
|
|
|
message ActivateAsAdditionalCoordinatorRequest {
|
|
|
|
string assigned_vpn_ip = 1;
|
|
|
|
Peer activating_coordinator_data = 2;
|
2022-04-25 11:21:09 -04:00
|
|
|
repeated Peer peers = 3;
|
|
|
|
bytes owner_id = 4;
|
|
|
|
bytes cluster_id = 5;
|
2022-04-13 06:39:55 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAsAdditionalCoordinatorResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAdditionalCoordinatorRequest {
|
|
|
|
string coordinator_public_ip = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ActivateAdditionalCoordinatorResponse {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2022-03-22 11:03:15 -04:00
|
|
|
message JoinClusterRequest {
|
2022-04-13 06:39:55 -04:00
|
|
|
string coordinator_vpn_ip = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
message JoinClusterResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message TriggerNodeUpdateRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message TriggerNodeUpdateResponse {
|
|
|
|
}
|
|
|
|
|
2022-04-13 06:39:55 -04:00
|
|
|
message TriggerCoordinatorUpdateRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message TriggerCoordinatorUpdateResponse {
|
|
|
|
}
|
|
|
|
|
2022-04-12 08:24:36 -04:00
|
|
|
message RequestStateDiskKeyRequest {
|
|
|
|
string disk_uuid = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RequestStateDiskKeyResponse {
|
|
|
|
}
|
|
|
|
|
2022-04-25 11:21:09 -04:00
|
|
|
message GetPeerVPNPublicKeyRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetPeerVPNPublicKeyResponse {
|
|
|
|
bytes coordinator_pub_key = 1;
|
|
|
|
}
|
|
|
|
|
2022-03-22 11:03:15 -04:00
|
|
|
message AdminConfig {
|
|
|
|
string admin_vpn_ip = 1;
|
|
|
|
bytes coordinator_vpn_pub_key = 2;
|
|
|
|
bytes kubeconfig = 3;
|
|
|
|
bytes owner_id = 4;
|
|
|
|
bytes cluster_id = 5;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Log {
|
|
|
|
string message = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Peer {
|
2022-04-13 06:39:55 -04:00
|
|
|
string public_ip = 1;
|
2022-03-22 11:03:15 -04:00
|
|
|
string vpn_ip = 2;
|
|
|
|
bytes vpn_pub_key = 3;
|
|
|
|
uint32 role = 4;
|
|
|
|
}
|