You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support object lock on the gcloud-sdk backend #1205
Depends on #1204. GCS Object Retention Lock covers most of S3 object lock.
Mapping
S3
GCS (google-cloud-storage 2.74.0)
CreateBucket with x-amz-bucket-object-lock-enabled
BucketTargetOption.enableObjectRetention(true), plus turning on versioning, which GCS doesn't do automatically
GOVERNANCE / COMPLIANCE
Retention.Mode.UNLOCKED / LOCKED
RetainUntilDate
retainUntilTime
x-amz-bypass-governance-retention
BlobTargetOption.overrideUnlockedRetention(true)
Legal hold ON/OFF
temporaryHold
versionId
generation (already mapped)
Gaps
Enabling lock on an existing bucket can only be done in the Cloud console. PutObjectLockConfiguration with Enabled and no rule succeeds as a no-op if retention is already on. Otherwise it's refused with an error that points to the console.
Bypass delete takes two non-atomic calls, because GCS deletes have no override flag: clear the retention with the override, then delete.
Default retention rule: GCS has no equivalent. Answer 501 for now.
Multipart and copy: lock headers would be stored in the .s3proxy/stubs/ stub's metadata, as the content headers and ACL are today, then applied to the target at Complete. A single-part complete is a copy and can name the retention on the target. A multi-part complete is a compose, and the SDK's compose forwards only the generation, metageneration and userProject options; that's why the ACL is already set in a second request. A retention on the target BlobInfo may still go through, but it's unverified, so a follow-up patch of the composed object may be needed. CopyObject needs the same check.
Already holds: the backend refuses to suspend versioning, so a lock bucket can't drop out of versioning through the proxy.
Activity