Serge Bazanski | 886d289 | 2021-04-13 16:39:39 +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 | |
Serge Bazanski | 66e5895 | 2021-10-05 17:06:56 +0200 | [diff] [blame] | 17 | package cluster |
Serge Bazanski | 886d289 | 2021-04-13 16:39:39 +0200 | [diff] [blame] | 18 | |
| 19 | import ( |
| 20 | "crypto/ed25519" |
| 21 | |
| 22 | apb "source.monogon.dev/metropolis/proto/api" |
| 23 | ) |
| 24 | |
| 25 | var ( |
| 26 | // InsecurePrivateKey is a ED25519 key that can be used during development as |
| 27 | // a fixed Owner Key when bootstrapping new clusters. |
| 28 | InsecurePrivateKey = ed25519.NewKeyFromSeed([]byte( |
Serge Bazanski | 96043bc | 2021-10-05 12:10:13 +0200 | [diff] [blame] | 29 | "\xb5\xcf\x35\x0f\xbf\xfb\xea\xfa\xa0\xf0\x29\x9d\xfa\xf7\xca\x6f" + |
Serge Bazanski | 886d289 | 2021-04-13 16:39:39 +0200 | [diff] [blame] | 30 | "\xa2\xc2\xc7\x87\xd7\x03\x3e\xb2\x11\x4f\x36\xe0\x22\x73\x4f\x87")) |
| 31 | // InsecurePublicKey is the ED25519 public key corresponding to |
| 32 | // InsecurePrivateKey. |
| 33 | InsecurePublicKey = InsecurePrivateKey.Public().(ed25519.PublicKey) |
| 34 | // InsecureClusterBootstrap is a ClusterBootstrap message to be used within |
| 35 | // NodeParameters when bootstrapping a development cluster that should be owned |
| 36 | // by the InsecurePrivateKey. |
| 37 | InsecureClusterBootstrap = &apb.NodeParameters_ClusterBootstrap{ |
| 38 | OwnerPublicKey: InsecurePublicKey, |
| 39 | } |
| 40 | ) |