mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-13 01:18:49 +01:00
e5c52efb4c
UI and CLI Clients are now able to use SSO login by default we will check if the management has configured or supports SSO providers daemon will handle fetching and waiting for an access token Oauth package was moved to internal to avoid one extra package at this stage Secrets were removed from OAuth CLI clients have less and better output 2 new status were introduced, NeedsLogin and FailedLogin for better messaging With NeedsLogin we no longer have endless login attempts
91 lines
1.8 KiB
Protocol Buffer
91 lines
1.8 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/descriptor.proto";
|
|
|
|
option go_package = "/proto";
|
|
|
|
package daemon;
|
|
|
|
service DaemonService {
|
|
// Login uses setup key to prepare configuration for the daemon.
|
|
rpc Login(LoginRequest) returns (LoginResponse) {}
|
|
|
|
// WaitSSOLogin uses the userCode to validate the TokenInfo and
|
|
// waits for the user to continue with the login on a browser
|
|
rpc WaitSSOLogin(WaitSSOLoginRequest) returns (WaitSSOLoginResponse) {}
|
|
|
|
// Up starts engine work in the daemon.
|
|
rpc Up(UpRequest) returns (UpResponse) {}
|
|
|
|
// Status of the service.
|
|
rpc Status(StatusRequest) returns (StatusResponse) {}
|
|
|
|
// Down engine work in the daemon.
|
|
rpc Down(DownRequest) returns (DownResponse) {}
|
|
|
|
// GetConfig of the daemon.
|
|
rpc GetConfig(GetConfigRequest) returns (GetConfigResponse) {}
|
|
};
|
|
|
|
message LoginRequest {
|
|
// setupKey wiretrustee setup key.
|
|
string setupKey = 1;
|
|
|
|
// preSharedKey for wireguard setup.
|
|
string preSharedKey = 2;
|
|
|
|
// managementUrl to authenticate.
|
|
string managementUrl = 3;
|
|
|
|
// adminUrl to manage keys.
|
|
string adminURL = 4;
|
|
|
|
}
|
|
|
|
message LoginResponse {
|
|
bool needsSSOLogin = 1;
|
|
string userCode = 2;
|
|
string verificationURI = 3;
|
|
string verificationURIComplete = 4;
|
|
}
|
|
|
|
message WaitSSOLoginRequest {
|
|
string userCode = 1;
|
|
}
|
|
|
|
message WaitSSOLoginResponse {}
|
|
|
|
message UpRequest {}
|
|
|
|
message UpResponse {}
|
|
|
|
message StatusRequest{}
|
|
|
|
message StatusResponse{
|
|
// status of the server.
|
|
string status = 1;
|
|
}
|
|
|
|
message DownRequest {}
|
|
|
|
message DownResponse {}
|
|
|
|
message GetConfigRequest {}
|
|
|
|
message GetConfigResponse {
|
|
// managementUrl settings value.
|
|
string managementUrl = 1;
|
|
|
|
// configFile settings value.
|
|
string configFile = 2;
|
|
|
|
// logFile settings value.
|
|
string logFile = 3;
|
|
|
|
// preSharedKey settings value.
|
|
string preSharedKey = 4;
|
|
|
|
// adminURL settings value.
|
|
string adminURL = 5;
|
|
}
|