[
https://issues.apache.org/jira/browse/HDDS-16488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Shuo Huang reassigned HDDS-16488:
---------------------------------
Assignee: Shuo Huang
> Support GetBucketObjectLockConfiguration
> ----------------------------------------
>
> Key: HDDS-16488
> URL: https://issues.apache.org/jira/browse/HDDS-16488
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Chung-En Lee
> Assignee: Shuo Huang
> Priority: Major
>
> Implement the S3 {{GetBucketObjectLockConfiguration}} operation to allow
> users to retrieve the Object Lock status and default retention settings of a
> bucket. This task covers S3 Gateway REST routing, OM authorization, and
> {{BucketTable}} read resolution.
> {*}1. S3 Gateway ({{{}hadoop-ozone/s3gateway{}}}){*}:
> * Add route handler for {{{}GET /\{bucket}?object-lock{}}}.
> * Forward the request to Ozone Manager via client protocol.
> * Serialize the returned configuration into the standard S3
> {{ObjectLockConfiguration}} XML response:
> ** {{<ObjectLockEnabled>Enabled</ObjectLockEnabled>}}
> ** Optional
> {{<Rule><DefaultRetention><Mode>...</Mode><Days>...</Days></DefaultRetention></Rule>}}
> * Map OM exceptions to standard S3 error responses:
> ** Return {{404 NoSuchBucket}} if the target bucket does not exist.
> ** Return {{404 ObjectLockConfigurationNotFoundError}} ({{{}The specified
> object does not have a ObjectLock configuration{}}}) if the bucket exists but
> {{objectLockEnabled}} is {{{}false{}}}.
> {*}2. Protobuf Protocol ({{{}OmClientProtocol.proto{}}}) & OM Client{*}:
> * Add RPC messages:
> ** {{GetBucketObjectLockConfigRequest}} (contains {{{}volumeName{}}},
> {{{}bucketName{}}}).
> ** {{GetBucketObjectLockConfigResponse}} (contains {{objectLockEnabled}} and
> optional {{{}defaultRetention{}}}).
> * Register request in {{OmClientProtocol}} and wire through
> {{{}OzoneManagerProtocolClientSideTranslatorPB{}}}.
> {*}3. OM Read Path / Metadata Handler ({{{}hadoop-ozone/ozone-manager{}}}){*}:
> * Authorize the incoming request against Ranger action
> {{GetBucketObjectLockConfiguration}} (requiring bucket {{READ}} permission).
> * Acquire bucket read lock and lookup target bucket in {{{}BucketTable{}}}.
> * If bucket does not exist, throw {{{}BUCKET_NOT_FOUND{}}}.
> * Check if object lock is enable.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]