Project

General

Profile

Actions

Bug #13635

closed

radosgw duplicate email address

Added by Derek Yarnell over 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

From the latest documentation0 I would expect to get a EmailExists for the following two Admin API queries (username different, email address the same) but instead I get BucketAlreadyExists.

This looks to be because of line 1759 in src/rgw/rgw_user.cc and because EEXIST is set to BucketAlreadyExists in src/rgw/rgw_http_errors.h. EmailExists does not seem to be defined anywhere but the documentation RST file (doc/radosgw/adminops.rst).

[0] - http://docs.ceph.com/docs/v0.80.5/radosgw/adminops/#id11

INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): ceph.umiacs.umd.edu
DEBUG:requests.packages.urllib3.connectionpool:"PUT /admin/user?format=json&uid=foo1209&display-name=Unit%20Test%20foo1209&email=foo1209@test1.com&key-type=s3&secret-key=6rNeomONA68ajOWbEQqzgNd017CXXGSAxtYWq1Zq&generate-key=True&suspended=False HTTP/1.1" 200 277
INFO:requests.packages.urllib3.connectionpool:Starting new HTTPS connection (1): ceph.umiacs.umd.edu
DEBUG:requests.packages.urllib3.connectionpool:"PUT /admin/user?format=json&uid=foo3142&display-name=Unit%20Test%20foo3142&email=foo1209@test1.com&key-type=s3&secret-key=6mrBN4C2sPEZgPh7SFFqjHgXgMlxe94M9YUy6Eb2&generate-key=True&suspended=False HTTP/1.1" 409 30
ERROR:rgwadmin.rgw:{u'Code': u'BucketAlreadyExists'}
2015-10-28 17:43:18.437759 7f444bfef700  1 civetweb: 0x7f446402c010: 127.0.0.1 - - [28/Oct/2015:17:43:18 -0400] "PUT /admin/user HTTP/1.1" -1 0 - python-requests/2.3.0 CPython/2.7.10 Darwin/14.5.0
2015-10-28 17:43:18.506593 7f444afed700 20 RGWEnv::set(): HTTP_HOST: localhost:7480
2015-10-28 17:43:18.506616 7f444afed700 20 RGWEnv::set(): HTTP_ACCEPT_ENCODING: gzip, deflate
2015-10-28 17:43:18.506618 7f444afed700 20 RGWEnv::set(): HTTP_ACCEPT: */*
2015-10-28 17:43:18.506620 7f444afed700 20 RGWEnv::set(): HTTP_USER_AGENT: python-requests/2.3.0 CPython/2.7.10 Darwin/14.5.0
2015-10-28 17:43:18.506623 7f444afed700 20 RGWEnv::set(): HTTP_DATE: Wed, 28 Oct 2015 21:43:22 GMT
2015-10-28 17:43:18.506628 7f444afed700 20 RGWEnv::set(): HTTP_AUTHORIZATION: AWS RTJ1TL13CH613JRU2PJD:jtzReGNuuwZAg8EySoPp4uJWCqw=
2015-10-28 17:43:18.506633 7f444afed700 20 RGWEnv::set(): HTTP_X_FORWARDED_FOR: 192.168.86.254
2015-10-28 17:43:18.506635 7f444afed700 20 RGWEnv::set(): HTTP_X_FORWARDED_HOST: ceph.umiacs.umd.edu
2015-10-28 17:43:18.506640 7f444afed700 20 RGWEnv::set(): HTTP_X_FORWARDED_SERVER: ceph.umiacs.umd.edu
2015-10-28 17:43:18.506642 7f444afed700 20 RGWEnv::set(): HTTP_CONNECTION: Keep-Alive
2015-10-28 17:43:18.506644 7f444afed700 20 RGWEnv::set(): CONTENT_LENGTH: 0
2015-10-28 17:43:18.506645 7f444afed700 20 RGWEnv::set(): REQUEST_METHOD: PUT
2015-10-28 17:43:18.506646 7f444afed700 20 RGWEnv::set(): REQUEST_URI: /admin/user
2015-10-28 17:43:18.506648 7f444afed700 20 RGWEnv::set(): QUERY_STRING: format=json&uid=foo3142&display-name=Unit%20Test%20foo3142&email=foo1209@test1.com&key-type=s3&secret-key=6mrBN4C2sPEZgPh7SFFqjHgXgMlxe94M9YUy6Eb2&generate-key=True&suspended=False
2015-10-28 17:43:18.506650 7f444afed700 20 RGWEnv::set(): REMOTE_USER:
2015-10-28 17:43:18.506652 7f444afed700 20 RGWEnv::set(): SCRIPT_URI: /admin/user
2015-10-28 17:43:18.506659 7f444afed700 20 RGWEnv::set(): SERVER_PORT: 7480
2015-10-28 17:43:18.506660 7f444afed700 20 CONTENT_LENGTH=0
2015-10-28 17:43:18.506661 7f444afed700 20 HTTP_ACCEPT=*/*
2015-10-28 17:43:18.506662 7f444afed700 20 HTTP_ACCEPT_ENCODING=gzip, deflate
2015-10-28 17:43:18.506663 7f444afed700 20 HTTP_AUTHORIZATION=AWS RTJ1TL13CH613JRU2PJD:jtzReGNuuwZAg8EySoPp4uJWCqw=
2015-10-28 17:43:18.506663 7f444afed700 20 HTTP_CONNECTION=Keep-Alive
2015-10-28 17:43:18.506664 7f444afed700 20 HTTP_DATE=Wed, 28 Oct 2015 21:43:22 GMT
2015-10-28 17:43:18.506664 7f444afed700 20 HTTP_HOST=localhost:7480
2015-10-28 17:43:18.506665 7f444afed700 20 HTTP_USER_AGENT=python-requests/2.3.0 CPython/2.7.10 Darwin/14.5.0
2015-10-28 17:43:18.506666 7f444afed700 20 HTTP_X_FORWARDED_FOR=192.168.86.254
2015-10-28 17:43:18.506666 7f444afed700 20 HTTP_X_FORWARDED_HOST=ceph.umiacs.umd.edu
2015-10-28 17:43:18.506667 7f444afed700 20 HTTP_X_FORWARDED_SERVER=ceph.umiacs.umd.edu
2015-10-28 17:43:18.506667 7f444afed700 20 QUERY_STRING=format=json&uid=foo3142&display-name=Unit%20Test%20foo3142&email=foo1209@test1.com&key-type=s3&secret-key=6mrBN4C2sPEZgPh7SFFqjHgXgMlxe94M9YUy6Eb2&generate-key=True&suspended=False
2015-10-28 17:43:18.506668 7f444afed700 20 REMOTE_USER=
2015-10-28 17:43:18.506669 7f444afed700 20 REQUEST_METHOD=PUT
2015-10-28 17:43:18.506670 7f444afed700 20 REQUEST_URI=/admin/user
2015-10-28 17:43:18.506670 7f444afed700 20 SCRIPT_URI=/admin/user
2015-10-28 17:43:18.506671 7f444afed700 20 SERVER_PORT=7480
2015-10-28 17:43:18.506673 7f444afed700 20 RGWEnv::set(): HTTP_HOST: localhost:7480
2015-10-28 17:43:18.506674 7f444afed700 20 RGWEnv::set(): HTTP_ACCEPT_ENCODING: gzip, deflate
2015-10-28 17:43:18.506675 7f444afed700 20 RGWEnv::set(): HTTP_ACCEPT: */*
2015-10-28 17:43:18.506676 7f444afed700 20 RGWEnv::set(): HTTP_USER_AGENT: python-requests/2.3.0 CPython/2.7.10 Darwin/14.5.0
2015-10-28 17:43:18.506677 7f444afed700 20 RGWEnv::set(): HTTP_DATE: Wed, 28 Oct 2015 21:43:22 GMT
2015-10-28 17:43:18.506679 7f444afed700 20 RGWEnv::set(): HTTP_AUTHORIZATION: AWS RTJ1TL13CH613JRU2PJD:jtzReGNuuwZAg8EySoPp4uJWCqw=
2015-10-28 17:43:18.506680 7f444afed700 20 RGWEnv::set(): HTTP_X_FORWARDED_FOR: 192.168.86.254
2015-10-28 17:43:18.506681 7f444afed700 20 RGWEnv::set(): HTTP_X_FORWARDED_HOST: ceph.umiacs.umd.edu
2015-10-28 17:43:18.506682 7f444afed700 20 RGWEnv::set(): HTTP_X_FORWARDED_SERVER: ceph.umiacs.umd.edu
2015-10-28 17:43:18.506683 7f444afed700 20 RGWEnv::set(): HTTP_CONNECTION: Keep-Alive
2015-10-28 17:43:18.506684 7f444afed700 20 RGWEnv::set(): CONTENT_LENGTH: 0
2015-10-28 17:43:18.506685 7f444afed700 20 RGWEnv::set(): REQUEST_METHOD: PUT
2015-10-28 17:43:18.506686 7f444afed700 20 RGWEnv::set(): REQUEST_URI: /admin/user
2015-10-28 17:43:18.506687 7f444afed700 20 RGWEnv::set(): QUERY_STRING: format=json&uid=foo3142&display-name=Unit%20Test%20foo3142&email=foo1209@test1.com&key-type=s3&secret-key=6mrBN4C2sPEZgPh7SFFqjHgXgMlxe94M9YUy6Eb2&generate-key=True&suspended=False
2015-10-28 17:43:18.506688 7f444afed700 20 RGWEnv::set(): REMOTE_USER:
2015-10-28 17:43:18.506689 7f444afed700 20 RGWEnv::set(): SCRIPT_URI: /admin/user
2015-10-28 17:43:18.506690 7f444afed700 20 RGWEnv::set(): SERVER_PORT: 7480
2015-10-28 17:43:18.506691 7f444afed700 20 CONTENT_LENGTH=0
2015-10-28 17:43:18.506691 7f444afed700 20 HTTP_ACCEPT=*/*
2015-10-28 17:43:18.506692 7f444afed700 20 HTTP_ACCEPT_ENCODING=gzip, deflate
2015-10-28 17:43:18.506692 7f444afed700 20 HTTP_AUTHORIZATION=AWS RTJ1TL13CH613JRU2PJD:jtzReGNuuwZAg8EySoPp4uJWCqw=
2015-10-28 17:43:18.506693 7f444afed700 20 HTTP_CONNECTION=Keep-Alive
2015-10-28 17:43:18.506693 7f444afed700 20 HTTP_DATE=Wed, 28 Oct 2015 21:43:22 GMT
2015-10-28 17:43:18.506694 7f444afed700 20 HTTP_HOST=localhost:7480
2015-10-28 17:43:18.506695 7f444afed700 20 HTTP_USER_AGENT=python-requests/2.3.0 CPython/2.7.10 Darwin/14.5.0
2015-10-28 17:43:18.506695 7f444afed700 20 HTTP_X_FORWARDED_FOR=192.168.86.254
2015-10-28 17:43:18.506696 7f444afed700 20 HTTP_X_FORWARDED_HOST=ceph.umiacs.umd.edu
2015-10-28 17:43:18.506697 7f444afed700 20 HTTP_X_FORWARDED_SERVER=ceph.umiacs.umd.edu
2015-10-28 17:43:18.506697 7f444afed700 20 QUERY_STRING=format=json&uid=foo3142&display-name=Unit%20Test%20foo3142&email=foo1209@test1.com&key-type=s3&secret-key=6mrBN4C2sPEZgPh7SFFqjHgXgMlxe94M9YUy6Eb2&generate-key=True&suspended=False
2015-10-28 17:43:18.506698 7f444afed700 20 REMOTE_USER=
2015-10-28 17:43:18.506699 7f444afed700 20 REQUEST_METHOD=PUT
2015-10-28 17:43:18.506699 7f444afed700 20 REQUEST_URI=/admin/user
2015-10-28 17:43:18.506700 7f444afed700 20 SCRIPT_URI=/admin/user
2015-10-28 17:43:18.506700 7f444afed700 20 SERVER_PORT=7480
2015-10-28 17:43:18.506702 7f444afed700  1 ====== starting new request req=0x7f44700455e0 =====
2015-10-28 17:43:18.506709 7f444afed700  2 req 0:0.000008::PUT /admin/user::initializing
2015-10-28 17:43:18.506711 7f444afed700 10 host=localhost:7480 rgw_dns_name=ceph.umiacs.umd.edu
2015-10-28 17:43:18.506753 7f444afed700  2 req 0:0.000051::PUT /admin/user::getting op
2015-10-28 17:43:18.506756 7f444afed700  2 req 0:0.000055::PUT /admin/user:create_user:authorizing
2015-10-28 17:43:18.506777 7f444afed700 10 get_canon_resource(): dest=/admin/user
2015-10-28 17:43:18.506778 7f444afed700 10 auth_hdr:
PUT

