]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librgw: cleanups in process_request
authorMatt Benjamin <mbenjamin@redhat.com>
Tue, 6 Oct 2015 20:36:06 +0000 (16:36 -0400)
committerMatt Benjamin <mbenjamin@redhat.com>
Fri, 12 Feb 2016 17:04:46 +0000 (12:04 -0500)
* remove disabled S3 authorize step (user authorized on mount)
* re-enable op->verify_permission()

Skipping the latter makes RGW unhappy (1s stalls on each request),
but no objects are listing yet.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
src/rgw/librgw.cc

index fdac4e37b90d660169182159832afc1c21972687..c4501ff4a59a301beba67cb78988b065fdfe6612 100644 (file)
@@ -226,20 +226,7 @@ int RGWLibProcess::process_request(RGWLibRequest* req, RGWLibIO* io)
     goto done;
   }
 
-#warning authorize step disabled
-#if 0
-  // just checks the HTTP header, and that the user can access the gateway
-  // may be able to skip this after MOUNT (revalidate the user info)
-  req->log(s, "authorizing");
-  ret = RGW_Auth_S3::authorize(store, s); // validates s->user
-  if (ret < 0) {
-    dout(10) << "failed to authorize request" << dendl;
-    abort_req(s, op, ret);
-    goto done;
-  }
-#endif
-
-  req->log(s, "reading permissions");
+  req->log(s, "reading op permissions");
   ret = req->read_permissions(op);
   if (ret < 0) {
     abort_req(s, op, ret);
@@ -260,8 +247,7 @@ int RGWLibProcess::process_request(RGWLibRequest* req, RGWLibIO* io)
     goto done;
   }
 
-#warning authorize step disabled (no cached perms)
-#if 0
+  /* XXXX 1s stall if this is skipped? */
   req->log(s, "verifying op permissions");
   ret = op->verify_permission();
   if (ret < 0) {
@@ -272,7 +258,6 @@ int RGWLibProcess::process_request(RGWLibRequest* req, RGWLibIO* io)
       goto done;
     }
   }
-#endif
 
   req->log(s, "verifying op params");
   ret = op->verify_params();