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
}
@@ -552,7 +552,7 @@ func TestAWSChangeS3Encryption(t *testing.T) {
552
552
ApplyServerSideEncryptionByDefault : & s3.ServerSideEncryptionByDefault {
553
553
SSEAlgorithm : aws .String (s3 .ServerSideEncryptionAes256 ),
554
554
},
555
- BucketKeyEnabled : aws .Bool (false ),
555
+ BucketKeyEnabled : aws .Bool (true ),
556
556
},
557
557
},
558
558
}
@@ -602,7 +602,7 @@ func TestAWSChangeS3Encryption(t *testing.T) {
602
602
SSEAlgorithm : aws .String (s3 .ServerSideEncryptionAwsKms ),
603
603
KMSMasterKeyID : aws .String ("testKey" ),
604
604
},
605
- BucketKeyEnabled : aws .Bool (false ),
605
+ BucketKeyEnabled : aws .Bool (true ),
606
606
},
607
607
},
608
608
}
You can’t perform that action at this time.
0 commit comments