Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rgw: RGWUser::init no longer overwrites user_id #18137

Merged
merged 1 commit into from Oct 11, 2017

Conversation

Projects
None yet
4 participants
@cbodley
Copy link
Contributor

commented Oct 5, 2017

if an admin op specifies a user_id and does not find a user with that
id, but does find a user based on a later field (email, access key,
etc), RGWUser::user_id will be overwritten with the existing user's id

when this happens on 'radosgw-admin user create', RGWUser::execute_add()
will modify that existing user, instead of trying to create a new user
with the given user_id (and failing due to the conflicting email,
access key, etc)

by preserving the original user_id (when specified), this uid conflict
is detected in RGWUser::check_op() and a "user id mismatch" error is
returned

Fixes: http://tracker.ceph.com/issues/21685

rgw: RGWUser::init no longer overwrites user_id
if an admin op specifies a user_id and does not find a user with that
id, but does find a user based on a later field (email, access key,
etc), RGWUser::user_id will be overwritten with the existing user's id

when this happens on 'radosgw-admin user create', RGWUser::execute_add()
will modify that existing user, instead of trying to create a new user
with the given user_id (and failing due to the conflicting email,
access key, etc)

by preserving the original user_id (when specified), this uid conflict
is detected in RGWUser::check_op() and a "user id mismatch" error is
returned

Fixes: http://tracker.ceph.com/issues/21685

Signed-off-by: Casey Bodley <cbodley@redhat.com>

@cbodley cbodley requested a review from oritwas Oct 5, 2017

@cbodley cbodley added the needs-qa label Oct 5, 2017

@cbodley

This comment has been minimized.

Copy link
Contributor Author

commented Oct 5, 2017

hard to tell whether this will break other radosgw-admin user commands, but the radosgw-admin teuthology task should catch any issues

@oritwas

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2017

jenkins test this please

@yuriw

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2017

@mattbenjamin

This comment has been minimized.

Copy link
Contributor

commented Oct 11, 2017

@yuriw merging now, I had a standalone RGW suite run started before I saw your yuri-testing label :)

@mattbenjamin mattbenjamin merged commit e6c3ba5 into ceph:master Oct 11, 2017

5 checks passed

Docs: build check OK - docs built
Details
Signed-off-by all commits in this PR are signed
Details
Unmodified Submodules submodules for project are unmodified
Details
make check make check succeeded
Details
make check (arm64) make check succeeded
Details

@cbodley cbodley deleted the cbodley:wip-21685 branch Oct 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.