Wed, 28 Oct 2015 21:43:22 GMT
/admin/user
2015-10-28 17:43:18.506832 7f444afed700 15 calculated digest=jtzReGNuuwZAg8EySoPp4uJWCqw=
2015-10-28 17:43:18.506834 7f444afed700 15 auth_sign=jtzReGNuuwZAg8EySoPp4uJWCqw=
2015-10-28 17:43:18.506834 7f444afed700 15 compare=0
2015-10-28 17:43:18.506836 7f444afed700  2 req 0:0.000135::PUT /admin/user:create_user:reading permissions
2015-10-28 17:43:18.506839 7f444afed700  2 req 0:0.000138::PUT /admin/user:create_user:init op
2015-10-28 17:43:18.506840 7f444afed700  2 req 0:0.000139::PUT /admin/user:create_user:verifying op mask
2015-10-28 17:43:18.506841 7f444afed700 20 required_mask= 0 user.op_mask=7
2015-10-28 17:43:18.506842 7f444afed700  2 req 0:0.000141::PUT /admin/user:create_user:verifying op permissions
2015-10-28 17:43:18.506844 7f444afed700  2 req 0:0.000143::PUT /admin/user:create_user:verifying op params
2015-10-28 17:43:18.506845 7f444afed700  2 req 0:0.000144::PUT /admin/user:create_user:executing
2015-10-28 17:43:18.506872 7f444afed700 20 get_obj_state: rctx=0x7f447007bc50 obj=.users.uid:foo3142 state=0x7f44700739c8 s->prefetch_data=0
2015-10-28 17:43:18.506878 7f444afed700 10 cache get: name=.users.uid+foo3142 : type miss (requested=22, cached=0)
2015-10-28 17:43:18.508037 7f444afed700 10 cache put: name=.users.uid+foo3142
2015-10-28 17:43:18.508043 7f444afed700 10 moving .users.uid+foo3142 to cache LRU end
2015-10-28 17:43:18.508057 7f444afed700 20 get_obj_state: rctx=0x7f447007bc50 obj=.users.email:foo1209@test1.com state=0x7f4470073818 s->prefetch_data=0
2015-10-28 17:43:18.508062 7f444afed700 10 cache get: name=.users.email+foo1209@test1.com : type miss (requested=6, cached=3)
2015-10-28 17:43:18.508830 7f444afed700 10 cache put: name=.users.email+foo1209@test1.com
2015-10-28 17:43:18.508835 7f444afed700 10 moving .users.email+foo1209@test1.com to cache LRU end
2015-10-28 17:43:18.508839 7f444afed700 20 get_obj_state: s->obj_tag was set empty
2015-10-28 17:43:18.508843 7f444afed700 10 cache get: name=.users.email+foo1209@test1.com : hit
2015-10-28 17:43:18.508855 7f444afed700 20 get_obj_state: rctx=0x7f4470068250 obj=.users.uid:foo1209 state=0x7f4470073818 s->prefetch_data=0
2015-10-28 17:43:18.508859 7f444afed700 10 cache get: name=.users.uid+foo1209 : type miss (requested=22, cached=19)
2015-10-28 17:43:18.509604 7f444afed700 10 cache put: name=.users.uid+foo1209
2015-10-28 17:43:18.509609 7f444afed700 10 moving .users.uid+foo1209 to cache LRU end
2015-10-28 17:43:18.509612 7f444afed700 20 get_obj_state: s->obj_tag was set empty
2015-10-28 17:43:18.509616 7f444afed700 10 cache get: name=.users.uid+foo1209 : hit
2015-10-28 17:43:18.509628 7f444afed700 10 chain_cache_entry: cache_locator=.users.uid+foo1209
2015-10-28 17:43:18.509697 7f444afed700  2 req 0:0.002996::PUT /admin/user:create_user:http status=409
2015-10-28 17:43:18.509701 7f444afed700  1 ====== req done req=0x7f44700455e0 http_status=409 ======
2015-10-28 17:43:18.509706 7f444afed700 20 process_request() returned -17
Actions #1

