mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
image upload: use unique blob name for AWS images uploaded to S3 (#2830)
When uploading images to AWS, they need to be uploaded to S3 first. Since blob names are not unique between attestation variants, there was a possibility for one S3 upload to be used for the wrong AMI.
This commit is contained in:
parent
6259815869
commit
b8933560be
@ -173,7 +173,7 @@ func imageVersion(csp cloudprovider.Provider, version versionsapi.Version, times
|
||||
func extendAWSConfig(awsConfig map[string]any, version versionsapi.Version, attestationVariant string, timestamp time.Time) {
|
||||
awsConfig["amiName"] = awsAMIName(version, attestationVariant, timestamp)
|
||||
awsConfig["snapshotName"] = awsAMIName(version, attestationVariant, timestamp)
|
||||
awsConfig["blobName"] = fmt.Sprintf("image-%s-%s-%d.raw", version.Stream(), version.Version(), timestamp.Unix())
|
||||
awsConfig["blobName"] = fmt.Sprintf("image-%s-%s-%s-%d.raw", version.Stream(), version.Version(), attestationVariant, timestamp.Unix())
|
||||
}
|
||||
|
||||
func awsAMIName(version versionsapi.Version, attestationVariant string, timestamp time.Time) string {
|
||||
|
Loading…
Reference in New Issue
Block a user