[
https://issues.apache.org/jira/browse/HDDS-16492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Meng-Shuan Tsai reassigned HDDS-16492:
--------------------------------------
Assignee: Meng-Shuan Tsai
> Implement GetObjectLegalHold
> ----------------------------
>
> Key: HDDS-16492
> URL: https://issues.apache.org/jira/browse/HDDS-16492
> Project: Apache Ozone
> Issue Type: Sub-task
> Reporter: Chung-En Lee
> Assignee: Meng-Shuan Tsai
> Priority: Major
>
> Implement the S3 {{GetObjectLegalHold}} operation to query the legal hold
> status ({{{}ON{}}} or {{{}OFF{}}}) of an individual key. This task covers S3
> Gateway REST routing, OM client protocol translation, Ranger authorization,
> and metadata lookup in {{{}KeyTable{}}}.
> {*}1. S3 Gateway ({{{}hadoop-ozone/s3gateway{}}}){*}:
> * Route {{{}GET /\{bucket}/\{key}?legal-hold{}}}.
> * Forward the request to Ozone Manager via client protocol.
> * Serialize the returned status into standard S3 {{LegalHold}} XML:
> XML
> * Map OM exceptions to standard S3 error responses:
> ** Return {{404 NoSuchKey}} if the target key does not exist.
> ** Return {{404 NoSuchObjectLockConfiguration}} ({{{}The specified object
> does not have a ObjectLock configuration{}}}) if the key exists but has no
> legal hold status configured.
> {*}2. Protobuf Protocol ({{{}OmClientProtocol.proto{}}}) & OM Client{*}:
> * Add RPC messages:
> ** {{GetObjectLegalHoldRequest}} (contains {{{}volumeName{}}},
> {{{}bucketName{}}}, {{{}keyName{}}}).
> ** {{GetObjectLegalHoldResponse}} (contains {{{}bool legalHold{}}}).
> * Register the new request type in {{OmClientProtocol}} and wire through
> {{{}OzoneManagerProtocolClientSideTranslatorPB{}}}.
> {*}3. OM Read Path / Metadata Handler ({{{}hadoop-ozone/ozone-manager{}}}){*}:
> * Authorize the incoming request against Ranger action
> {{GetObjectLegalHold}} (requiring key-level {{READ}} permission).
> * Acquire bucket/key read lock and retrieve {{OmKeyInfo}} from
> {{{}KeyTable{}}}.
> * If key is absent, throw {{{}KEY_NOT_FOUND{}}}.
> * Inspect {{{}OmKeyInfo.getLegalHold(){}}}:
> ** If legal hold was never explicitly configured on the object, throw
> {{OBJECT_LOCK_CONFIG_NOT_FOUND}} (mapped to S3 {{{}404
> NoSuchObjectLockConfiguration{}}}).
> ** If configured, return the status ({{{}true{}}} $\rightarrow$ {{{}ON{}}},
> {{false}} $\rightarrow$ {{{}OFF{}}}).
> 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]