mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-29 01:16:12 -05:00
69de06dd1f
* cli: allow vpc traffic between nodes on OpenStack * image: enable vTPM on OpenStack * cli: add create tests for OpenStack
70 lines
2.6 KiB
Go
70 lines
2.6 KiB
Go
//go:build !enterprise
|
|
|
|
/*
|
|
Copyright (c) Edgeless Systems GmbH
|
|
|
|
SPDX-License-Identifier: AGPL-3.0-only
|
|
*/
|
|
|
|
package measurements
|
|
|
|
import "github.com/edgelesssys/constellation/v2/internal/cloud/cloudprovider"
|
|
|
|
// DefaultsFor provides the default measurements for given cloud provider.
|
|
func DefaultsFor(provider cloudprovider.Provider) M {
|
|
switch provider {
|
|
case cloudprovider.AWS:
|
|
return M{
|
|
4: PlaceHolderMeasurement(),
|
|
8: WithAllBytes(0x00, Enforce),
|
|
9: PlaceHolderMeasurement(),
|
|
11: WithAllBytes(0x00, Enforce),
|
|
12: PlaceHolderMeasurement(),
|
|
13: WithAllBytes(0x00, Enforce),
|
|
uint32(PCRIndexClusterID): WithAllBytes(0x00, Enforce),
|
|
}
|
|
case cloudprovider.Azure:
|
|
return M{
|
|
4: PlaceHolderMeasurement(),
|
|
8: WithAllBytes(0x00, Enforce),
|
|
9: PlaceHolderMeasurement(),
|
|
11: WithAllBytes(0x00, Enforce),
|
|
12: PlaceHolderMeasurement(),
|
|
13: WithAllBytes(0x00, Enforce),
|
|
uint32(PCRIndexClusterID): WithAllBytes(0x00, Enforce),
|
|
}
|
|
case cloudprovider.GCP:
|
|
return M{
|
|
4: PlaceHolderMeasurement(),
|
|
8: WithAllBytes(0x00, Enforce),
|
|
9: PlaceHolderMeasurement(),
|
|
11: WithAllBytes(0x00, Enforce),
|
|
12: PlaceHolderMeasurement(),
|
|
13: WithAllBytes(0x00, Enforce),
|
|
uint32(PCRIndexClusterID): WithAllBytes(0x00, Enforce),
|
|
}
|
|
case cloudprovider.QEMU:
|
|
return M{
|
|
4: PlaceHolderMeasurement(),
|
|
8: WithAllBytes(0x00, Enforce),
|
|
9: PlaceHolderMeasurement(),
|
|
11: WithAllBytes(0x00, Enforce),
|
|
12: PlaceHolderMeasurement(),
|
|
13: WithAllBytes(0x00, Enforce),
|
|
uint32(PCRIndexClusterID): WithAllBytes(0x00, Enforce),
|
|
}
|
|
case cloudprovider.OpenStack:
|
|
return M{
|
|
4: PlaceHolderMeasurement(),
|
|
8: WithAllBytes(0x00, Enforce),
|
|
9: PlaceHolderMeasurement(),
|
|
11: WithAllBytes(0x00, Enforce),
|
|
12: PlaceHolderMeasurement(),
|
|
13: WithAllBytes(0x00, Enforce),
|
|
uint32(PCRIndexClusterID): WithAllBytes(0x00, Enforce),
|
|
}
|
|
default:
|
|
return nil
|
|
}
|
|
}
|