Docs

Object Lock (WORM)

Object Lock protects object versions from deletion and overwriting for a set period (write once, read many). chili enforces the lock on the server. Even someone holding valid access keys, such as an attacker after a breach, cannot delete locked data before the period ends.

Object Lock is a per-bucket add-on. See pricing for terms.

Object Lock on chili works in governance mode. It is available to every account without any activation.

Tool

Effect

Can it be lifted?

Typical use

Governance mode

Object version locked until the retain-until date

only with the s3:BypassGovernanceRetention permission

Protect backups against ransomware and accidental deletion

Legal hold

Object version locked with no end date

yes, by removing the legal hold

Litigation, e-discovery

You can extend a period at any time. Governance mode is as strong as the way you manage your access keys: give backup software and applications keys without the s3:BypassGovernanceRetention permission.

Compliance mode

Some backup products, such as Veeam, Rubrik or QNAP HBS 3, set the lock in compliance mode themselves. Nobody can lift such a lock before it expires, not even chili. chili support enables compliance mode once for your account. Get in touch before you set up such an integration.

Requirements

  • Object Lock is enabled when the bucket is created. Plan for it from the start; you cannot switch an existing bucket without Object Lock later.
  • Versioning is required and is turned on together with Object Lock. It cannot be turned off afterwards.
  • You create the bucket in the chili Console and enable Object Lock there.

Two ways to lock data

Default retention on the bucket. You set the mode and duration once, and chili locks every newly written object version automatically. This is the simplest option for tools that know nothing about Object Lock, such as rclone or scripts.

Retention per object version. The application sets the mode and retain-until date for each object version itself (PutObjectRetention). This is how backup software such as Veeam works. Do not set a default retention on the bucket in that case, otherwise Veeam cannot register the bucket.

Setup

Create the bucket in the chili Console with Object Lock enabled and choose the retention period:

  • Fixed period: default retention in days. Every new object stays locked that long.
  • Chosen by the application: no default retention. The application sets the period per object, as Veeam does.

You can also change the default retention later through the S3 API, here to 30 days in governance mode. The access keys need permission to set the Object Lock configuration:

aws s3api put-object-lock-configuration \
  --bucket my-worm-bucket \
  --object-lock-configuration '{"ObjectLockEnabled":"Enabled","Rule":{"DefaultRetention":{"Mode":"GOVERNANCE","Days":30}}}' \
  --endpoint-url https://s3-ch-east.chilistorage.com

Specify either Days or Years, not both.

Check the configuration:

aws s3api get-object-lock-configuration \
  --bucket my-worm-bucket \
  --endpoint-url https://s3-ch-east.chilistorage.com

On chili, always pass the version ID for individual objects. You get it from the upload response or from list-object-versions.

# Find the version ID
aws s3api list-object-versions --bucket my-worm-bucket --prefix report.pdf \
  --endpoint-url https://s3-ch-east.chilistorage.com

# Set or extend the retention period
aws s3api put-object-retention --bucket my-worm-bucket --key report.pdf \
  --version-id <VERSION_ID> \
  --retention '{"Mode":"GOVERNANCE","RetainUntilDate":"2027-12-31T00:00:00Z"}' \
  --endpoint-url https://s3-ch-east.chilistorage.com

# Set a legal hold (OFF removes it again)
aws s3api put-object-legal-hold --bucket my-worm-bucket --key report.pdf \
  --version-id <VERSION_ID> --legal-hold Status=ON \
  --endpoint-url https://s3-ch-east.chilistorage.com

Read the status with get-object-retention and get-object-legal-hold, also with --version-id.

What happens on delete?

  • Delete without a version ID: chili adds a delete marker. The object no longer shows up in normal listings, but the locked version is kept and can be restored.
  • Delete a locked version: chili rejects the request with AccessDenied.
  • Bypassing a governance lock: with the s3:BypassGovernanceRetention permission and the header x-amz-bypass-governance-retention: true, a governance-mode version can be deleted. There is no such option for a legal hold.

Common pitfalls

  • Bucket created without Object Lock: create a new bucket with Object Lock in the chili Console and copy the data over.
  • Backup software requires compliance mode: ask chili support to enable it once for your account.
  • Default retention with Veeam: Veeam expects a bucket without default retention and sets the lock itself.
  • Lifecycle rules on locked data: lifecycle rules do not delete locked versions. Plan capacity for the full retention period.
  • Missing version ID: retention and legal hold are set per object version. Pass --version-id.

Next