]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: add skip_decrypt to RGWRESTConn::get_obj()
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Jul 2017 20:24:13 +0000 (16:24 -0400)
committerNathan Cutler <ncutler@suse.com>
Mon, 4 Sep 2017 08:54:43 +0000 (10:54 +0200)
this adds a rgwx-skip-decrypt header to requests from
RGWRados::fetch_remote_obj()

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 2a7a5be4b41641cb17fb9127b84ce717ca55d3fe)

src/rgw/rgw_rados.cc
src/rgw/rgw_rest_conn.cc
src/rgw/rgw_rest_conn.h

index c225046561ca922a22693f2122dc035d6e694126..dd1f5f5244f5f935df04e6449ac36cf97184df1c 100644 (file)
@@ -7583,10 +7583,11 @@ int RGWRados::stat_remote_obj(RGWObjectCtx& obj_ctx,
   constexpr bool get_op = true;
   constexpr bool rgwx_stat = true;
   constexpr bool sync_manifest = true;
+  constexpr bool skip_decrypt = true;
   int ret = conn->get_obj(user_id, info, src_obj, pmod, unmod_ptr,
                       dest_mtime_weight.zone_short_id, dest_mtime_weight.pg_ver,
                       prepend_meta, get_op, rgwx_stat,
-                      sync_manifest, &cb, &in_stream_req);
+                      sync_manifest, skip_decrypt, &cb, &in_stream_req);
   if (ret < 0) {
     return ret;
   }
@@ -7758,10 +7759,11 @@ int RGWRados::fetch_remote_obj(RGWObjectCtx& obj_ctx,
   static constexpr bool get_op = true;
   static constexpr bool rgwx_stat = false;
   static constexpr bool sync_manifest = true;
+  static constexpr bool skip_decrypt = true;
   ret = conn->get_obj(user_id, info, src_obj, pmod, unmod_ptr,
                       dest_mtime_weight.zone_short_id, dest_mtime_weight.pg_ver,
                       prepend_meta, get_op, rgwx_stat,
-                      sync_manifest, &cb, &in_stream_req);
+                      sync_manifest, skip_decrypt, &cb, &in_stream_req);
   if (ret < 0) {
     goto set_err_state;
   }
index aa3e0c8881f355857d4097ee4ca08c0ae53f211c..d94a5643f340b875b28159f6184d2bed60054beb 100644 (file)
@@ -156,7 +156,7 @@ int RGWRESTConn::get_obj(const rgw_user& uid, req_info *info /* optional */, rgw
                          const real_time *mod_ptr, const real_time *unmod_ptr,
                          uint32_t mod_zone_id, uint64_t mod_pg_ver,
                          bool prepend_metadata, bool get_op, bool rgwx_stat,
-                         bool sync_manifest, RGWGetDataCB *cb,
+                         bool sync_manifest, bool skip_decrypt, RGWGetDataCB *cb,
                          RGWRESTStreamRWRequest **req)
 {
   string url;
@@ -175,6 +175,9 @@ int RGWRESTConn::get_obj(const rgw_user& uid, req_info *info /* optional */, rgw
   if (sync_manifest) {
     params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "sync-manifest", ""));
   }
+  if (skip_decrypt) {
+    params.push_back(param_pair_t(RGW_SYS_PARAM_PREFIX "skip-decrypt", ""));
+  }
   if (!obj.key.instance.empty()) {
     const string& instance = obj.key.instance;
     params.push_back(param_pair_t("versionId", instance));
index f4a1005b6a3d676c3f5451ff7b85de23924de827..e9941856f577132603a3fa08009fbec6ac31d505 100644 (file)
@@ -94,7 +94,7 @@ public:
               const ceph::real_time *mod_ptr, const ceph::real_time *unmod_ptr,
               uint32_t mod_zone_id, uint64_t mod_pg_ver,
               bool prepend_metadata, bool get_op, bool rgwx_stat, bool sync_manifest,
-              RGWGetDataCB *cb, RGWRESTStreamRWRequest **req);
+              bool skip_decrypt, RGWGetDataCB *cb, RGWRESTStreamRWRequest **req);
   int complete_request(RGWRESTStreamRWRequest *req, string& etag, ceph::real_time *mtime, uint64_t *psize, map<string, string>& attrs);
 
   int get_resource(const string& resource,