Project

General

Profile

Actions

Feature #3973

open

rgw: Handle requests sent in non-UTC time

Added by Moritz Krinke about 11 years ago. Updated about 11 years ago.

Status:
New
Priority:
Low
Assignee:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:

Description

Executing a S3 Request using the following Date Header

Date: Thu, 31 Jan 2013 17:37:37 +0100\r\n

results in the following error message (radosgw.log)
2013-01-31 17:37:37.770023 7fd8577ae700  0 NOTICE: request time skew too big now=2013-01-31 17:37:37.000000 req_time=2013-01-31 18:37:37.000000
2013-01-31 17:37:37.770038 7fd8577ae700 10 failed to authorize request

The Date and Time in the Request itself is correct, the request was issued on Thu, 31 Jan 2013 17:37:37 +0100 (16:37 UTC)

It seems that radosgw takes the "+0100" from the request and adds on hour to the date before comparing it to the local time (which also is UTC+1, server and client are in the same TZ).

This is problematic because not all s3 clients send a UTC Date header "+0000" - the aws-sdk-php (v2) does send utc time, the aws-sdk-ruby however does not.

Actions #1

Updated by Ian Colle about 11 years ago

  • Assignee set to Yehuda Sadeh
  • Priority changed from Normal to Urgent
Actions #2

Updated by Ian Colle about 11 years ago

  • Status changed from New to Need More Info

Moritz - this seems like an issue with aws-sdk-ruby not reporting time in UTC, rather than our inability to handle a mix of UTC and non-UTC time. Could you open a ticket against it to correct the time reporting?

Actions #3

Updated by Moritz Krinke about 11 years ago

Ian, i dont think this is an client issue. Checking the AWS documentation (http://docs.aws.amazon.com/AmazonS3/latest/API/RESTCommonRequestHeaders.html), the example given there is a GMT one. For me this sounds like the server has to accept a Date and Time in any given timezone as long as the format is correct and the timezone is given. This is probably also the reason aws-sdk-ruby works with the original aws s3 service.

Actions #4

Updated by Ian Colle about 11 years ago

  • Status changed from Need More Info to 12
  • Priority changed from Urgent to High
Actions #5

Updated by Yehuda Sadeh about 11 years ago

from RFC 2616:

All HTTP date/time stamps MUST be represented in Greenwich Mean Time (GMT), without exception.

Actions #6

Updated by Moritz Krinke about 11 years ago

Yehuda, i admit that i looks like the client is sending the wrong date, although it would be nice if radosgw could cope with this as this should not be hard given that the offset is specified ;)
Im going to create a bug report in the aws-sdk-ruby project so it can get fixed there.

Actions #7

Updated by Ian Colle about 11 years ago

  • Tracker changed from Bug to Feature
  • Subject changed from rgw: Timezone is handled wrong s3 API Requests to rgw: Handle requests sent in non-UTC time
  • Status changed from 12 to New
  • Assignee deleted (Yehuda Sadeh)
  • Priority changed from High to Low

Moved to a feature for possible future consideration.

Actions

Also available in: Atom PDF