noobaa-core icon indicating copy to clipboard operation
noobaa-core copied to clipboard

standalone nsfs: process getting crashed when we hit anonymous tests

Open vh05 opened this issue 1 year ago • 0 comments

Process getting crashed when we trigger anonumous object operations. I think the error handling at object_sdk.js i.e

throw new RpcError(......); needs to be checked.

When we run

s3tests_boto3/functional/test_s3.py::test_bucket_list_objects_anonymous_fail s3tests_boto3/functional/test_s3.py::test_bucket_listv2_objects_anonymous_fail

Stack trace:


Oct-3 11:24:11.486 [nsfs/15] [ERROR] core.endpoint.s3.s3_rest:: S3 ERROR <?xml version="1.0" encoding="UTF-8"?><Error><Code>AccessDenied</Code><Message>Access Denied</Message><Resource>/ceph-xa7ico4c0ht6nc6ar2fcep6v-1?encoding-type=url</Resource><RequestId>lna8fa6z-1vbxv7-14sj</RequestId></Error> GET /ceph-xa7ico4c0ht6nc6ar2fcep6v-1?encoding-type=url {"host":"localhost","accept-encoding":"identity","user-agent":"Boto3/1.23.10 Python/3.6.8 Linux/6.2.8-100.fc36.x86_64 Botocore/1.26.10","amz-sdk-invocation-id":"cdb17cda-7926-4d60-a19e-5c367aa39098","amz-sdk-request":"attempt=1"} Error: Anonymous access to namespace buckets not supported
    at NsfsObjectSDK.authorize_request_account (/root/node_modules/noobaa-core/src/sdk/object_sdk.js:226:27)
    at async Promise.all (index 0)
    at async authorize_request (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:200:5)
    at async handle_request (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:113:5)
    at async Object.s3_rest [as handler] (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:64:9)
Oct-3 11:24:11.487 [nsfs/15] [ERROR] CONSOLE:: PANIC: process uncaughtException Error: Access Denied
    at authorize_anonymous_access (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:249:27)
    at authorize_request_policy (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:219:9)
    at async Promise.all (index 1)
    at async authorize_request (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:200:5)
    at async handle_request (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:113:5)
    at async Object.s3_rest [as handler] (/root/node_modules/noobaa-core/src/endpoint/s3/s3_rest.js:64:9)


vh05 avatar Oct 03 '23 11:10 vh05