attestation: add SNP-based attestation for aws-sev-snp (#1916)

* config: move AMD root key to global constant
* attestation: add SNP based attestation for aws
* Always enable SNP, regardless of attestation type.
* Make AWSNitroTPM default again

There exists a bug in AWS SNP implementation where sometimes
a host might not be able to produce valid SNP reports.
Since we have to wait for AWS to fix this we are merging SNP
attestation as opt-in feature.
This commit is contained in:
Otto Bittner 2023-06-21 14:19:55 +02:00 committed by GitHub
parent 94b21e11ad
commit c7d12055d1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 646 additions and 239 deletions

View file

@ -143,7 +143,9 @@ func (c *Creator) createAWS(ctx context.Context, cl terraformClient, opts Create
IAMProfileControlPlane: opts.Config.Provider.AWS.IAMProfileControlPlane,
IAMProfileWorkerNodes: opts.Config.Provider.AWS.IAMProfileWorkerNodes,
Debug: opts.Config.IsDebugCluster(),
EnableSNP: opts.Config.GetAttestationConfig().GetVariant().Equal(variant.AWSSEVSNP{}),
// We always want to use SNP machines. If the users decides to use NitroTPM attestation,
// they will at least have runtime encryption.
EnableSNP: true,
}
if err := cl.PrepareWorkspace(path.Join("terraform", strings.ToLower(cloudprovider.AWS.String())), &vars); err != nil {