Project

General

Profile

Bug #16548

Bug when using port 443s in rgw.

Added by Nhật Khang Nguyễn almost 3 years ago. Updated almost 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
06/30/2016
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
rgw
Pull request ID:

Description

Hi all,
ceph-radosgw that I am using is being rebuilt from ceph-10.2.2-0.el7.src.rpm with patches [1], [2]:

  //
  uint64_t now_req = 0;
  uint64_t now = ceph_clock_now(s->cct);
  //
  string port = s->info.env->get("SERVER_PORT", "");
  string secure_port = s->info.env->get("SERVER_PORT_SECURE", "");
  //
    if (using_qs && (token == "host")) {
      if (!port.empty() && port != "80") {
        token_value = token_value + ":" + port;
      } else if (!secure_port.empty() && secure_port != "443") {
        token_value = token_value + ":" + secure_port;
      }
    }
   //

But it still bugs when using port 443s with s3 pre-signed url, here's my ceph.conf and rgw.log:
*ceph.conf*
[global]
//
[client.rgw.radosgw2]
rgw_frontends = "civetweb port=443s ssl_certificate=/etc/ceph/server.pem" 
debug ms = 1
debug rgw = 20

*rgw.log*
HTTP_HOST=rgw.xxx.vn
QUERY_STRING=X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Expires=3600&X-Amz-Credential....
REMOTE_USER=
REQUEST_METHOD=GET
REQUEST_URI=/
SCRIPT_URI=/
SERVER_PORT=0
SERVER_PORT_SECURE=443
canonical headers format = host:rgw.xxx.vn:0
failed to authorize request

I think it necessary to modify about env.set("SERVER_PORT"..) or env.set("SERVER_PORT_SECURE"..) in src/rgw/rgw_civetweb.cc=>RGWMongoose::init_env() to make SERVER_PORT_SECURE=443 then SERVER_PORT=None.

[1]
https://github.com/ceph/ceph/commit/033888bbd0e4d8d81358bf61a099276dddb5692b
[2]
https://github.com/Abhishekvrshny/ceph/commit/310f5bdf56a9deb09347aadc158da25750fb6735


Related issues

Copied to rgw - Backport #16958: jewel: Bug when using port 443s in rgw. Resolved

History

#2 Updated by Abhishek Lekshmanan almost 3 years ago

  • Status changed from New to In Progress

#3 Updated by Pritha Srivastava almost 3 years ago

  • Status changed from In Progress to Need Review

#4 Updated by Nathan Cutler almost 3 years ago

  • Status changed from Need Review to Pending Backport
  • Backport set to jewel

#5 Updated by Nathan Cutler almost 3 years ago

#6 Updated by Loic Dachary almost 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF