Bablu Raul created HDDS-17876:
---------------------------------

             Summary: ListDirectoryBuckets Accepts Continuation Token Generated 
by ListBuckets
                 Key: HDDS-17876
                 URL: https://issues.apache.org/jira/browse/HDDS-17876
             Project: Apache Ozone
          Issue Type: Bug
          Components: S3
            Reporter: Bablu Raul


During S3 API validation, I observed that the {{ListDirectoryBuckets}} API 
accepts a continuation token generated by the {{ListBuckets}} API.

Both APIs support pagination and generate continuation tokens to retrieve 
subsequent pages. However, when a token generated by {{ListBuckets}} is passed 
to {{{}ListDirectoryBuckets{}}}, Ozone accepts the token and successfully 
returns directory bucket entries instead of rejecting it.

This behavior needs to be verified against the expected S3 API contract to 
determine whether continuation tokens should be specific to their respective 
listing APIs.

Steps to Reproduce

*Step 1: Generate a continuation token using ListBuckets*
 
 {{LB_TOKEN=$(aws --endpoint-url "$ENDPOINT_URL" --no-verify-ssl s3api 
list-buckets \  --max-buckets 5 \  --query ContinuationToken \  --output 
text)echo "$LB_TOKEN"}}
*Step 2: Pass the ListBuckets continuation token to ListDirectoryBuckets*
 
 {{aws --endpoint-url "$ENDPOINT_URL" --no-verify-ssl s3api 
list-directory-buckets \  --continuation-token "$LB_TOKEN" \  
--max-directory-buckets 5 \  --output json}}
*Step 3: Verify the response*

Observe whether the API accepts the token and returns directory bucket entries 
along with another continuation token.

*Step 4: Continue pagination*

Use the newly generated continuation token in another {{ListDirectoryBuckets}} 
request.
h2. Actual Result
 * {{ListDirectoryBuckets}} accepts the continuation token generated by 
{{{}ListBuckets{}}}.

 * The request completes successfully and returns 5 directory bucket entries.

 * The response contains another continuation token.

 * The subsequent request using the newly generated token also succeeds and 
returns the next 5 directory bucket entries.

h2. Expected Result

If continuation tokens are required to be API-specific, 
{{ListDirectoryBuckets}} should reject a token generated by {{ListBuckets}} 
rather than interpreting it as a valid continuation token.
h2. Impact

Accepting continuation tokens generated by a different listing API may result 
in unexpected pagination behavior if the APIs are expected to maintain 
independent continuation-token handling.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to