Object Lock is a framework that was developed by AWS that allows objects from being deleted or overwritten for a fixed amount of time or indefinitely. Object Lock uses a write-once-read-many (WORM) model to store objects. You can use Object Lock to help meet regulatory requirements that require WORM storage, or to add another layer of protection against object changes or deletion.
As of today, the object-lock framework within OSE is currently integrated with AWS, Cloudian HyperStore, and Dell ECS (supported from ECS version 3.6).
In this guide and example, we will illustrate the object-lock integration in relation to Cloudian Hyperstore.
PutObjectLockConfiguration
which allows OSE to translate the API call directly to the underlying object storage provider to create an object-lock bucket.days
or years
).HyperStore can implement WORM (Write Once Read Many) protection for stored objects by supporting the standard AWS S3 "Object Lock" functionality. To use the Object Lock feature you must have a HyperStore license that activates this feature. Two different types of HyperStore licensing are available for Object Lock functionality:
root
access.Certified Object Lock is appropriate for HyperStore customers who are subject to the data protection mandates of U.S. SEC-17a or a comparable regulatory regime.
Compatible Object Lock is appropriate for HyperStore customers who want to utilize the WORM functionality provided by the AWS S3 Object Lock APIs, but who are not subject to the data protection mandates of U.S. SEC-17a or a comparable regulatory regime.
The table below shows the key differences between Governance mode retention, Compliance mode retention, and Legal Hold in terms of how they protect locked objects against premature deletion through the S3 API. Recall that for all forms of Object Lock, the lock is applied to each individual version of an object. The scenarios are only applicable to Cloudian HyperStore.
Scenario | Governance Mode Retention | Compliance Mode Retention | Legal Hold |
Delete a locked object version? | The bucket owner and users who have been granted both s3:DeleteObjectVersion and s3:BypassGovernanceRetention permission can use the DeleteObject request with an x-amz-bypass-governance-retention: true request header to delete a locked object version. |
No user can delete a locked object version | No user can delete a locked object version |
Remove the lock on an object version? | The bucket owner and users who have been granted both s3:PutObjectRetention and s3:BypassGovernanceRetention permission can use the PutObjectRetention request with an x-amz-bypass-governance-retention: true request header to remove the retention lock on a object version. |
No user can remove the retention lock on an object version | The bucket owner and users who have been granted s3:PutObjectLegalHold permission can use the PutObjectLegalHold request to remove the legal hold on an object version. |
Reduce the retention period for an object version? | The bucket owner and users who have been granted both s3:PutObjectRetention and s3:BypassGovernanceRetention permission can use the PutObjectRetention request with an x-amz-bypass-governance-retention: true request header to reduce the retention period for a locked object version. |
No user can reduce the retention period for an object version | The bucket owner and users who have been granted s3:PutObjectLegalHold permission can use the PutObjectLegalHold request to remove the legal hold on an object version. |
1. Using the OSE UI, Select + NEW BUCKET
2. Ensure to Activate Versioning (Required) and toggle Object Lock
Governance Mode
or Compliance Mode
3. Inspect the properties of the newly created bucket ose-ui
5. Optional: You can add a Retention Policy (after the bucket has been created) to Governance Mode
or Compliance Mode
and set Retention Period
Object Storage Extension API supports VMware Cloud Director Bearer token authentication. In addition, S3 API supports AWS Signature V4 authentication.
{{FQDN}}
+ {{TENANT}}
+ {{REFRESH_TOKEN}}
1. In OSE 2.2.3
– API Explorer is accessible from the the OSE Extension menu.
2. Locate the Authorize
menu button:
3. In the API Explorer, you must add Bearer
before the refresh_token
4. For example: Bearer example123456example123456
(In OSE 3.0, we will automatically add the Bearer
variable)
PUT /api/v1/s3/{bucketName}
curl -X 'PUT' \
'https://vose.philbendeck.com/api/v1/s3/vmware-example' \
-H 'accept: */*' \
-H 'x-amz-bucket-object-lock-enabled: true' \
-H 'Authorization: Bearer 'TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"locationConstraint": "vcd"
}'
Response Headers
connection: keep-alive
content-length: 0
date: Tue,27 Feb 2024 09:20:12 GMT
location: https://vose.philbendeck.com/api/v1/s3/vmware-example
strict-transport-security: max-age=31536000 ; includeSubDomains
x-amz-request-id: ed8fccca-bcf2-451e-bf15-d8ef73e3dd85
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
GET /api/v1/s3/{bucketName}?object-lock
curl -X 'GET' \
'https://vose.philbendeck.com/api/v1/s3/vmware-example?object-lock=' \
-H 'accept: application/xml' \
-H 'Authorization: Bearer 'TOKEN'
Response Headers
<ObjectLockConfiguration>
<ObjectLockEnabled>Enabled</ObjectLockEnabled>
</ObjectLockConfiguration>
The OSE S3 API supports the AWS S3 Object Lock API and a tenant administrator
/user
can leverage creating object locked enabled buckets.
Essentially, the same supported API calls that you can invoke on the AWS S3 API can be executed on the Object Storage Extension's API leveraging Cloudian HyperStore.
s3api create-bucket --bucket {BUCKET} --object-lock-enabled-for-bucket --no-verify-ssl --endpoint-url=https://{FQDN}:{PORT}/api/v1/s3
# Create Object Lock Bucket
aws --profile=msp2admin s3api create-bucket --bucket objectlockbucket1 --object-lock-enabled-for-bucket --no-verify-ssl --endpoint-url=https://vose.philbendeck.com:443/api/v1/s3
{
"Location": "https://vose.philbendeck.com/api/v1/s3/objectlockbucket1"
}
aws --profile=msp2admin s3api get-object-lock-configuration --bucket objectlockbucket1 --no-verify-ssl --endpoint-url=https://vose.philbendeck.com:443/api/v1/s3
{
"ObjectLockConfiguration": {
"ObjectLockEnabled": "Enabled"
}
}
s3api put-object-lock-configuration --bucket {BUCKET} --object-lock-configuration='{ "ObjectLockEnabled": "Enabled", "Rule": { "DefaultRetention": { "Mode": "{MODE}", "Days": X }}}'
aws --profile=msp2admin --no-verify-ssl --endpoint-url=https://vose.philbendeck.com s3api put-object-lock-configuration --bucket objectlockbucket1 --object-lock-configuration='{ "ObjectLockEnabled": "Enabled", "Rule": { "DefaultRetention": { "Mode": "COMPLIANCE", "Days": 1 }}}'
aws --profile=msp2admin s3api get-object-lock-configuration --bucket objectlockbucket1 --no-verify-ssl --endpoint-url=https://vose.philbendeck.com:443/api/v1/s3
{
"ObjectLockConfiguration": {
"ObjectLockEnabled": "Enabled",
"Rule": {
"DefaultRetention": {
"Mode": "COMPLIANCE",
"Days": 1
}
}
}
}