blob: a983a737b18ce59d0fc6e73e76ff1b8bbe22922a [file] [log] [blame]
Lorenz Brun94695962023-01-12 17:33:17 +00001syntax = "proto3";
2package cloud.agent.api;
3option go_package = "source.monogon.dev/cloud/agent/api";
4
5// TakeoverInit is the message sent to the takeover process over an SSH session
6// during initialization.
7message TakeoverInit {
Lorenz Brun5b8b8602023-03-09 17:22:21 +01008 // Machine ID of this machine to be taken over as assigned by the BMaaS
9 // service.
10 string machine_id = 1;
Lorenz Brun94695962023-01-12 17:33:17 +000011 // bmaas_endpoint is an address of the BMaaS service the agent should call
12 // back to.
Lorenz Brun5b8b8602023-03-09 17:22:21 +010013 string bmaas_endpoint = 2;
Lorenz Brunaadeb792023-03-27 15:53:56 +020014 // Optional CA certificate to be used instead of a public CA root store.
15 // Formatted as raw ASN.1 DER.
16 bytes ca_certificate = 3;
Lorenz Brun94695962023-01-12 17:33:17 +000017}
18
Lorenz Brun595dfe92023-02-21 19:13:02 +010019message TakeoverSuccess {
Lorenz Brun94695962023-01-12 17:33:17 +000020 // init_message is the exact init message the agent received.
21 TakeoverInit init_message = 1;
22 // key is the agent's public key.
23 bytes key = 2;
Lorenz Brun595dfe92023-02-21 19:13:02 +010024 // warnings contains a list of non-critical errors which occurred during the
25 // takeover preparation.
26 repeated string warning = 3;
27}
28
29message TakeoverError {
30 // Error message
31 string message = 1;
32}
33
34// TakeoverResponse is the message the takeover process sends back after
35// receiving an TakeoverInit message.
36message TakeoverResponse {
37 oneof result {
38 TakeoverSuccess success = 1;
39 TakeoverError error = 2;
40 }
Lorenz Brun94695962023-01-12 17:33:17 +000041}