File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -794,12 +794,14 @@ func (d *driver) CreateStorage(cr *imageregistryv1.Config) error {
794
794
encryptionType = s3 .ServerSideEncryptionAes256
795
795
}
796
796
797
+ enableBucketKey := true
797
798
_ , err = svc .PutBucketEncryptionWithContext (d .Context , & s3.PutBucketEncryptionInput {
798
799
Bucket : aws .String (d .Config .Bucket ),
799
800
ServerSideEncryptionConfiguration : & s3.ServerSideEncryptionConfiguration {
800
801
Rules : []* s3.ServerSideEncryptionRule {
801
802
{
802
803
ApplyServerSideEncryptionByDefault : encryption ,
804
+ BucketKeyEnabled : & enableBucketKey ,
803
805
},
804
806
},
805
807
},
Original file line number Diff line number Diff line change @@ -226,7 +226,7 @@ func TestAWSDefaults(t *testing.T) {
226
226
ApplyServerSideEncryptionByDefault : & s3.ServerSideEncryptionByDefault {
227
227
SSEAlgorithm : aws .String (s3 .ServerSideEncryptionAes256 ),
228
228
},
229
- BucketKeyEnabled : aws .Bool (false ),
229
+ BucketKeyEnabled : aws .Bool (true ),
230
230
},
231
231
},
232
232
}
@@ -550,7 +550,7 @@ func TestAWSChangeS3Encryption(t *testing.T) {
550
550
ApplyServerSideEncryptionByDefault : & s3.ServerSideEncryptionByDefault {
551
551
SSEAlgorithm : aws .String (s3 .ServerSideEncryptionAes256 ),
552
552
},
553
- BucketKeyEnabled : aws .Bool (false ),
553
+ BucketKeyEnabled : aws .Bool (true ),
554
554
},
555
555
},
556
556
}
@@ -599,7 +599,7 @@ func TestAWSChangeS3Encryption(t *testing.T) {
599
599
SSEAlgorithm : aws .String (s3 .ServerSideEncryptionAwsKms ),
600
600
KMSMasterKeyID : aws .String ("testKey" ),
601
601
},
602
- BucketKeyEnabled : aws .Bool (false ),
602
+ BucketKeyEnabled : aws .Bool (true ),
603
603
},
604
604
},
605
605
}
You can’t perform that action at this time.
0 commit comments