mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-04-22 16:19:19 -04:00
image upload: use unique blob name for AWS images uploaded to S3
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
db645ee4ad
@ -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…
x
Reference in New Issue
Block a user