Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 1 | syntax = "proto3"; |
| 2 | package cloud.agent.api; |
| 3 | option 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. |
| 7 | message TakeoverInit { |
Lorenz Brun | 5b8b860 | 2023-03-09 17:22:21 +0100 | [diff] [blame] | 8 | // Machine ID of this machine to be taken over as assigned by the BMaaS |
| 9 | // service. |
| 10 | string machine_id = 1; |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 11 | // bmaas_endpoint is an address of the BMaaS service the agent should call |
| 12 | // back to. |
Lorenz Brun | 5b8b860 | 2023-03-09 17:22:21 +0100 | [diff] [blame] | 13 | string bmaas_endpoint = 2; |
Lorenz Brun | aadeb79 | 2023-03-27 15:53:56 +0200 | [diff] [blame] | 14 | // 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 Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 17 | } |
| 18 | |
Lorenz Brun | 595dfe9 | 2023-02-21 19:13:02 +0100 | [diff] [blame] | 19 | message TakeoverSuccess { |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 20 | // 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 Brun | 595dfe9 | 2023-02-21 19:13:02 +0100 | [diff] [blame] | 24 | // warnings contains a list of non-critical errors which occurred during the |
| 25 | // takeover preparation. |
| 26 | repeated string warning = 3; |
| 27 | } |
| 28 | |
| 29 | message 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. |
| 36 | message TakeoverResponse { |
| 37 | oneof result { |
| 38 | TakeoverSuccess success = 1; |
| 39 | TakeoverError error = 2; |
| 40 | } |
Lorenz Brun | 9469596 | 2023-01-12 17:33:17 +0000 | [diff] [blame] | 41 | } |