2022-04-06 04:36:58 -04:00
|
|
|
/*
|
|
|
|
Package constants contains the constants used by Constellation.
|
|
|
|
Constants should never be overwritable by command line flags or configuration files.
|
|
|
|
*/
|
|
|
|
package constants
|
|
|
|
|
2022-05-04 08:32:34 -04:00
|
|
|
import "time"
|
|
|
|
|
2022-04-06 04:36:58 -04:00
|
|
|
const (
|
2022-04-12 10:07:17 -04:00
|
|
|
//
|
|
|
|
// Constellation.
|
|
|
|
//
|
|
|
|
|
|
|
|
// ConstellationNameLength is the maximum length of a Constellation's name.
|
|
|
|
ConstellationNameLength = 37
|
|
|
|
// ConstellationMasterSecretStoreName is the name for the Constellation secrets in Kubernetes.
|
|
|
|
ConstellationMasterSecretStoreName = "constellation-mastersecret"
|
|
|
|
// ConstellationMasterSecretKey is the name of the key for master secret in the master secret store secret.
|
|
|
|
ConstellationMasterSecretKey = "mastersecret"
|
2022-07-29 03:52:47 -04:00
|
|
|
// ConstellationMasterSecretSalt is the name of the key for salt in the master secret store secret.
|
|
|
|
ConstellationMasterSecretSalt = "salt"
|
2022-04-12 10:07:17 -04:00
|
|
|
|
2022-04-06 04:36:58 -04:00
|
|
|
//
|
|
|
|
// Ports.
|
|
|
|
//
|
|
|
|
|
2022-07-05 08:13:19 -04:00
|
|
|
// JoinServicePort is the port for reaching the join service within Kubernetes.
|
|
|
|
JoinServicePort = 9090
|
|
|
|
// JoinServiceNodePort is the port for reaching the join service outside of Kubernetes.
|
2022-07-05 05:41:31 -04:00
|
|
|
JoinServiceNodePort = 30090
|
2022-06-28 11:03:28 -04:00
|
|
|
VerifyServicePortHTTP = 8080
|
|
|
|
VerifyServicePortGRPC = 9090
|
|
|
|
VerifyServiceNodePortHTTP = 30080
|
|
|
|
VerifyServiceNodePortGRPC = 30081
|
2022-06-29 10:13:01 -04:00
|
|
|
// KMSPort is the port the KMS server listens on.
|
2022-07-26 04:58:39 -04:00
|
|
|
KMSPort = 9000
|
2022-06-29 09:26:29 -04:00
|
|
|
BootstrapperPort = 9000
|
2022-08-01 10:51:34 -04:00
|
|
|
KubernetesPort = 6443
|
|
|
|
RecoveryPort = 9000
|
2022-06-29 09:26:29 -04:00
|
|
|
EnclaveSSHPort = 2222
|
|
|
|
SSHPort = 22
|
|
|
|
NVMEOverTCPPort = 8009
|
2022-08-01 10:51:34 -04:00
|
|
|
DebugdPort = 4000
|
2022-04-26 11:09:03 -04:00
|
|
|
// Default NodePort Range
|
|
|
|
// https://kubernetes.io/docs/concepts/services-networking/service/#type-nodeport
|
2022-08-01 10:51:34 -04:00
|
|
|
NodePortFrom = 30000
|
|
|
|
NodePortTo = 32767
|
2022-04-06 04:36:58 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// Filenames.
|
|
|
|
//
|
2022-05-23 05:36:54 -04:00
|
|
|
StateFilename = "constellation-state.json"
|
2022-07-05 07:52:36 -04:00
|
|
|
ClusterIDsFileName = "constellation-id.json"
|
2022-05-23 05:36:54 -04:00
|
|
|
ConfigFilename = "constellation-conf.yaml"
|
2022-08-16 10:06:38 -04:00
|
|
|
LicenseFilename = "constellation.license"
|
2022-05-23 05:36:54 -04:00
|
|
|
DebugdConfigFilename = "cdbg-conf.yaml"
|
|
|
|
AdminConfFilename = "constellation-admin.conf"
|
2022-07-29 03:52:47 -04:00
|
|
|
MasterSecretFilename = "constellation-mastersecret.json"
|
2022-05-23 05:36:54 -04:00
|
|
|
WGQuickConfigFilename = "wg0.conf"
|
|
|
|
CoreOSAdminConfFilename = "/etc/kubernetes/admin.conf"
|
2022-06-21 05:10:32 -04:00
|
|
|
KubeadmCertificateDir = "/etc/kubernetes/pki"
|
2022-05-23 05:36:54 -04:00
|
|
|
|
2022-06-29 10:13:01 -04:00
|
|
|
//
|
|
|
|
// Filenames for Constellation's micro services.
|
|
|
|
//
|
|
|
|
|
2022-07-18 06:28:02 -04:00
|
|
|
// ServiceBasePath is the base path for the mounted micro service's files.
|
2022-06-29 10:13:01 -04:00
|
|
|
ServiceBasePath = "/var/config"
|
|
|
|
// MeasurementsFilename is the filename of CC measurements.
|
|
|
|
MeasurementsFilename = "measurements"
|
2022-08-12 09:59:45 -04:00
|
|
|
// EnforcedPCRsFilename is the filename for a list PCRs that are required to pass attestation.
|
|
|
|
EnforcedPCRsFilename = "enforcedPCRs"
|
2022-07-26 04:58:39 -04:00
|
|
|
// MeasurementSaltFilename is the filename of the salt used in creation of the clusterID.
|
|
|
|
MeasurementSaltFilename = "measurementSalt"
|
|
|
|
// MeasurementSecretFilename is the filename of the secret used in creation of the clusterID.
|
|
|
|
MeasurementSecretFilename = "measurementSecret"
|
2022-08-29 10:41:09 -04:00
|
|
|
// IdKeyDigestFilename is the name of the file holding the currently enforced idkeydigest.
|
|
|
|
IdKeyDigestFilename = "idkeydigest"
|
|
|
|
// EnforceIdKeyDigestFilename is the name of the file configuring whether idkeydigest is enforced or not.
|
|
|
|
EnforceIdKeyDigestFilename = "enforceIdKeyDigest"
|
2022-07-19 03:25:44 -04:00
|
|
|
// K8sVersion is the filename of the mapped "k8s-version" configMap file.
|
2022-07-18 06:28:02 -04:00
|
|
|
K8sVersion = "k8s-version"
|
2022-05-02 07:21:07 -04:00
|
|
|
|
2022-05-04 02:50:50 -04:00
|
|
|
//
|
|
|
|
// CLI.
|
|
|
|
//
|
|
|
|
|
|
|
|
MinControllerCount = 1
|
|
|
|
MinWorkerCount = 1
|
2022-05-05 02:48:56 -04:00
|
|
|
|
|
|
|
//
|
|
|
|
// Kubernetes.
|
|
|
|
//
|
|
|
|
|
2022-05-04 08:32:34 -04:00
|
|
|
KubernetesJoinTokenTTL = 15 * time.Minute
|
2022-08-29 10:49:44 -04:00
|
|
|
ConstellationNamespace = "kube-system"
|
|
|
|
JoinConfigMap = "join-config"
|
2022-08-01 03:37:05 -04:00
|
|
|
|
2022-08-12 04:20:19 -04:00
|
|
|
//
|
|
|
|
// Helm.
|
|
|
|
//
|
|
|
|
|
|
|
|
HelmNamespace = "kube-system"
|
|
|
|
|
2022-08-01 03:37:05 -04:00
|
|
|
//
|
|
|
|
// Releases.
|
|
|
|
//
|
|
|
|
|
|
|
|
// S3PublicBucket contains measurements & releases.
|
|
|
|
S3PublicBucket = "https://public-edgeless-constellation.s3.us-east-2.amazonaws.com/"
|
|
|
|
// CosignPublicKey signs all our releases.
|
|
|
|
CosignPublicKey = `-----BEGIN PUBLIC KEY-----
|
|
|
|
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE1Iv15myTjpa1KznlGFe+dBEjN91q
|
|
|
|
oGhQf4z+3TgFjv+Z+6ATPA1OPANf0//6p+goKifNZD5+Cq/VEAP7xOhlYw==
|
|
|
|
-----END PUBLIC KEY-----`
|
2022-04-06 04:36:58 -04:00
|
|
|
)
|
|
|
|
|
2022-06-01 08:21:18 -04:00
|
|
|
// VersionInfo is the version of a binary. Left as a separate variable to allow override during build.
|
|
|
|
var VersionInfo = "0.0.0"
|