Bug #10188
Can not create new rgw user when specifying an email already assigned to a user
0%
Description
The error can be seen in the output of the commands below. In the first command we create a user "jj1" with an email address specified. The second command is executed specifying a new uid "jj2", with the same email address. The results of the second command return the user information from the first command. It would be expected that one of two things happens:
1) A new user is created; or
2) An error is thrown due to the email already being in use.
This was verified using: ceph version 0.80.7 (6c0127fcb58008793d3c8b62d925bc91963672a3)
root@aurora:~# radosgw-admin user create --display-name="JJ" --uid=jj1 --email=none@none.com
{ "user_id": "jj1",
"display_name": "JJ",
"email": "none@none.com",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{ "user": "jj1",
"access_key": "K5O29CDAYDIQS8J385KS",
"secret_key": "2t5fen9QfJZznRHKRK13dTu8+QxRPZ5gK+po68yw"}],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": { "enabled": false,
"max_size_kb": -1,
"max_objects": -1},
"user_quota": { "enabled": false,
"max_size_kb": -1,
"max_objects": -1},
"temp_url_keys": []}
root@aurora:~# radosgw-admin user create --display-name="JJ" --uid=jj2 --email=none@none.com
2014-11-25 10:50:26.414995 7f85fb2d8780 0 max_buckets=1000 specified=0
{ "user_id": "jj1",
"display_name": "JJ",
"email": "none@none.com",
"suspended": 0,
"max_buckets": 1000,
"auid": 0,
"subusers": [],
"keys": [
{ "user": "jj1",
"access_key": "K5O29CDAYDIQS8J385KS",
"secret_key": "2t5fen9QfJZznRHKRK13dTu8+QxRPZ5gK+po68yw"}],
"swift_keys": [],
"caps": [],
"op_mask": "read, write, delete",
"default_placement": "",
"placement_tags": [],
"bucket_quota": { "enabled": false,
"max_size_kb": -1,
"max_objects": -1},
"user_quota": { "enabled": false,
"max_size_kb": -1,
"max_objects": -1},
"temp_url_keys": []}
History
#1 Updated by Yehuda Sadeh almost 9 years ago
That's by design. Users cannot share the same email, as S3 permissions can be granted by email address, so email needs to be unique.
#2 Updated by song jipeng almost 9 years ago
Yehuda Sadeh wrote:
That's by design. Users cannot share the same email, as S3 permissions can be granted by email address, so email needs to be unique.
But when creating a new user , we can not finger out what cause the error from the error code . Are there any API to check the email already used ?
#3 Updated by Yehuda Sadeh almost 9 years ago
- Status changed from New to Won't Fix