Project

General

Profile

Bug #20468

rgw: admin API should return NoSuchUser for actions on non-existed user

Added by Chao Zhao over 1 year ago. Updated over 1 year ago.

Status:
Need Test
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/30/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

According to http://docs.ceph.com/docs/master/radosgw/adminops/#standard-error-responses, there shoud be "NoSuchUser" error response.

But in fact, when operating actions to non-existed user, "NoSuchKey" will be returned:

GET:

GET /admin/user?uid=a3cf5f78-728d-4eee-bd22-d6b9def5517e HTTP/1.1
HOST: 127.0.0.1:8000
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.18.1
date: Fri, 30 Jun 2017 04:54:36 GMT
Authorization: AWS 8XHJDGE7265UBJP43DIT:H7j0PiSPYppioCUg3O1q1yCc94o=

None

HTTP/1.1 404
Content-Length: 114
x-amz-request-id: tx000000000000000000002-005955d98c-104e-default
Accept-Ranges: bytes
Content-Type: application/json
Date: Fri, 30 Jun 2017 04:54:36 GMT
Connection: Keep-Alive

{"Code":"NoSuchKey","RequestId":"tx000000000000000000002-005955d98c-104e-default","HostId":"104e-default-default"}

POST:

POST /admin/user?uid=a3cf5f78-728d-4eee-bd22-d6b9def5517e HTTP/1.1
HOST: 127.0.0.1:8000
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.18.1
Content-Length: 0
date: Fri, 30 Jun 2017 04:54:36 GMT
Authorization: AWS 8XHJDGE7265UBJP43DIT:CWeoj7gOS3vYAefq++SxMUOwhwE=

None

HTTP/1.1 404
Content-Length: 114
x-amz-request-id: tx000000000000000000003-005955d98c-104e-default
Accept-Ranges: bytes
Content-Type: application/json
Date: Fri, 30 Jun 2017 04:54:36 GMT
Connection: Keep-Alive

{"Code":"NoSuchKey","RequestId":"tx000000000000000000003-005955d98c-104e-default","HostId":"104e-default-default"}

DELETE:

DELETE /admin/user?uid=a3cf5f78-728d-4eee-bd22-d6b9def5517e HTTP/1.1
HOST: 127.0.0.1:8000
Connection: keep-alive
Accept-Encoding: gzip, deflate
Accept: */*
User-Agent: python-requests/2.18.1
Content-Length: 0
date: Fri, 30 Jun 2017 04:54:36 GMT
Authorization: AWS 8XHJDGE7265UBJP43DIT:FWgCmrcZi//EWaLM1qqLV7juKXM=

None

HTTP/1.1 404
Content-Length: 114
x-amz-request-id: tx000000000000000000004-005955d98c-104e-default
Accept-Ranges: bytes
Content-Type: application/json
Date: Fri, 30 Jun 2017 04:54:36 GMT
Connection: Keep-Alive

{"Code":"NoSuchKey","RequestId":"tx000000000000000000004-005955d98c-104e-default","HostId":"104e-default-default"}

History

#2 Updated by Jos Collin over 1 year ago

  • Status changed from New to In Progress

#3 Updated by Orit Wasserman over 1 year ago

  • Status changed from In Progress to Need Test

Also available in: Atom PDF