Serge Bazanski | 72068da | 2021-03-16 13:15:45 +0100 | [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 | |
| 17 | syntax = "proto3"; |
| 18 | option go_package = "source.monogon.dev/metropolis/proto/private"; |
| 19 | package metropolis.proto.private; |
| 20 | |
| 21 | // Node describes a single node's state in etcd |
Serge Bazanski | 30653ee | 2021-06-17 15:44:29 +0200 | [diff] [blame] | 22 | // DEPRECATED: this will be moved to //metropolis/node/curator. |
Serge Bazanski | 72068da | 2021-03-16 13:15:45 +0100 | [diff] [blame] | 23 | message Node { |
| 24 | // Node's public key.. |
| 25 | bytes public_key = 1; |
| 26 | // Node's individual cluster part of the data partition encryption key. It |
| 27 | // is combined with the Node Unlock Key (NUK) kept within |
| 28 | // SealedConfiguration. |
| 29 | bytes cluster_unlock_key = 2; |
| 30 | |
| 31 | // TODO(q3k): document this based on cluster lifecycle design doc once this |
| 32 | // fully stabilizes. |
| 33 | enum FSMState { |
| 34 | FSM_STATE_INVALID = 0; |
| 35 | FSM_STATE_NEW = 1; |
| 36 | FSM_STATE_STANDBY = 2; |
| 37 | FSM_STATE_UP = 3; |
| 38 | FSM_STATE_DISOWNED = 4; |
| 39 | }; |
| 40 | FSMState fsm_state = 3; |
| 41 | |
| 42 | message Roles { |
| 43 | message ConsensusMember { |
| 44 | // Used to be: consensus member name, can be deduced from |
| 45 | // Certificate/Pubkey/ID. |
| 46 | reserved 1; |
| 47 | } |
| 48 | ConsensusMember consensus_member = 1; |
| 49 | message KubernetesWorker { |
| 50 | // Used to be: node name, can be deduced from |
| 51 | // Certificate/Pubkey/ID. |
| 52 | reserved 1; |
| 53 | } |
| 54 | KubernetesWorker kubernetes_worker = 2; |
| 55 | } |
| 56 | Roles roles = 4; |
| 57 | } |
| 58 | |
| 59 | // SealedConfiguration is all configuration kept in a TPM-sealed (ie. |
| 60 | // confidential and tamper-resistant) blob within the node's ESP (EFI) |
| 61 | // partition. It contains everything that the node needs to join an existing |
| 62 | // cluster after rebooting. |
| 63 | message SealedConfiguration { |
| 64 | // node_unlock_key (NUK) is the node's part of the key required to unlock |
| 65 | // the node's data partition(s). It is combined with the Cluster Unlock Key |
| 66 | // (CUK) that's stored in etcd to create a key which is then used to mount |
| 67 | // the data partition. The NUK and CUK are generated on bootstrap and |
| 68 | // registration. |
| 69 | bytes node_unlock_key = 1; |
| 70 | } |