]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: Handle multiple listening addreses w/ optional ssl "correctly" with civetweb. 11776/head
authorMarcus Watts <mwatts@redhat.com>
Wed, 3 Aug 2016 21:36:55 +0000 (17:36 -0400)
committerMarcus Watts <mwatts@redhat.com>
Tue, 20 Dec 2016 05:37:05 +0000 (00:37 -0500)
commit8bc6decc0774fae9ac881f91e73da55deebe3360
tree5acf3e0ef3b99f4079f04f0f8baa04755b6c7667
parenta113cf5ff5a642d2ee4cc83f5c7001b4bfe0a5df
rgw: Handle multiple listening addreses w/ optional ssl "correctly" with civetweb.

For civetweb: accept a range of port numbers joined with '+'.
Port numbers may include an ipaddress: prefix and 's' suffix.
Additionally, use "mg_get_local_addr" to correctly deduce host port per
incoming connection.

civetweb can accept connections on multiple ports, some of which
might have SSL turned on and some not.  Both s3 and swift have various
authorization protocols in which the port number matters.  In the generic
radosgw frontend process, each frontend only has one port number, but
we should want to have both ssl and non-ssl connections managed within
one rgw frontend, because the thread pool is also per front-end, and
that *is* a scarce resource.

So, this patch enables the use of multiple ports with a single civetweb
frontend.  To indicate https: append an 's' to portno.  To use multiple
ports, use +.  So 80+443s indicates use of the usual default http ports.
The parsed port is not stored in the frontend structure,

So instead, this patch adds logic to use the results of
mg_get_local_addr() on a per-connection basis insetad of the generic
front-end port number.  This will affect "v4" s3 authorization, and also
affect swift pre-signed URLs.

mg_get_local_addr() is a new customization to civetweb; that submodule
was updated (in a temporary repository) by the previous commit to this.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_civetweb.cc
src/rgw/rgw_civetweb.h
src/rgw/rgw_civetweb_frontend.cc
src/rgw/rgw_main.cc