2022-03-22 11:03:15 -04:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package vpnapi;
|
|
|
|
|
|
|
|
option go_package = "github.com/edgelesssys/constellation/coordinator/vpnapi/vpnproto";
|
|
|
|
|
|
|
|
service API {
|
|
|
|
rpc GetUpdate(GetUpdateRequest) returns (GetUpdateResponse);
|
|
|
|
rpc GetK8sJoinArgs(GetK8sJoinArgsRequest) returns (GetK8sJoinArgsResponse);
|
2022-04-25 11:21:09 -04:00
|
|
|
rpc GetK8sCertificateKey(GetK8sCertificateKeyRequest) returns (GetK8sCertificateKeyResponse);
|
2022-03-22 11:03:15 -04:00
|
|
|
rpc GetDataKey(GetDataKeyRequest) returns (GetDataKeyResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetUpdateRequest {
|
|
|
|
int64 resource_version = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetUpdateResponse {
|
|
|
|
int64 resource_version = 1;
|
|
|
|
repeated Peer peers = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetK8sJoinArgsRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetK8sJoinArgsResponse {
|
|
|
|
string api_server_endpoint = 1;
|
|
|
|
string token = 2;
|
|
|
|
string discovery_token_ca_cert_hash = 3;
|
|
|
|
}
|
|
|
|
|
2022-04-25 11:21:09 -04:00
|
|
|
message GetK8sCertificateKeyRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetK8sCertificateKeyResponse {
|
|
|
|
string certificateKey = 1;
|
|
|
|
}
|
|
|
|
|
2022-03-22 11:03:15 -04:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetDataKeyRequest {
|
|
|
|
string data_key_id = 1;
|
|
|
|
uint32 length = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetDataKeyResponse {
|
|
|
|
bytes data_key = 1;
|
|
|
|
}
|