blob: c07e4eaac075879caa4beb194ba0e5c184e60225 [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 Bazanskiefdb6e92020-07-13 17:19:27 +020018package smalltown.core.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 Bazanski57b43752020-07-13 19:17:48 +020021// EnrolmentConfig is the single boot configuration file contained in the Smalltown ESP. It configures
22// the way the node will start up (what cluster it will join/enroll into/create).
Serge Bazanskiefdb6e92020-07-13 17:19:27 +020023message EnrolmentConfig {
Serge Bazanski57b43752020-07-13 19:17:48 +020024 // Debug/temporary cluster enrolment method. If set, the node will attempt to enroll into the
25 // cluster that this ticket was generated for. Otherwise, a new cluster will be created.
26 GoldenTicket golden_ticket = 1;
27
Serge Bazanskiefdb6e92020-07-13 17:19:27 +020028 // Filled in by node after it is enrolled
Serge Bazanski57b43752020-07-13 19:17:48 +020029 string node_id = 2;
30}
31
32// GoldenTicket is a ticket that allows any node to enroll into a cluster, bypassing any integrity
33// checks.
34//
35// Currently, enrolling into a cluster does not use a TPM-based workflow, and instead
36// bases on a simplified workflow of joining consensus by being started with a
37// TLS client certificate. This is a short-circuit fix to allow multi-node
38// clusters for testing before we design the final cluster node lifecycle system.
39message GoldenTicket {
40 // Etcd peer CA certificate.
41 bytes etcd_ca_cert = 1;
42 // Etcd peer client certificate.
43 bytes etcd_client_cert = 2;
44 // Etcd peer client key.
45 bytes etcd_client_key = 3;
46 // Initial etcd peer CRL.
47 bytes etcd_crl = 4;
48
49 message EtcdPeer {
50 string name = 1;
51 string address = 2;
52 }
53 // All other current etcd peers in the cluster.
54 repeated EtcdPeer peers = 5;
55 // The peer that this node should start running.
56 EtcdPeer this = 6;
57
58 // Node configuration. Currently unused (in the future, this will be used to run a node
59 // management service separate from etcd clustering).
60 string node_id = 7;
61 bytes node_cert = 8;
62 bytes node_key = 9;
Hendrik Hofstadt0d7c91e2019-10-23 21:44:47 +020063}