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

@ -483,11 +483,11 @@ func TestConfig_UpdateMeasurements(t *testing.T) {
{ // AWS
conf := Default()
conf.RemoveProviderAndAttestationExcept(cloudprovider.AWS)
for k := range conf.Attestation.AWSSEVSNP.Measurements {
delete(conf.Attestation.AWSSEVSNP.Measurements, k)
for k := range conf.Attestation.AWSNitroTPM.Measurements {
delete(conf.Attestation.AWSNitroTPM.Measurements, k)
}
conf.UpdateMeasurements(newMeasurements)
assert.Equal(newMeasurements, conf.Attestation.AWSSEVSNP.Measurements)
assert.Equal(newMeasurements, conf.Attestation.AWSNitroTPM.Measurements)
}
{ // Azure
conf := Default()