]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
radosgw: fix awsv4 header line sort order. 18046/head
authorMarcus Watts <mwatts@redhat.com>
Fri, 29 Sep 2017 21:04:08 +0000 (17:04 -0400)
committerMarcus Watts <mwatts@redhat.com>
Fri, 29 Sep 2017 21:04:08 +0000 (17:04 -0400)
commitc11485e1b3a58631628644152816d9b22a17d8bd
tree83ce8d1cd5f565e8486ea010680676c88c190a22
parentc59efe0a2bacb6f10d86bfebf6067b6dd9ebdb43
radosgw: fix awsv4 header line sort order.

The awsv4 signature calculation includes a list of header lines, which
are supposed to be sorted.  The existing code sorts by header name, but
it appears that in fact it is necessary to sort the whole header *line*,
not just the field name.  Sorting by just the field name usually works,
but not always.  The s3-tests teuthology suite includes
s3tests.functional.test_s3.test_object_header_acl_grants
s3tests.functional.test_s3.test_bucket_header_acl_grants
which include the following header lines,

x-amz-grant-read-acp:id=56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
x-amz-grant-read:id=56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
x-amz-grant-write-acp:id=56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
x-amz-grant-write:id=56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234

in this case, note that ':' needs to sort after '-'.

Fixes: http://tracker.ceph.com/issues/21607
Signed-off-by: Marcus Watts <mwatts@redhat.com>
src/rgw/rgw_auth_s3.cc