blob: 4cdbef2cc5fca11449c66f394c4439a33e3c2c03 [file] [log] [blame]
Serge Bazanski72068da2021-03-16 13:15:45 +01001// 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
17syntax = "proto3";
18option go_package = "source.monogon.dev/metropolis/proto/private";
19package metropolis.proto.private;
20
Serge Bazanskifd6d4eb2023-05-25 14:45:48 +020021import "metropolis/proto/common/common.proto";
22
Serge Bazanski72068da2021-03-16 13:15:45 +010023// Node describes a single node's state in etcd
Serge Bazanski30653ee2021-06-17 15:44:29 +020024// DEPRECATED: this will be moved to //metropolis/node/curator.
Serge Bazanski72068da2021-03-16 13:15:45 +010025message Node {
26 // Node's public key..
27 bytes public_key = 1;
28 // Node's individual cluster part of the data partition encryption key. It
29 // is combined with the Node Unlock Key (NUK) kept within
30 // SealedConfiguration.
31 bytes cluster_unlock_key = 2;
32
33 // TODO(q3k): document this based on cluster lifecycle design doc once this
34 // fully stabilizes.
35 enum FSMState {
36 FSM_STATE_INVALID = 0;
37 FSM_STATE_NEW = 1;
38 FSM_STATE_STANDBY = 2;
39 FSM_STATE_UP = 3;
40 FSM_STATE_DISOWNED = 4;
41 };
42 FSMState fsm_state = 3;
43
44 message Roles {
45 message ConsensusMember {
46 // Used to be: consensus member name, can be deduced from
47 // Certificate/Pubkey/ID.
48 reserved 1;
49 }
50 ConsensusMember consensus_member = 1;
51 message KubernetesWorker {
52 // Used to be: node name, can be deduced from
53 // Certificate/Pubkey/ID.
54 reserved 1;
55 }
56 KubernetesWorker kubernetes_worker = 2;
57 }
58 Roles roles = 4;
59}
60
61// SealedConfiguration is all configuration kept in a TPM-sealed (ie.
62// confidential and tamper-resistant) blob within the node's ESP (EFI)
63// partition. It contains everything that the node needs to join an existing
64// cluster after rebooting.
65message SealedConfiguration {
66 // node_unlock_key (NUK) is the node's part of the key required to unlock
67 // the node's data partition(s). It is combined with the Cluster Unlock Key
68 // (CUK) that's stored in etcd to create a key which is then used to mount
69 // the data partition. The NUK and CUK are generated on bootstrap and
70 // registration.
71 bytes node_unlock_key = 1;
Mateusz Zalega2930e992022-04-25 12:52:35 +020072 // join_key is an ED25519 private key generated during registration. The
73 // public part is shared with Curator to authenticate the join procedure.
74 bytes join_key = 2;
75 // cluster_ca is the X509 CA certificate of the cluster set during
76 // registration and used by nodes joining the cluster.
77 bytes cluster_ca = 3;
Serge Bazanskifd6d4eb2023-05-25 14:45:48 +020078 // storage_security is the node storage security that this node has been
79 // created with, and is used to determine the way the local storage (ie.
80 // Metropolis data partition) will be attempted to be mounted on subsequent
81 // node startups.
82 metropolis.proto.common.NodeStorageSecurity storage_security = 4;
Serge Bazanski72068da2021-03-16 13:15:45 +010083}