Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / src / rgw / rgw_swift_auth.cc
1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
3
4 #include <array>
5
6 #include <boost/utility/string_view.hpp>
7 #include <boost/container/static_vector.hpp>
8 #include <boost/algorithm/string/predicate.hpp>
9 #include <boost/algorithm/string.hpp>
10
11 #include "rgw_swift_auth.h"
12 #include "rgw_rest.h"
13
14 #include "common/ceph_crypto.h"
15 #include "common/Clock.h"
16
17 #include "auth/Crypto.h"
18
19 #include "rgw_client_io.h"
20 #include "rgw_http_client.h"
21 #include "include/str_list.h"
22
23 #define dout_context g_ceph_context
24 #define dout_subsys ceph_subsys_rgw
25
26 #define DEFAULT_SWIFT_PREFIX "/swift"
27
28 using namespace ceph::crypto;
29
30
31 namespace rgw {
32 namespace auth {
33 namespace swift {
34
35 /* TempURL: applier */
36 void TempURLApplier::modify_request_state(req_state* s) const       /* in/out */
37 {
38   bool inline_exists = false;
39   const std::string& filename = s->info.args.get("filename");
40
41   s->info.args.get("inline", &inline_exists);
42   if (inline_exists) {
43     s->content_disp.override = "inline";
44   } else if (!filename.empty()) {
45     std::string fenc;
46     url_encode(filename, fenc);
47     s->content_disp.override = "attachment; filename=\"" + fenc + "\"";
48   } else {
49     std::string fenc;
50     url_encode(s->object.name, fenc);
51     s->content_disp.fallback = "attachment; filename=\"" + fenc + "\"";
52   }
53
54   ldout(s->cct, 20) << "finished applying changes to req_state for TempURL: "
55                     << " content_disp override " << s->content_disp.override
56                     << " content_disp fallback " << s->content_disp.fallback
57                     << dendl;
58
59 }
60
61 /* TempURL: engine */
62 bool TempURLEngine::is_applicable(const req_state* const s) const noexcept
63 {
64   return s->info.args.exists("temp_url_sig") ||
65          s->info.args.exists("temp_url_expires");
66 }
67
68 void TempURLEngine::get_owner_info(const req_state* const s,
69                                    RGWUserInfo& owner_info) const
70 {
71   /* We cannot use req_state::bucket_name because it isn't available
72    * now. It will be initialized in RGWHandler_REST_SWIFT::postauth_init(). */
73   const string& bucket_name = s->init_state.url_bucket;
74
75   /* TempURL requires that bucket and object names are specified. */
76   if (bucket_name.empty() || s->object.empty()) {
77     throw -EPERM;
78   }
79
80   /* TempURL case is completely different than the Keystone auth - you may
81    * get account name only through extraction from URL. In turn, knowledge
82    * about account is neccessary to obtain its bucket tenant. Without that,
83    * the access would be limited to accounts with empty tenant. */
84   string bucket_tenant;
85   if (!s->account_name.empty()) {
86     RGWUserInfo uinfo;
87     bool found = false;
88
89     const rgw_user uid(s->account_name);
90     if (uid.tenant.empty()) {
91       const rgw_user tenanted_uid(uid.id, uid.id);
92
93       if (rgw_get_user_info_by_uid(store, tenanted_uid, uinfo) >= 0) {
94         /* Succeeded. */
95         bucket_tenant = uinfo.user_id.tenant;
96         found = true;
97       }
98     }
99
100     if (!found && rgw_get_user_info_by_uid(store, uid, uinfo) < 0) {
101       throw -EPERM;
102     } else {
103       bucket_tenant = uinfo.user_id.tenant;
104     }
105   }
106
107   /* Need to get user info of bucket owner. */
108   RGWBucketInfo bucket_info;
109   int ret = store->get_bucket_info(*static_cast<RGWObjectCtx *>(s->obj_ctx),
110                                    bucket_tenant, bucket_name,
111                                    bucket_info, nullptr);
112   if (ret < 0) {
113     throw ret;
114   }
115
116   ldout(cct, 20) << "temp url user (bucket owner): " << bucket_info.owner
117                  << dendl;
118
119   if (rgw_get_user_info_by_uid(store, bucket_info.owner, owner_info) < 0) {
120     throw -EPERM;
121   }
122 }
123
124 bool TempURLEngine::is_expired(const std::string& expires) const
125 {
126   string err;
127   const utime_t now = ceph_clock_now();
128   const uint64_t expiration = (uint64_t)strict_strtoll(expires.c_str(),
129                                                        10, &err);
130   if (!err.empty()) {
131     dout(5) << "failed to parse temp_url_expires: " << err << dendl;
132     return true;
133   }
134
135   if (expiration <= (uint64_t)now.sec()) {
136     dout(5) << "temp url expired: " << expiration << " <= " << now.sec() << dendl;
137     return true;
138   }
139
140   return false;
141 }
142
143 std::string extract_swift_subuser(const std::string& swift_user_name) {
144   size_t pos = swift_user_name.find(':');
145   if (std::string::npos == pos) {
146     return swift_user_name;
147   } else {
148     return swift_user_name.substr(pos + 1);
149   }
150 }
151
152 class TempURLEngine::SignatureHelper
153 {
154 private:
155   static constexpr uint32_t output_size =
156     CEPH_CRYPTO_HMACSHA1_DIGESTSIZE * 2 + 1;
157
158   unsigned char dest[CEPH_CRYPTO_HMACSHA1_DIGESTSIZE]; // 20
159   char dest_str[output_size];
160
161 public:
162   SignatureHelper() = default;
163
164   const char* calc(const std::string& key,
165                    const boost::string_view& method,
166                    const boost::string_view& path,
167                    const std::string& expires) {
168
169     using ceph::crypto::HMACSHA1;
170     using UCHARPTR = const unsigned char*;
171
172     HMACSHA1 hmac((UCHARPTR) key.c_str(), key.size());
173     hmac.Update((UCHARPTR) method.data(), method.size());
174     hmac.Update((UCHARPTR) "\n", 1);
175     hmac.Update((UCHARPTR) expires.c_str(), expires.size());
176     hmac.Update((UCHARPTR) "\n", 1);
177     hmac.Update((UCHARPTR) path.data(), path.size());
178     hmac.Final(dest);
179
180     buf_to_hex((UCHARPTR) dest, sizeof(dest), dest_str);
181
182     return dest_str;
183   }
184
185   bool is_equal_to(const std::string& rhs) const {
186     /* never allow out-of-range exception */
187     if (rhs.size() < (output_size - 1)) {
188       return false;
189     }
190     return rhs.compare(0 /* pos */,  output_size, dest_str) == 0;
191   }
192
193 }; /* TempURLEngine::SignatureHelper */
194
195 class TempURLEngine::PrefixableSignatureHelper
196     : private TempURLEngine::SignatureHelper {
197   using base_t = SignatureHelper;
198
199   const boost::string_view decoded_uri;
200   const boost::string_view object_name;
201   boost::string_view no_obj_uri;
202
203   const boost::optional<const std::string&> prefix;
204
205 public:
206   PrefixableSignatureHelper(const std::string& _decoded_uri,
207                             const std::string& object_name,
208                             const boost::optional<const std::string&> prefix)
209     : decoded_uri(_decoded_uri),
210       object_name(object_name),
211       prefix(prefix) {
212     /* Transform: v1/acct/cont/obj - > v1/acct/cont/
213      *
214      * NOTE(rzarzynski): we really want to substr() on boost::string_view,
215      * not std::string. Otherwise we would end with no_obj_uri referencing
216      * a temporary. */
217     no_obj_uri = \
218       decoded_uri.substr(0, decoded_uri.length() - object_name.length());
219   }
220
221   const char* calc(const std::string& key,
222                    const boost::string_view& method,
223                    const boost::string_view& path,
224                    const std::string& expires) {
225     if (!prefix) {
226       return base_t::calc(key, method, path, expires);
227     } else {
228       const auto prefixed_path = \
229         string_cat_reserve("prefix:", no_obj_uri, *prefix);
230       return base_t::calc(key, method, prefixed_path, expires);
231     }
232   }
233
234   bool is_equal_to(const std::string& rhs) const {
235     bool is_auth_ok = base_t::is_equal_to(rhs);
236
237     if (prefix && is_auth_ok) {
238       const auto prefix_uri = string_cat_reserve(no_obj_uri, *prefix);
239       is_auth_ok = boost::algorithm::starts_with(decoded_uri, prefix_uri);
240     }
241
242     return is_auth_ok;
243   }
244 }; /* TempURLEngine::PrefixableSignatureHelper */
245
246 TempURLEngine::result_t
247 TempURLEngine::authenticate(const req_state* const s) const
248 {
249   if (! is_applicable(s)) {
250     return result_t::deny();
251   }
252
253   /* NOTE(rzarzynski): RGWHTTPArgs::get(), in contrast to RGWEnv::get(),
254    * never returns nullptr. If the requested parameter is absent, we will
255    * get the empty string. */
256   const std::string& temp_url_sig = s->info.args.get("temp_url_sig");
257   const std::string& temp_url_expires = s->info.args.get("temp_url_expires");
258
259   if (temp_url_sig.empty() || temp_url_expires.empty()) {
260     return result_t::deny();
261   }
262
263   /* Though, for prefixed tempurls we need to differentiate between empty
264    * prefix and lack of prefix. Empty prefix means allowance for whole
265    * container. */
266   const boost::optional<const std::string&> temp_url_prefix = \
267     s->info.args.get_optional("temp_url_prefix");
268
269   RGWUserInfo owner_info;
270   try {
271     get_owner_info(s, owner_info);
272   } catch (...) {
273     ldout(cct, 5) << "cannot get user_info of account's owner" << dendl;
274     return result_t::reject();
275   }
276
277   if (owner_info.temp_url_keys.empty()) {
278     ldout(cct, 5) << "user does not have temp url key set, aborting" << dendl;
279     return result_t::reject();
280   }
281
282   if (is_expired(temp_url_expires)) {
283     ldout(cct, 5) << "temp url link expired" << dendl;
284     return result_t::reject(-EPERM);
285   }
286
287   /* We need to verify two paths because of compliance with Swift, Tempest
288    * and old versions of RadosGW. The second item will have the prefix
289    * of Swift API entry point removed. */
290
291   /* XXX can we search this ONCE? */
292   const size_t pos = g_conf->rgw_swift_url_prefix.find_last_not_of('/') + 1;
293   const boost::string_view ref_uri = s->decoded_uri;
294   const std::array<boost::string_view, 2> allowed_paths = {
295     ref_uri,
296     ref_uri.substr(pos + 1)
297   };
298
299   /* Account owner calculates the signature also against a HTTP method. */
300   boost::container::static_vector<boost::string_view, 3> allowed_methods;
301   if (strcmp("HEAD", s->info.method) == 0) {
302     /* HEAD requests are specially handled. */
303     /* TODO: after getting a newer boost (with static_vector supporting
304      * initializers lists), get back to the good notation:
305      *   allowed_methods = {"HEAD", "GET", "PUT" };
306      * Just for now let's use emplace_back to construct the vector. */
307     allowed_methods.emplace_back("HEAD");
308     allowed_methods.emplace_back("GET");
309     allowed_methods.emplace_back("PUT");
310   } else if (strlen(s->info.method) > 0) {
311     allowed_methods.emplace_back(s->info.method);
312   }
313
314   /* Need to try each combination of keys, allowed path and methods. */
315   PrefixableSignatureHelper sig_helper {
316     s->decoded_uri,
317     s->object.name,
318     temp_url_prefix
319   };
320
321   for (const auto& kv : owner_info.temp_url_keys) {
322     const int temp_url_key_num = kv.first;
323     const string& temp_url_key = kv.second;
324
325     if (temp_url_key.empty()) {
326       continue;
327     }
328
329     for (const auto& path : allowed_paths) {
330       for (const auto& method : allowed_methods) {
331         const char* const local_sig = sig_helper.calc(temp_url_key, method,
332                                                       path, temp_url_expires);
333
334         ldout(s->cct, 20) << "temp url signature [" << temp_url_key_num
335                           << "] (calculated): " << local_sig
336                           << dendl;
337
338         if (sig_helper.is_equal_to(temp_url_sig)) {
339           auto apl = apl_factory->create_apl_turl(cct, s, owner_info);
340           return result_t::grant(std::move(apl));
341         } else {
342           ldout(s->cct,  5) << "temp url signature mismatch: " << local_sig
343                             << " != " << temp_url_sig  << dendl;
344         }
345       }
346     }
347   }
348
349   return result_t::reject();
350 }
351
352
353 /* External token */
354 bool ExternalTokenEngine::is_applicable(const std::string& token) const noexcept
355 {
356   if (token.empty()) {
357     return false;
358   } else if (g_conf->rgw_swift_auth_url.empty()) {
359     return false;
360   } else {
361     return true;
362   }
363 }
364
365 ExternalTokenEngine::result_t
366 ExternalTokenEngine::authenticate(const std::string& token,
367                                   const req_state* const s) const
368 {
369   if (! is_applicable(token)) {
370     return result_t::deny();
371   }
372
373   std::string auth_url = g_conf->rgw_swift_auth_url;
374   if (auth_url.back() != '/') {
375     auth_url.append("/");
376   }
377
378   auth_url.append("token");
379   char url_buf[auth_url.size() + 1 + token.length() + 1];
380   sprintf(url_buf, "%s/%s", auth_url.c_str(), token.c_str());
381
382   RGWHTTPHeadersCollector validator(cct, { "X-Auth-Groups", "X-Auth-Ttl" });
383
384   ldout(cct, 10) << "rgw_swift_validate_token url=" << url_buf << dendl;
385
386   int ret = validator.process(url_buf);
387   if (ret < 0) {
388     throw ret;
389   }
390
391   std::string swift_user;
392   try {
393     std::vector<std::string> swift_groups;
394     get_str_vec(validator.get_header_value("X-Auth-Groups"),
395                 ",", swift_groups);
396
397     if (0 == swift_groups.size()) {
398       return result_t::deny(-EPERM);
399     } else {
400       swift_user = std::move(swift_groups[0]);
401     }
402   } catch (std::out_of_range) {
403     /* The X-Auth-Groups header isn't present in the response. */
404     return result_t::deny(-EPERM);
405   }
406
407   if (swift_user.empty()) {
408     return result_t::deny(-EPERM);
409   }
410
411   ldout(cct, 10) << "swift user=" << swift_user << dendl;
412
413   RGWUserInfo tmp_uinfo;
414   ret = rgw_get_user_info_by_swift(store, swift_user, tmp_uinfo);
415   if (ret < 0) {
416     ldout(cct, 0) << "NOTICE: couldn't map swift user" << dendl;
417     throw ret;
418   }
419
420   auto apl = apl_factory->create_apl_local(cct, s, tmp_uinfo,
421                                            extract_swift_subuser(swift_user));
422   return result_t::grant(std::move(apl));
423 }
424
425 static int build_token(const string& swift_user,
426                        const string& key,
427                        const uint64_t nonce,
428                        const utime_t& expiration,
429                        bufferlist& bl)
430 {
431   ::encode(swift_user, bl);
432   ::encode(nonce, bl);
433   ::encode(expiration, bl);
434
435   bufferptr p(CEPH_CRYPTO_HMACSHA1_DIGESTSIZE);
436
437   char buf[bl.length() * 2 + 1];
438   buf_to_hex((const unsigned char *)bl.c_str(), bl.length(), buf);
439   dout(20) << "build_token token=" << buf << dendl;
440
441   char k[CEPH_CRYPTO_HMACSHA1_DIGESTSIZE];
442   memset(k, 0, sizeof(k));
443   const char *s = key.c_str();
444   for (int i = 0; i < (int)key.length(); i++, s++) {
445     k[i % CEPH_CRYPTO_HMACSHA1_DIGESTSIZE] |= *s;
446   }
447   calc_hmac_sha1(k, sizeof(k), bl.c_str(), bl.length(), p.c_str());
448
449   bl.append(p);
450
451   return 0;
452
453 }
454
455 static int encode_token(CephContext *cct, string& swift_user, string& key,
456                         bufferlist& bl)
457 {
458   uint64_t nonce;
459
460   int ret = get_random_bytes((char *)&nonce, sizeof(nonce));
461   if (ret < 0)
462     return ret;
463
464   utime_t expiration = ceph_clock_now();
465   expiration += cct->_conf->rgw_swift_token_expiration;
466
467   return build_token(swift_user, key, nonce, expiration, bl);
468 }
469
470
471 /* AUTH_rgwtk (signed token): engine */
472 bool SignedTokenEngine::is_applicable(const std::string& token) const noexcept
473 {
474   if (token.empty()) {
475     return false;
476   } else {
477     return token.compare(0, 10, "AUTH_rgwtk") == 0;
478   }
479 }
480
481 SignedTokenEngine::result_t
482 SignedTokenEngine::authenticate(const std::string& token,
483                                 const req_state* const s) const
484 {
485   if (! is_applicable(token)) {
486     return result_t::deny(-EPERM);
487   }
488
489   /* Effective token string is the part after the prefix. */
490   const std::string etoken = token.substr(strlen("AUTH_rgwtk"));
491   const size_t etoken_len = etoken.length();
492
493   if (etoken_len & 1) {
494     ldout(cct, 0) << "NOTICE: failed to verify token: odd token length="
495                   << etoken_len << dendl;
496     throw -EINVAL;
497   }
498
499   ceph::bufferptr p(etoken_len/2);
500   int ret = hex_to_buf(etoken.c_str(), p.c_str(), etoken_len);
501   if (ret < 0) {
502     throw ret;
503   }
504
505   ceph::bufferlist tok_bl;
506   tok_bl.append(p);
507
508   uint64_t nonce;
509   utime_t expiration;
510   std::string swift_user;
511
512   try {
513     /*const*/ auto iter = tok_bl.begin();
514
515     ::decode(swift_user, iter);
516     ::decode(nonce, iter);
517     ::decode(expiration, iter);
518   } catch (buffer::error& err) {
519     ldout(cct, 0) << "NOTICE: failed to decode token" << dendl;
520     throw -EINVAL;
521   }
522
523   const utime_t now = ceph_clock_now();
524   if (expiration < now) {
525     ldout(cct, 0) << "NOTICE: old timed out token was used now=" << now
526                   << " token.expiration=" << expiration
527                   << dendl;
528     return result_t::deny(-EPERM);
529   }
530
531   RGWUserInfo user_info;
532   ret = rgw_get_user_info_by_swift(store, swift_user, user_info);
533   if (ret < 0) {
534     throw ret;
535   }
536
537   ldout(cct, 10) << "swift_user=" << swift_user << dendl;
538
539   const auto siter = user_info.swift_keys.find(swift_user);
540   if (siter == std::end(user_info.swift_keys)) {
541     return result_t::deny(-EPERM);
542   }
543
544   const auto swift_key = siter->second;
545
546   bufferlist local_tok_bl;
547   ret = build_token(swift_user, swift_key.key, nonce, expiration, local_tok_bl);
548   if (ret < 0) {
549     throw ret;
550   }
551
552   if (local_tok_bl.length() != tok_bl.length()) {
553     ldout(cct, 0) << "NOTICE: tokens length mismatch:"
554                   << " tok_bl.length()=" << tok_bl.length()
555                   << " local_tok_bl.length()=" << local_tok_bl.length()
556                   << dendl;
557     return result_t::deny(-EPERM);
558   }
559
560   if (memcmp(local_tok_bl.c_str(), tok_bl.c_str(),
561              local_tok_bl.length()) != 0) {
562     char buf[local_tok_bl.length() * 2 + 1];
563
564     buf_to_hex(reinterpret_cast<const unsigned char *>(local_tok_bl.c_str()),
565                local_tok_bl.length(), buf);
566
567     ldout(cct, 0) << "NOTICE: tokens mismatch tok=" << buf << dendl;
568     return result_t::deny(-EPERM);
569   }
570
571   auto apl = apl_factory->create_apl_local(cct, s, user_info,
572                                            extract_swift_subuser(swift_user));
573   return result_t::grant(std::move(apl));
574 }
575
576 } /* namespace swift */
577 } /* namespace auth */
578 } /* namespace rgw */
579
580
581 void RGW_SWIFT_Auth_Get::execute()
582 {
583   int ret = -EPERM;
584
585   const char *key = s->info.env->get("HTTP_X_AUTH_KEY");
586   const char *user = s->info.env->get("HTTP_X_AUTH_USER");
587
588   s->prot_flags |= RGW_REST_SWIFT;
589
590   string user_str;
591   RGWUserInfo info;
592   bufferlist bl;
593   RGWAccessKey *swift_key;
594   map<string, RGWAccessKey>::iterator siter;
595
596   string swift_url = g_conf->rgw_swift_url;
597   string swift_prefix = g_conf->rgw_swift_url_prefix;
598   string tenant_path;
599
600   /*
601    * We did not allow an empty Swift prefix before, but we want it now.
602    * So, we take rgw_swift_url_prefix = "/" to yield the empty prefix.
603    * The rgw_swift_url_prefix = "" is the default and yields "/swift"
604    * in a backwards-compatible way.
605    */
606   if (swift_prefix.size() == 0) {
607     swift_prefix = DEFAULT_SWIFT_PREFIX;
608   } else if (swift_prefix == "/") {
609     swift_prefix.clear();
610   } else {
611     if (swift_prefix[0] != '/') {
612       swift_prefix.insert(0, "/");
613     }
614   }
615
616   if (swift_url.size() == 0) {
617     bool add_port = false;
618     const char *server_port = s->info.env->get("SERVER_PORT_SECURE");
619     const char *protocol;
620     if (server_port) {
621       add_port = (strcmp(server_port, "443") != 0);
622       protocol = "https";
623     } else {
624       server_port = s->info.env->get("SERVER_PORT");
625       add_port = (strcmp(server_port, "80") != 0);
626       protocol = "http";
627     }
628     const char *host = s->info.env->get("HTTP_HOST");
629     if (!host) {
630       dout(0) << "NOTICE: server is misconfigured, missing rgw_swift_url_prefix or rgw_swift_url, HTTP_HOST is not set" << dendl;
631       ret = -EINVAL;
632       goto done;
633     }
634     swift_url = protocol;
635     swift_url.append("://");
636     swift_url.append(host);
637     if (add_port && !strchr(host, ':')) {
638       swift_url.append(":");
639       swift_url.append(server_port);
640     }
641   }
642
643   if (!key || !user)
644     goto done;
645
646   user_str = user;
647
648   if ((ret = rgw_get_user_info_by_swift(store, user_str, info)) < 0)
649   {
650     ret = -EACCES;
651     goto done;
652   }
653
654   siter = info.swift_keys.find(user_str);
655   if (siter == info.swift_keys.end()) {
656     ret = -EPERM;
657     goto done;
658   }
659   swift_key = &siter->second;
660
661   if (swift_key->key.compare(key) != 0) {
662     dout(0) << "NOTICE: RGW_SWIFT_Auth_Get::execute(): bad swift key" << dendl;
663     ret = -EPERM;
664     goto done;
665   }
666
667   if (!g_conf->rgw_swift_tenant_name.empty()) {
668     tenant_path = "/AUTH_";
669     tenant_path.append(g_conf->rgw_swift_tenant_name);
670   } else if (g_conf->rgw_swift_account_in_url) {
671     tenant_path = "/AUTH_";
672     tenant_path.append(info.user_id.to_str());
673   }
674
675   dump_header(s, "X-Storage-Url", swift_url + swift_prefix + "/v1" +
676               tenant_path);
677
678   using rgw::auth::swift::encode_token;
679   if ((ret = encode_token(s->cct, swift_key->id, swift_key->key, bl)) < 0)
680     goto done;
681
682   {
683     static constexpr size_t PREFIX_LEN = sizeof("AUTH_rgwtk") - 1;
684     char token_val[PREFIX_LEN + bl.length() * 2 + 1];
685
686     snprintf(token_val, PREFIX_LEN + 1, "AUTH_rgwtk");
687     buf_to_hex((const unsigned char *)bl.c_str(), bl.length(),
688                token_val + PREFIX_LEN);
689
690     dump_header(s, "X-Storage-Token", token_val);
691     dump_header(s, "X-Auth-Token", token_val);
692   }
693
694   ret = STATUS_NO_CONTENT;
695
696 done:
697   set_req_state_err(s, ret);
698   dump_errno(s);
699   end_header(s);
700 }
701
702 int RGWHandler_SWIFT_Auth::init(RGWRados *store, struct req_state *state,
703                                 rgw::io::BasicClient *cio)
704 {
705   state->dialect = "swift-auth";
706   state->formatter = new JSONFormatter;
707   state->format = RGW_FORMAT_JSON;
708
709   return RGWHandler::init(store, state, cio);
710 }
711
712 int RGWHandler_SWIFT_Auth::authorize()
713 {
714   return 0;
715 }
716
717 RGWOp *RGWHandler_SWIFT_Auth::op_get()
718 {
719   return new RGW_SWIFT_Auth_Get;
720 }
721