Object Lock
Object Lock allows you to protect objects from being deleted or overwritten for a specified period or indefinitely. Object Lock operates in three modes:
- Governance Mode: Protects objects against accidental deletion but allows authorized users to bypass the lock.
- Compliance Mode: Provides immutable protection; no user can delete or modify the object until the retention period expires.
- Legal Hold: Prevents an object from being deleted until the legal hold is explicitly removed, regardless of retention settings.
Governance Mode Override Permissions
By default, the account owner and any user with default project access have Governance Mode override permissions due to Storj's macaroon-based access system, which restricts capabilities rather than explicitly granting permissions.
To avoid unintentionally granting Governance Mode override permissions, use S3 credentials that explicitly restrict this capability for any operations involving Object Lock.
Note: Storj does not currently support role-based access controls (RBAC) for default restrictions by roles. This functionality may be added in the future.
Enabling Object Lock on a Bucket
For New Buckets
For Existing Buckets
Step 1: Enable Versioning
Step 2: Enable Object Lock
Adding, Updating, and Deleting a Default Object Lock Configuration
Default Object Lock configurations apply retention settings to all new objects uploaded to the bucket.
Add/Update Default Configuration
Delete Default Configuration
Object Operations
Please see the docs for Locking an Object.
Important Notes
- Object Version Required: Locking an existing object requires the version id to be specified.
- Retention Rules: The retention period can only be extended, not reduced or removed.
- Mutual Exclusivity with TTL: Objects with active TTL Settings cannot be locked, and locked objects cannot have TTL applied.
- S3 Compatibility: For full S3 compatibility information please see Object Lock