Lorenz Brun | dd8c80e | 2019-10-07 16:19:49 +0200 | [diff] [blame] | 1 | // Copyright 2020 The Monogon Project Authors. |
| 2 | // |
| 3 | // SPDX-License-Identifier: Apache-2.0 |
| 4 | // |
| 5 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | // you may not use this file except in compliance with the License. |
| 7 | // You may obtain a copy of the License at |
| 8 | // |
| 9 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | // |
| 11 | // Unless required by applicable law or agreed to in writing, software |
| 12 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | // See the License for the specific language governing permissions and |
| 15 | // limitations under the License. |
| 16 | |
Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 17 | syntax = "proto3"; |
Serge Bazanski | 662b5b3 | 2020-12-21 13:49:00 +0100 | [diff] [blame] | 18 | package metropolis.proto.api; |
Serge Bazanski | 31370b0 | 2021-01-07 16:31:14 +0100 | [diff] [blame^] | 19 | option go_package = "source.monogon.dev/metropolis/proto/api"; |
Lorenz Brun | dd8c80e | 2019-10-07 16:19:49 +0200 | [diff] [blame] | 20 | |
Serge Bazanski | 662b5b3 | 2020-12-21 13:49:00 +0100 | [diff] [blame] | 21 | // EnrolmentConfig is the single Metropolis node boot configuration file |
| 22 | // contained in the ESP. It configures the way the node will start up (what |
| 23 | // cluster it will join/enroll into/create). |
Serge Bazanski | efdb6e9 | 2020-07-13 17:19:27 +0200 | [diff] [blame] | 24 | message EnrolmentConfig { |
Serge Bazanski | 57b4375 | 2020-07-13 19:17:48 +0200 | [diff] [blame] | 25 | // Debug/temporary cluster enrolment method. If set, the node will attempt to enroll into the |
| 26 | // cluster that this ticket was generated for. Otherwise, a new cluster will be created. |
| 27 | GoldenTicket golden_ticket = 1; |
| 28 | |
Serge Bazanski | efdb6e9 | 2020-07-13 17:19:27 +0200 | [diff] [blame] | 29 | // Filled in by node after it is enrolled |
Serge Bazanski | 57b4375 | 2020-07-13 19:17:48 +0200 | [diff] [blame] | 30 | string node_id = 2; |
| 31 | } |
| 32 | |
| 33 | // GoldenTicket is a ticket that allows any node to enroll into a cluster, bypassing any integrity |
| 34 | // checks. |
| 35 | // |
| 36 | // Currently, enrolling into a cluster does not use a TPM-based workflow, and instead |
| 37 | // bases on a simplified workflow of joining consensus by being started with a |
| 38 | // TLS client certificate. This is a short-circuit fix to allow multi-node |
| 39 | // clusters for testing before we design the final cluster node lifecycle system. |
| 40 | message GoldenTicket { |
| 41 | // Etcd peer CA certificate. |
| 42 | bytes etcd_ca_cert = 1; |
| 43 | // Etcd peer client certificate. |
| 44 | bytes etcd_client_cert = 2; |
| 45 | // Etcd peer client key. |
| 46 | bytes etcd_client_key = 3; |
| 47 | // Initial etcd peer CRL. |
| 48 | bytes etcd_crl = 4; |
| 49 | |
| 50 | message EtcdPeer { |
| 51 | string name = 1; |
| 52 | string address = 2; |
| 53 | } |
| 54 | // All other current etcd peers in the cluster. |
| 55 | repeated EtcdPeer peers = 5; |
| 56 | // The peer that this node should start running. |
| 57 | EtcdPeer this = 6; |
| 58 | |
| 59 | // Node configuration. Currently unused (in the future, this will be used to run a node |
| 60 | // management service separate from etcd clustering). |
| 61 | string node_id = 7; |
| 62 | bytes node_cert = 8; |
| 63 | bytes node_key = 9; |
Hendrik Hofstadt | 0d7c91e | 2019-10-23 21:44:47 +0200 | [diff] [blame] | 64 | } |