RGW AWS4 SignatureDoesNotMatch when requests with port != 80 or != 443

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!
I get the error "<Error> <code> SignatureDoesNotMatch" when I used presigned url with endpoint port != 80 and != 443. For example, if I use host http://192.168.1.1:8888 then this is what I have in RGW log:
//
RGWEnv::set(): HTTP_HOST: 192.168.1.1:8888
//
RGWEnv::set(): SERVER_PORT: 8888
//
HTTP_HOST=192.168.1.1:8888
//
SERVER_PORT=8888
//
host=192.168.1.1
//
canonical headers format = host:192.168.1.1:8888:8888
//
canonical request = GET
/
X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=<access_key>%2F20160605%2Fap%2Fs3%2Faws4_request&X-Amz-Date=20160605T125927Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host
host:192.168.1.1:8888:8888

host
UNSIGNED-PAYLOAD
//
----------------------------- Verifying signatures
//
failed to authorize request
//


I see this in the src / rgw / rgw_rest_s3.cc:
int RGW_Auth_S3 :: authorize_v4 (....) {
//
  string port = s-> info.env-> get ( 'SERVER_PORT "," ");
  secure_port string = 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;
      }
    }

Is it caused my fault ? Can somebody please help me out ?
Thank !
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux