Rename coordinator to bootstrapper and rename roles

This commit is contained in:
katexochen 2022-06-29 15:26:29 +02:00 committed by Paul Meyer
parent 3280ed200c
commit 916e5d6b55
191 changed files with 1763 additions and 2030 deletions

View file

@ -8,14 +8,14 @@ This utility program makes it simple to update the expected PCR values of the CL
To read the PCR state of any running Constellation node, run the following:
```shell
go run main.go -constell-ip <NODE_IP> -constell-port <COORDINATOR_PORT>
go run main.go -constell-ip <NODE_IP> -constell-port <VERIFY_SERVICE_PORT>
```
The output is similar to the following:
```shell
$ go run main.go -constell-ip 192.0.2.3 -constell-port 30081
connecting to Coordinator at 192.0.2.3:30081
connecting to verification service at 192.0.2.3:30081
PCRs:
{
"0": "DzXCFGCNk8em5ornNZtKi+Wg6Z7qkQfs5CfE3qTkOc8=",
@ -67,7 +67,7 @@ We use the TPM and its PCRs to verify all nodes of a Constellation run with the
PCR[0] measures the firmware volume (FV). Changes to FV also change PCR[0], making it unreliable for attestation.
PCR[6] measures the VM ID. This is unusable for cluster attestation for two reasons:
1. The Coordinator does not know the VM ID of nodes wanting to join the cluster, so it can not compute the expected PCR[6] for the joining VM
1. The verification service does not know the VM ID of nodes wanting to join the cluster, so it can not compute the expected PCR[6] for the joining VM
2. A user may attest any node of the cluster without knowing the VM ID
PCR[10] is used by Linux Integrity Measurement Architecture (IMA).

View file

@ -14,7 +14,7 @@ import (
"strconv"
"time"
"github.com/edgelesssys/constellation/coordinator/util"
"github.com/edgelesssys/constellation/bootstrapper/util"
"github.com/edgelesssys/constellation/internal/attestation/vtpm"
"github.com/edgelesssys/constellation/internal/constants"
"github.com/edgelesssys/constellation/verify/verifyproto"
@ -25,18 +25,18 @@ import (
)
var (
coordIP = flag.String("constell-ip", "", "Public IP of the Constellation")
coordinatorPort = flag.String("constell-port", strconv.Itoa(constants.VerifyServiceNodePortGRPC), "NodePort of the Constellation's verification service")
export = flag.String("o", "", "Write PCRs, formatted as Go code, to file")
format = flag.String("format", "json", "Output format: json, yaml (default json)")
quiet = flag.Bool("q", false, "Set to disable output")
timeout = flag.Duration("timeout", 2*time.Minute, "Wait this duration for the verification service to become available")
coordIP = flag.String("constell-ip", "", "Public IP of the Constellation")
port = flag.String("constell-port", strconv.Itoa(constants.VerifyServiceNodePortGRPC), "NodePort of the Constellation's verification service")
export = flag.String("o", "", "Write PCRs, formatted as Go code, to file")
format = flag.String("format", "json", "Output format: json, yaml (default json)")
quiet = flag.Bool("q", false, "Set to disable output")
timeout = flag.Duration("timeout", 2*time.Minute, "Wait this duration for the verification service to become available")
)
func main() {
flag.Parse()
addr := net.JoinHostPort(*coordIP, *coordinatorPort)
addr := net.JoinHostPort(*coordIP, *port)
ctx, cancel := context.WithTimeout(context.Background(), *timeout)
defer cancel()

View file

@ -41,17 +41,17 @@ func transformState(tfOut terraformOutput) state.ConstellationState {
Name: "qemu",
UID: "debug",
CloudProvider: "qemu",
QEMUNodes: cloudtypes.Instances{},
QEMUCoordinators: cloudtypes.Instances{},
QEMUWorkers: cloudtypes.Instances{},
QEMUControlPlane: cloudtypes.Instances{},
}
for i, ip := range tfOut.ControlPlaneIPs.Value {
conState.QEMUCoordinators[fmt.Sprintf("control-plane-%d", i)] = cloudtypes.Instance{
conState.QEMUControlPlane[fmt.Sprintf("control-plane-%d", i)] = cloudtypes.Instance{
PublicIP: ip,
PrivateIP: ip,
}
}
for i, ip := range tfOut.WorkerIPs.Value {
conState.QEMUNodes[fmt.Sprintf("worker-%d", i)] = cloudtypes.Instance{
conState.QEMUWorkers[fmt.Sprintf("worker-%d", i)] = cloudtypes.Instance{
PublicIP: ip,
PrivateIP: ip,
}