Updated by Loïc Dachary over 8 years ago

  • Project changed from Ceph to rgw
Actions #2

Updated by Yehuda Sadeh over 8 years ago

  • Priority changed from Normal to High
Actions #3

Updated by Yehuda Sadeh over 8 years ago

  • Assignee set to Matt Benjamin
Actions #4

Updated by Matt Benjamin over 8 years ago

  • Status changed from New to Fix Under Review

This issue was addressed by Ceph upstream commit c227316 by Dunrong Huang ("rgw: add a new error code for email conflict".

I have verified that the rgwadmin.rgw create_user operation described here now results in an EmailExists exception.

I think this issue should be marked resolved.

Actions #5

Updated by Matt Benjamin over 8 years ago

Matt Benjamin wrote:

This issue was addressed by Ceph upstream commit c227316 by Dunrong Huang ("rgw: add a new error code for email conflict".

I have verified that the rgwadmin.rgw create_user operation described here now results in an EmailExists exception.

I think this issue should be marked resolved.

(this commit has an internal date of 12/23/2015)

Actions #6

Updated by Yehuda Sadeh about 8 years ago

  • Status changed from Fix Under Review to Resolved
Actions #7

Updated by Horace Ng over 7 years ago

I would like to know the reasoning behind email address being unique. I understand that uid need to be unique, however, we should allow a typical user to have multiple accounts with the same email address.

Actions

Also available in: Atom PDF