feat: machine authorization

This commit is contained in:
Johan Siebens
2022-11-03 11:40:22 +01:00
parent 9baf2ec6d1
commit e74faa2605
24 changed files with 1340 additions and 528 deletions
+1
View File
@@ -21,6 +21,7 @@ message CreateAuthKeyRequest {
bool ephemeral = 2;
optional google.protobuf.Duration expiry = 3;
repeated string tags = 4;
bool pre_authorized = 5;
}
message CreateAuthKeyResponse {
+3
View File
@@ -38,6 +38,8 @@ service IonscaleService {
rpc DisableServiceCollection(DisableServiceCollectionRequest) returns (DisableServiceCollectionResponse) {}
rpc EnableSSH(EnableSSHRequest) returns (EnableSSHResponse) {}
rpc DisableSSH(DisableSSHRequest) returns (DisableSSHResponse) {}
rpc EnableMachineAuthorization(EnableMachineAuthorizationRequest) returns (EnableMachineAuthorizationResponse) {}
rpc DisableMachineAuthorization(DisableMachineAuthorizationRequest) returns (DisableMachineAuthorizationResponse) {}
rpc GetDNSConfig(GetDNSConfigRequest) returns (GetDNSConfigResponse) {}
rpc SetDNSConfig(SetDNSConfigRequest) returns (SetDNSConfigResponse) {}
@@ -58,6 +60,7 @@ service IonscaleService {
rpc GetMachine(GetMachineRequest) returns (GetMachineResponse) {}
rpc ListMachines(ListMachinesRequest) returns (ListMachinesResponse) {}
rpc AuthorizeMachine(AuthorizeMachineRequest) returns (AuthorizeMachineResponse) {}
rpc ExpireMachine(ExpireMachineRequest) returns (ExpireMachineResponse) {}
rpc DeleteMachine(DeleteMachineRequest) returns (DeleteMachineResponse) {}
rpc SetMachineKeyExpiry(SetMachineKeyExpiryRequest) returns (SetMachineKeyExpiryResponse) {}
+7
View File
@@ -42,6 +42,12 @@ message GetMachineResponse {
Machine machine = 1;
}
message AuthorizeMachineRequest {
uint64 machine_id = 1;
}
message AuthorizeMachineResponse {}
message Machine {
uint64 id = 1;
string name = 2;
@@ -63,6 +69,7 @@ message Machine {
repeated string advertised_routes = 18;
bool advertised_exit_node = 19;
bool enabled_exit_node = 20;
bool authorized = 21;
}
message ClientConnectivity {
+12
View File
@@ -99,3 +99,15 @@ message DisableSSHRequest {
}
message DisableSSHResponse {}
message EnableMachineAuthorizationRequest {
uint64 tailnet_id = 1;
}
message EnableMachineAuthorizationResponse {}
message DisableMachineAuthorizationRequest {
uint64 tailnet_id = 1;
}
message DisableMachineAuthorizationResponse {}