]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
rgw: fix up the use of tenant before it's available 7120/head
authorPete Zaitcev <zaitcev@kotori.zaitcev.us>
Wed, 6 Jan 2016 07:02:11 +0000 (00:02 -0700)
committerPete Zaitcev <zaitcev@kotori.zaitcev.us>
Fri, 22 Jan 2016 01:27:20 +0000 (18:27 -0700)
commit82f28a8fe3d1a8e1133d9b1d2db436a318f82f90
treea952183f6067e4e40b1595f51b7b3b66ac515598
parent67e3d95135c09b1338459d8228c1022f48cc17f8
rgw: fix up the use of tenant before it's available

A big problem that cropped up with the multi-tenancy as it
went in was that it used tenant to initialize bucket names
before tenant was actually available by parsing a token.
Thus, although multi-tenancy worked, accessing anything across
tenants was actually impossible. This patch fixes that oversight.
Unfortunately, a new method postauth_init() was needed for it.

We also fix small bugs:

 - validate_tenant_name() used a proper-looking C++ but was
   incorrect. We simply use C for now, which may be not as
   pretty but is correct.

 - We now make a distinction between empty tenant syntax that
   means "the logged-in tenant" ("bucket") and the syntax
   that means "the legacy compatibility tenant with no name
   (":bucket").

 - We make rgw_make_bucket_entry_name() more robust against
   empty inputs. It's not used for work, but produces odd-looking
   debugging logs.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
13 files changed:
src/rgw/rgw_bucket.cc
src/rgw/rgw_bucket.h
src/rgw/rgw_common.h
src/rgw/rgw_http_errors.h
src/rgw/rgw_main.cc
src/rgw/rgw_op.h
src/rgw/rgw_rest.cc
src/rgw/rgw_rest.h
src/rgw/rgw_rest_s3.cc
src/rgw/rgw_rest_s3.h
src/rgw/rgw_rest_swift.cc
src/rgw/rgw_rest_swift.h
src/rgw/rgw_swift_auth.h