blob: 3c9b86243019e05d6cf42882e87f932db2335d7e [file] [log] [blame]
Lorenz Brundd8c80e2019-10-07 16:19:49 +02001// 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 Hofstadt0d7c91e2019-10-23 21:44:47 +020017syntax = "proto3";
Serge Bazanski662b5b32020-12-21 13:49:00 +010018package metropolis.proto.api;
Serge Bazanski77cb6c52020-12-19 00:09:22 +010019option go_package = "git.monogon.dev/source/nexantic.git/metropolis/proto/api";
Lorenz Brundd8c80e2019-10-07 16:19:49 +020020
Serge Bazanski662b5b32020-12-21 13:49:00 +010021// 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 Bazanskiefdb6e92020-07-13 17:19:27 +020024message EnrolmentConfig {
Serge Bazanski57b43752020-07-13 19:17:48 +020025 // 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 Bazanskiefdb6e92020-07-13 17:19:27 +020029 // Filled in by node after it is enrolled
Serge Bazanski57b43752020-07-13 19:17:48 +020030 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.
40message 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 Hofstadt0d7c91e2019-10-23 21:44:47 +020064}