mirror of
https://github.com/pgsty/minio.git
synced 2026-11-11 10:05:34 +03:00
Fix Object Lock replica reconciliation boundaries
Reconcile CopyObject lock and tag revisions with the addressed destination, including missing versions and self-referential copies. Preserve active COMPLIANCE across pool orderings, lifecycle decisions and set-level writes. Require retention authorization for source retention revisions, advance local lock and tag revisions monotonically, and fail force-delete before option parsing when bucket lock configuration cannot be read. Preserve authorized same-content replication and existing encryption and tier cleanup behavior. Signed-off-by: Feng Ruohang <rh@vonng.com> (cherry picked from commit a08c3d149dcccad74dd68ab374c02f56379181be)
This commit is contained in:
+3
-2
@@ -795,11 +795,12 @@ func isPutActionAllowedWithRequestTags(ctx context.Context, atype authType, buck
|
||||
|
||||
func isPutActionAllowedWithCred(bucketName, objectName string, r *http.Request, action policy.Action, requestTags *string, cred auth.Credentials, owner bool) APIErrorCode {
|
||||
// Do not check for PutObjectRetentionAction permission,
|
||||
// if mode and retain until date are not set.
|
||||
// if neither retention values nor a replica retention revision are set.
|
||||
// Can happen when bucket has default lock config set
|
||||
if action == policy.PutObjectRetentionAction &&
|
||||
r.Header.Get(xhttp.AmzObjectLockMode) == "" &&
|
||||
r.Header.Get(xhttp.AmzObjectLockRetainUntilDate) == "" {
|
||||
r.Header.Get(xhttp.AmzObjectLockRetainUntilDate) == "" &&
|
||||
r.Header.Get(xhttp.MinIOSourceObjectRetentionTimestamp) == "" {
|
||||
return ErrNone
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user