]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
rgw: x-amz-date change breaks certain cases of aws sig v4. 48312/head
authorMarcus Watts <mwatts@redhat.com>
Wed, 10 Aug 2022 19:56:19 +0000 (15:56 -0400)
committerKonstantin Shalygin <k0ste@k0ste.ru>
Tue, 24 Jan 2023 03:30:15 +0000 (10:30 +0700)
commita0e92d3a0f6beb8989d133d5bcedd9f0bcabf39d
tree2ee94a3a6c171406fb852cc7aeea706471186e06
parent486545d3e2a10e3d6b621a4420eeaf776367e151
rgw: x-amz-date change breaks certain cases of aws sig v4.

Once upon a time, x-amz-date strings were in rfc 2616 format, and most
s3 clients are written to make this style of timestamp.  The current protocol
standard specifies iso 8601 timestamps (yyyymmddThhmmssZ), and client
libraries are changing to use this new format.

This change does two things: firstly, if the date parse fails, it logs
the actual offending timestamp for later analysis.  Secondly, if rfc
2616 fails, it tries iso 8601.  The new timestamp is tried secondarily,
because that lgoic also emits a (less useful) error message, which should
not be spamnificated for valid rfc 2616 timestamps.

Fixes: https://tracker.ceph.com/issues/57094
Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 70ba760f42766fe1075fc3f999e0393a2091b6e0)
src/rgw/rgw_auth_s3.cc