mirror of
https://github.com/minio/minio.git
synced 2025-11-20 18:06:10 -05:00
s3: Fix precondition failed in CopyObjectPart when src is encrypted (#7276)
CopyObject precondition checks into GetObjectReader in order to perform SSE-C pre-condition checks using the last 32 bytes of encrypted ETag rather than the decrypted ETag This also necessitates moving precondition checks for gateways to gateway layer rather than object handler check
This commit is contained in:
@@ -26,10 +26,14 @@ import (
|
||||
"github.com/minio/minio/pkg/policy"
|
||||
)
|
||||
|
||||
// CheckCopyPreconditionFn returns true if copy precondition check failed.
|
||||
type CheckCopyPreconditionFn func(o ObjectInfo, encETag string) bool
|
||||
|
||||
// ObjectOptions represents object options for ObjectLayer operations
|
||||
type ObjectOptions struct {
|
||||
ServerSideEncryption encrypt.ServerSide
|
||||
UserDefined map[string]string
|
||||
CheckCopyPrecondFn CheckCopyPreconditionFn
|
||||
}
|
||||
|
||||
// LockType represents required locking for ObjectLayer operations
|
||||
|
||||
Reference in New Issue
Block a user