[ 
https://issues.apache.org/jira/browse/HDDS-16487?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shuo Huang reassigned HDDS-16487:
---------------------------------

    Assignee: Shuo Huang

> Support PutBucketObjectLockConfiguration
> ----------------------------------------
>
>                 Key: HDDS-16487
>                 URL: https://issues.apache.org/jira/browse/HDDS-16487
>             Project: Apache Ozone
>          Issue Type: Sub-task
>            Reporter: Chung-En Lee
>            Assignee: Shuo Huang
>            Priority: Major
>
> Implement the S3 {{PutBucketObjectLockConfiguration}} operation to enable 
> Object Lock and configure default retention rules on Ozone buckets (OBS 
> layout only). This task spans S3 api and ozone java api.
>  
> {*}1. S3 Gateway ({{{}hadoop-ozone/s3gateway{}}}){*}:
>  * Add route handler for {{{}PUT /\{bucket}?object-lock{}}}.
>  * Parse incoming {{ObjectLockConfiguration}} XML payload:
>  ** Extract {{ObjectLockEnabled}} (must be {{{}Enabled{}}}).
>  ** Parse optional {{Rule}} / {{DefaultRetention}} ({{{}Mode{}}}: 
> {{GOVERNANCE}} or {{{}COMPLIANCE{}}}, {{Days}} or {{{}Years{}}}).
>  * Validate request payload and map errors to standard S3 error codes (e.g., 
> {{{}MalformedXML{}}}, {{{}InvalidArgument{}}}).
>  * Forward the request to OM via the client protocol.
> {*}2. Protobuf Protocol ({{{}OmClientProtocol.proto{}}}){*}:
>  * Add client RPC messages:
>  ** {{SetBucketObjectLockConfigRequest}} (contains volume name, bucket name, 
> and {{{}RetentionConfig{}}}).
>  ** {{{}SetBucketObjectLockConfigResponse{}}}.
>  * Register the new request type in {{Type}} enum and OM request dispatching 
> pipeline.
> {*}3. {{OMBucketSetObjectLockConfigRequest}}{*}:
>  * {*}{{preExecute}}{*}:
>  ** Authorize the caller against the Ranger action 
> {{{}PutBucketObjectLockConfiguration{}}}.
>  ** Perform fail-fast sanity checks on input parameters (e.g., duration $> 
> 0$, valid retention mode).
>  ** Verify the bucket exists and its bucket layout is {{OBJECT_STORE}} (OBS); 
> reject if it is FSO or Legacy.
>  * {*}{{validateAndUpdateCache}}{*}:
>  ** Acquire bucket write lock.
>  ** Enforce immutability: if {{objectLockEnabled}} is already {{{}true{}}}, 
> reject any attempt to disable it ({{{}false{}}}).
>  ** Update {{OmBucketInfo}} with {{objectLockEnabled = true}} and update 
> {{{}defaultRetention{}}}.
>  ** Commit the updated {{OmBucketInfo}} to {{BucketTable}} cache and RocksDB.
> h4.  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to